Decent WordPress workflows with WPEngine

Since starting doing WordPress, I have been struggling a bit to make the dev workflow a bit more predictable. The WordPress world does not seem to be very cautious in general, I have seen quite a few projects where the code was not versioned at all and the updates were done via the admin, directly in production. Luckly, it seems the the folks at WPEngine try to cater for the projects where a more structured matters.

First of all, every WP Engine hosted website provide the option to add a dev and even a stage website – https://wpengine.com/support/environments/ . Even better, they offer an option to sync back the data between the envs, i.e. you can pull the production database back to staging anytime it lags behind. This alone is pretty cool, it means that with a few clicks, you are able to have a “backup” where you or the client can test their new ideas without creating a prod outage.

Moving on, you can “tie” each env to a git repo – https://wpengine.com/support/git/ . The process is pretty simple – add your public key, then get a full featured repo for each environment. Whenever you push a branch, the content will be visible on the env that’s associated with the repo. Pretty fast too, it only adds a few seconds for the build when pushing. If you use multiple branches, the last branch you push is the one that reflects the code changes. So you can work with feature branches and any time you switch to a new one it will take over.

One thing that I never liked about WordPress is that it gets complicated to not version the core. Since there is no composer, you have to create a monstrous gitignore to exclude the core, which is all over the place. However, WPEngine makes it pretty easy:

  • You use their gitignore to exclude anything that’s core related from your git repo.
  • You commit your own modules.
  • When the time comes for the upgrades, you can do them locally and test. Because of the gitignore, there is nothing that needs to be commited.
  • You use their own admin panel todo a one click upgrade to WordPress.

While I think their own WP version is modified a bit for some extra features, I never ran into an issue where it worked on my local but not on their hosting. And anyway, you can do the process on the dev env first just to be sure.

Finally, a pleasant surprise is that everything is quick. Builds take a few seconds. Upgrades less than one minute. And most of the time, it just works. When it did not, their supported responded on chat in a few minutes and helped almost real time.

Of course, if you don’t care about dev envs/git repos you can just ignore all those WPEngine features and keep working directly in production. They did a good job of making all the steps a choice, not a requirement.

I’m glad services like WPEngine exist, they can really help in having a structured deploy process in just a few minutes.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s