This is the ultimate WordPress platform, on a shoestring.

TL;DR

Essentially, I tried a whole host of options and landed with cloud offerings from Vultr, using EasyEngine to manage multiple WordPress installations, along with a few key plugins.  Migration up and out will be easy, probably to bare-metal servers, still using EasyEngine.

One of the sites on the new rig: TTFB is just 26ms and page load in 0.7s!

Recently, ahead of a new business project, I found myself time to deal with some dull administration, which included cleaning up legacy setups for WordPress websites that I’ve accumulated over the years.  This included reseller hosting, VPSs, dedicated servers, shared hosting – you name it, I had it somewhere.  All rather inefficient, and costly once you add it all up.

The more fun side of all this however was in planning what all of it was going to migrate to.  The migration was never going to be any fun, let’s be honest, but the upside was getting to explore and play with new technologies — so after putting my sysops hat on, I asked myself this: can you build a WordPress platform, anywhere near something like WPEngine, for a reasonably low cost?  Having worked with WPEngine recently to deliver an enterprise project (the Network Rail corporate website, in case you’re wondering), it was a tall order indeed considering the incredibly high level of support available there, but I remained optimistic.

What does it take to be WPEngine?

Much like Apple, WPEngine don’t really like to sell on hardware specs, which is fair enough given Apple’s success at doing the same.  However, my new setup would need to be as good and probably better in order to cope with some old websites, some of which are poorly coded.  In addition to a robust server stack, the following functionalities would be needed:

  1. Staging environment of some sort
  2. Daily backups as a minimum
  3. PHP7 support
  4. Some WordPress admin functions would be welcome
  5. CDN

From a cost perspective, the lowest cost account for WPEngine is $29/month which allows for a single install, $99 for up to 10 installs, and $249 for up to 25 installs.  These prices are also all on shared platforms, so although we don’t know the exact specification, we can assume they’ll be something similar to low occupancy VPS setups at the higher end, and possibly simple shared hosting at the bottom end.  The prices might seem steep at first, but they can be called 24 hours a day for support, so if you don’t know what you’re doing, it’s well worth it.  Anyway, foregoing the support element, I wanted to see how close we could get, and for how much.

Servers, clouds, platforms, containers

First stop was scouring the market in search of a host where the site could live.  The options were numerous but ultimately fell into the following categories, for the level of robustness I was looking for:

  • Bare VPS/dedi/cloud providers that provide you a box and an operating system ISO installation (at most), then you’re left on your own
  • Platform providers that offer something of a bridge between the bare boxes above and shared hosting’s 1-click installers

I’ve given the second option an entire category name, but in reality only one provider in my research appeared within this category: Cloudways.

Now, this was my first foray into this new breed of cloud operators and although there aren’t many players here yet, to tell the truth – it’s a pretty exciting space and definitely one to keep an eye on in the coming months.

Cloudways

Is it WPEngine? Not quite, but what Cloudways do offer is a managed service (they take care of the server itself, upgrades, security etc) with a range of different platforms available including a standard PHP Stack, WordPress, Drupal, even Magento – but each have specific optimisations and dedicated tools within the control panel/dashboard that specific to the platform you’re working with.

Here’s the trick though: they let you choose which data centre you want to use, including enterprise leaders like AWS and Google Cloud, alongside new up-and-coming (well, they’re already pretty established really) frontrunners Digital Ocean and Vultr.  What this means is that, not only do you have the luxury of using these robust platforms almost directly, without the necessary expertise, but it also means there’s an incredibly powerful redundancy.

Redundancy, eh?

Remember when the whole of AWS went down and took half the planet with it? Well, if you were using AWS at the time via Cloudways, you would have been able to spin up another instance using one of your backups or snapshots, all from the Cloudways dashboard.  An amazing level of power from a pretty simple GUI.  This, ladies and gents, is the future democratisation of website ownership and management right before us.  Complete sysops level control for the website administrator.  We’ll all be out of a job! 🙂

However, not everything is plain sailing.  I did find the Cloudways platform itself to be a little sluggish, and overall, it felt like it might need another year or two of spit and polish.  Oddly enough, I also felt myself craving a just a little more control and power, and another aspect of the Cloudways business model: in order to provide those comforts in a dashboard via their middleman service, there is of course a reasonable but not unnoticeable markup over what you would pay directly to Amazon, Digital Ocean and Vultr.

I’d set out to find an alternative to WPEngine, but did I really need such a level of white glove service?  My cursory background knowledge of working within SSH and seeing the price difference in some of the packages — a 4gb droplet (their name for an instance) with Digital Ocean is $70/month vs $40/month with them directly — led me to continue exploring.

Vultr, and bulk Wordpress migrations

