Just the server?

Hi everybody,

As far as I can tell this is the best-maintained lemp / ansible thing going on github right now. Any pointers on how I would break the server part away from its wordpress-specific features?

Take out roles from server.yml and dev.yml - probably the ones after role: composer.

You’ll probably have to rewrite deploy.yml significantly.

1 Like

ah nice that is what I was looking for

@socksman I use Trellis for a load of other wordpress-non-specific projects, so it’s for sure possible. @runofthemill is right, you don’t need the roles below composer, though than can be re-used. For example, I’ve changed it from wordpress_sites to app_config in my non-wordpress projects. The folder structure used in wordpress-setup is generic and can be re-used too.


I’d search the codebase for wordpress_sites and remove anything to do with that. It’s mostly confined to the roles mentioned above, but there’s a few other places like common handlers.

If there was a version of Trellis without WP it could be called Trel less

That’s a freebie.


Hey thanks everybody, for anyone looking for a quick and dirty how-to, here’s what worked for me:

make a root folder for your project, clone trellis in that folder under trellis. Create another folder next to trellis called site

  • comment out wordpress-cli and wordpress-install from dev.yml
  • edit group_vars/development/wordrpess-sites.yml
    • change the first entry (example.com?) to what you want your project to be named (“my_project”)
    • change canonical from example.dev to whatever you want to use as a dev site (mysite.dev)
  • edit group_vars/development/vault.yml
    • change the example entry to be my_project, change db_password to whatever you like

Clone / rsync / create your project files into a subfolder of site called web

At this point if you do vagrant up in trellis, you should be able to hit http://mysite.dev and get some kind of error.

If you vagrant ssh your site’s folder on the vm is /srv/www/my_project/current/web/

mysql defaults for config files / imports:

  • user: my_project
  • db_name: my_project_development
  • db_pass: whatever you put in vault.yml

It’s also possible that your CMS prefers something different in the nginx config than what WP likes.

1 Like