Trellis non-Bedrock'd?

I’ve come into a couple of situations where I would like to use Trellis but I can’t use a Bedrock-style setup. Anyone know of a Trellis fork designed for a more traditional WordPress installation?

1 Like

Why?

I could understand using Trellis and wanting to strip out the WordPress stuff, but why would you want to use Trellis without Bedrock (or WordPress without Bedrock)?

Main reason is working as a freelancer on projects where I’m not in charge and they don’t want to change WordPress structure.

1 Like

I’m trying to integrate Trellis into an existing WP project and I’m wondering whether I have to convert the site to Bedrock style. After reading the above I’m assuming the answer is yes.

I love Bedrock, but in a big company with existing WordPress sites, it isn’t that easy to just switch them to Bedrock. I’m using https://puphpet.com/ now to script the setup of our vagrant boxes, but would like to switch to Ansible and love the way Trellis is set up.

I would like to use Trellis with a standard WordPress structure. But if I get you right @ben this isn’t possible? I’m trying to understand where the Bedrock specific setup happens in Trellis but haven’t found it yet.

Is there some Ansible boilerplate, a bit like Trellis, that I could use as a base?

Sure it’s possible, but it’s not recommended or supported over here.

You should look into automating the conversion of your non-Bedrock sites to Bedrock :zap:

I’ve run into similar use-cases where Trellis seemed like a great option but mapping it’s plumbing up to that service- Pantheon in that example - I found the juice wasn’t worth the squeeze, so to speak.

In my case, I used https://github.com/kalabox/kalabox-app-pantheon for local dev (akin to Trellis) with Pantheon’s version of WordPress (akin to Bedrock) which has tight integration with the Pantheon platform, and then on other non-Pantheon projects I’m using the full Roots stack with Digital Ocean bare metal. Both stacks I used Sage, which I find to be the best base theme by a mile.

It’s interesting to compare Roots and Pantheon, both really trying to push CMS dev into the modern era but taking completely different approaches. Pantheon is asking you to give into their infrastructure whereas Roots wants you to build your own infrastructure. I find Roots forces me to invest heavily in the beginning on config and then I’ve got a smoother dev process deep into a project whereas Pantheon seduces you into thinking you don’t really need to do config, only to find later on that you did but to a different level.

3 Likes

hi there, last week I migrated a non-bedrock-wp to bedrock:

my recipe :grinning:

  • backup external assets &&/or folders

  • find out external files [normally moving those to wp/app is enough, posible issues there due to hardcoded paths]

  • [db] backup db

  • [composer] set the same wp version

  • [composer] find the exact plugins version also

  • [trellis] configure trellis with the same stuff as the actual site [ ex.: no cache, no ssl ]

  • setup a local development site with trellis and import all assets/folders/external files and make the site work :smiley:

  • hard stuff are the plugins, you need to find out if some configuration got removed && tweak that manually :expressionless:

  • [wp-cli] use search-replace to find out [with --dry-run] all the urls, and change the domain to match you local domain and the same process when you test online with another domain

  • I backed up the plugins folder also to quickly test the site locally with no composer management then when I get the site to run flawlessly I just spent time gathering all the exact version

  • next I run the site on a vps like digitalocean [cheaper] and test the deployment cycles and verify the site there

  • next, profit :grin:

enjoy :sweat_smile:

6 Likes

There is a very simple way:

  1. Start your trellis + bedrock project
  2. Delete all the content of site folder (save .env to get the enviroment params after) or rename (e.g. site__bedrock)
  3. Inside site/web put your “traditional WordPress installation”
  4. Set site/web/wp-config.php with .env params

Of course, this isn’t recomended and you lose all the features of Bedrock and can’t do deploys with Trellis but is a quick way to have running a traditional WordPress installation in a Trellis Vagrant machine.

I know it’s a little fudge, but it can be useful in some cases…