Ok, so why didn’t I go with Digital Ocean?  They’re the more recognisable brand and actually they have more advanced features including load balancer nodes that you plugin to your setup as another droplet — that feature alone did almost fully sway me and I’ll probably come back for it in the future — but I wanted to check out Vultr since I’d heard good things about their revamped new dashboard and incredible pricing starting at just $2.50, yes, $2.50 per month for a 1vcpu, 512mb RAM instance.  Wow.  I must have got one of the last of these as part of my overall setup as they sold out just later on that day, but an email from support has said that they hope to bring more of those back in future.  Ok, so the lowest price instance they have right now is $5 per month for 1vcpu and 1gb of RAM.  Still pretty damn good.

The Vultr UI is gorgeous and really fast

You can install a choice of operating systems (Ubuntu, Debian, Windows etc) or applications (WordPress, Magento, LAMP/LEMP etc) so in that sense it’s similar to Cloudways but that’s where the similarity ends.  Once you’ve installed, that’s it.  The dashboard doesn’t give you many other controls or optimisations specific to the application or the operating system, and you’re mostly left to SSH into your server to carry on with everything else.  You’re also responsible for keeping it up-to-date and keeping it robust enough security-wise to keep hackers and crackers at bay.  Scary stuff, but nothing a quick Google search can’t help you fix.  People are YouTubing how to do their own DIY these days, so server security and administration seems like a pretty natural progression.

Free snapshots, $1 backups, and reboots on the dashboard.  Oh, and staging?

That subtitle pretty much says it all.  What’s important to note is that new server instances can be created from snapshots or backups, which means you can spin up staging servers on-the-fly and coupled with hourly billing, also means you only need to pay for staging whilst you’re using it.  Neat.  Backups are $1/month and you can choose between daily, weekly or monthly, but I think the only decision is pretty obvious given that no specific total of backups is stated anywhere.  Backups and snapshots do not use your server disk space.  Even more awesome.

Ok, it’s getting a bit long-winded here so let’s just say I played around a lot and realised that installing a single application wasn’t going to work for my mass migration of WordPress sites — I needed to find something that would help me install, configure and manage a shedloads of WordPress sites at once.  Something like the WPEngine add/edit/copy site functionality.

Enter ServerPilot and EasyEngine

Discovery of these two pieces of kit fundamentally changed everything for me.  They’re both kind of WPEngine-in-a-box, for want of a better analogy, with ServerPilot having a browser-based dashboard, and EasyEngine being entirely controlled from the bash/SSH command line. Obviously, I decided to start with ServerPilot.

Serverpilot is fantastic, and runs PHP7 so the sites are really quick.  ServerPilot does require that you use Ubuntu 16.04 specifically though, which I later found to have some pretty serious issues with PHP5.6-FPM.  I didn’t actually get to test the some of the older sites with ServerPilot, so I can’t vouch for how well ServerPilot falls back to PHP5.6.

Setting up was pretty straightforward, you basically dial in your server credentials into the ServerPilot dashboard and it takes care of the rest with its guided installation there.  You ‘choose’ an app, which at the moment seems to be either a vanilla PHP installation, or WordPress.  And that’s pretty much it.  Rinse and repeat.  Simple, easy, great.

On the plus side, it’s easy to setup.  It looks after security updates for your server, so it’s more or less managed.  It’s mostly free, so can be bolted on to Vultr/Digital Ocean etc, and almost feels like Cloudways.  But it’s missing something.

You’re handing over the keys to your server to a third party service, for a start.  On the free plan, there’s essentially no contract, so probably inadvisable for any kind of business — businesses should pay for one of the service tiers to lock in some form of security.   And then overall, there’s a lack of control.  Perhaps on this journey I’ve come a fair way from the WPEngine scenario, but I guess it’s odd being somewhere in the middle; I feel it’s better to either pass all control over and have a fully managed end-to-end service, or take full control yourself.  I now wanted all the WPEngine-type functionality, but within an environment I had full control over.

And finally, please welcome: EasyEngine

EasyEngine is an interesting beast.  No dashboard/GUI to speak of, and since I’m a UX designer by degree-default, it’s obviously why I arrived here last.  More interestingly though, it offers a plethora of setup combinations, including WordPress-specific caching (Redis, W3TC, FastCGI, Supercache), automated SSL setup with LetsEncrypt, and both PHP7-FPM and HHVM, with fallback to PHP5.6-FPM.  Nginx takes care of webserver duties instead of Apache.

This is the closest you’ll get to a UI with EasyEngine

Believe me, it’s a powerful environment and allowed me to set-up the migrations with ease:

  1. Firstly, there is only one line needed to set-up a new WordPress site:
    ee site create example.com

    You can add various parameters at the end to define what caching it uses (like –wpredis to use Redis) or –php7, but ultimately you need to prepare just one line to build a perfectly configured WordPress install.

  2. An additional configuration file (ee.conf) in the EasyEngine folder let’s you specify database name, user and table prefix too at runtime, so you can line these up identically with your existing sites, ready to plug them straight in.
  3. Using a combination of ‘mysqldump’, ‘rsync’, and ‘pv’, prepare SSH playbook to migrate databases and files and altogether you need around 4 commands, 5 at a push, per website migration.  Incredibly simple, with a little forward planning.

But there’s no dashboard! How do I get into phpmyadmin?

If you stick this into bash:

ee stack install adminer

You’ll install adminer, which is basically phpmyadmin, but in a single 200kb file.  It just keeps getting better. Check out the other commands you can use to do everything you need in the little microverse they’ve made.  (I just coined that.)

Unbelievable speed

That waterfall image at the top of this post is from a full blown site, running Woocommerce and around 25 plugins.  You can specify up to 14 different WordPress combinations, and depending on your site setup with code, themes, plugins etc, I’d advise trying them all and simply testing them on Chrome’s Developer Toolbar or GTMetrix, or both, and then running with whatever combination is faster.

Sounds like a faff, right?  Even if you’ve set your site up with one type of cache, let’s say you’ve configured Redis, for example, and want to now change to W3 Total Cache, this is what you type:

ee site update example.com --w3tc

That’s it.  Mind.  Blown.

So, Vultr takes care of the backups, right?

Vultr now has the server-level backups taken care of for the not-too-unreasonable price of $1 per month, however, I prefer not to have this dependency for two reasons:

  1. It’s whole of server and not specific to WordPress (good in it’s own way, but not as useful as a dedicated WordPress backup)
  2. It doesn’t work when there’s more than one website on the server

In order to work around this, I turn to plugins.  We’re fortunate now that so many are available, including Vaultpress which is part of Automattic’s own Jetpack, but the one I’ve gone to over the years is UpdraftPlus.

It’s not the prettiest.  It’s definitely not that.  However, I’ve needed to use it in times of crisis and it’s worked.  Full back-up.  Full restore.  And it’s really fast too, with options for backing up remotely to Google Drive or Amazon S3.  I did once pay for the pro option, but to be honest, the free version seems to work just as well and I’m not sure if anyone needs the extra options, but hey, somebody must.

Essential plugins to complete the set-up

I’ve mentioned UpdraftPlus above to take care of back-ups, and although we could talk about plugins all day/week, there are a few I use now that helps to hold this rig together:

  1. Autoptimize – this has quickly become the defacto plugin to take care of minification of HTML, JS and Stylesheets; most importantly, this plugin is the one that most others try to play nicely with, since minify/combine has the potential to break the entire site.  Play with the settings here and test to optimise speed, especially the options regarding inlining.
  2. Nginx helper – this is installed by default with EasyEngine.  FastCGI is active for all caching methods (it’s like a cache on top of a cache) so select this within it’s settings…unless you use Redis.  In which case select Redis within its settings.  This provides a simple ‘Purge cache’ button in the admin toolbar.
  3. Redis object cache – this is installed when you switch on Redis cache, however, it still needs to be activated within its settings.
  4. WP Scripts and Styles Optimizer – for me, this is a real gem and I believe it to be the only plugin that does what it does, but do contact me if you know of any others.  From its options screen, this plugin will list every single enqueued css of js file within your WordPress installation and allow you to disable, filter (restrict by page, user etc), or defer to footer.  For non-devs, or anyone else that doesn’t want to wade through code in every WordPress folder, this is a godsend for optimisation, and allows you negate the Pagespeed rules regarding render-blocking CSS and JS.
  5. Wordfence – firewall and malware scanning to provide more local protection to WordPress, over and above security hardening carried out at server level
  6. WP-DBManager – the best database plugin out there.  Simple one click repair/optimise, and you can schedule them too, to keep the db nicely pruned.

Oh yes, the CDN.

This was a cop-out.  I do also use DNS Made Easy for much DNS stuff, but for this project it uses Cloudflare (free account).  I have found that speed suffers when routing through the Cloudflare platform, so decide if you really need a CDN.

Ta-da, ta-ra

That’s it, finally.  Total cost?

  • Vultr: $5-20 per month for a reasonable configuration able to power most small/medium sites
  • Staging: $0.17-$0.71 per day, for however long you need it, then kill the instance
  • Server-backups: $1 per month, worth having for extra peace of mind
  • EasyEngine: free
  • All plugins mentioned: free
  • Cloudflare: free

If you plan to give any of this a go and get stuck, don’t hesitate to give me a shout.