It’s possible to make WordPress run blazingly fast whilst supporting thousands of simultaneous users. We’ve done it with www.rugbydata.com, a complex site which includes a large amount of pages – somewhere in the region of 500,000+.
We’re using a very low spec VPS (virtual private server) on RugbyData – a single core CPU and 1.5GB RAM is more than enough to support thousands of simultaneous users (on a properly configured VPS like you get with our Mercury Service). If you’re currently on shared hosting, my performance tuning tips below can’t really help you. For starters, you’re going to need Nginx instead of Apache and this simply isn’t offered on shared hosting.
Getting yourself a VPS needn’t be costly though – Digital Ocean have servers around the world – New York, San Francisco, London, Amsteram and Singapore – so you can spin up a VPS near your customers and their pricing starts at $5pcm for a 500MB VPS. The spec is actually quite decent with a 1GB ethernet connection and a solid state disk storing your data. Unlike other hosts who often take hours or days to get your VPS set up, Digital Ocean will have your server online within a minute or two.
Their offering is similar to Amazon who are the current king of cloud services, but Digital Ocean is far cheaper and the server you’ll get will be faster too because of the SSD setup.
If you use my affiliate link to sign up to Digital Ocean, you’ll get $10 worth of free credits, so you can have your first 2 months free, although I recommend you go for at least the 1GB server which costs slightly more at $10 per month. With this server you will be able to handle a LOT of traffic very fast either for a single high-capacity website or for dozens of smaller websites.
Sign up for Digital Ocean here
If you already have your own VPS, great. I prefer Ubuntu – but anything not Plesk or cPanel based is really required so you can install the required applications. To save hassle, get Ubuntu. If you’re going with Digital Ocean, there is an option at signup to choose the latest release of Ubuntu.
WordPress Performance Tuning Steps
If you’re having wordpress performance troubles, get in touch and we can sort them out for you. As a rough guide, here are the tuning steps we typically take to tune WordPress to the maximum speed possible:
- Test your current performance using www.blitz.io and the Screaming Frog spider tool
- Set up your VPS using Ubuntu
- Install & configure Nginx
- Install & set up WordPress including copying your site to your new VPS
- Install and set up W3 Total Cache
- Add your static content to Cloudflare – a fantastic and free CDN
- Test performance using www.blitz.io and the Screaming Frog spider tool
- (optionally) Set up memcached on another VPS
- (optionally) Set up Varnish in front of Nginx
The reasons the above steps work so well are multiple: Firstly, Nginx is far more lightweight when it comes to memory consumption. If you think of your own computer, when it runs low on memory the disk starts thrashing as it will use the hard disks instead of RAM. The same effect exists on servers, and with Apache, WordPress uses up a lot of memory per connection. This problem is vastly alleviated with Nginx giving a far more highly tuned WordPress as soon as you make the switch.
Still – reducing how much work your server has to do is important to get truly fast and scalable WordPress applications, so adding W3 Total Cache into the mix will really help. You’ll find with a combination of Nginx and W3 Total Cache that using Blitz.io to hammer your home page will already yield fantastic results in the thousands of simultaneous users and 200ms response times.
You can pre-bake the cache using W3 Total Cache and if your site is small enough, then this is highly recommended as this will mean Googlebot (the indexer which searches your site for content to display on Google) will get fast results. The faster results Googlebot gets, the higher the bonus your site gets to push it up search rankings (slow sites are penalised and pushed down Google rankings). If you have a huge site, it’s not going to be possible to store *everything* in your cache. That’s where a CDN can really help.
The biggest files your server will be transferring will be your images and your other static content such as .js and .css files. A typical WordPress site may have 40 – 100 of these kind of files. There are options in W3 Total Cache to condense these into one file and also to compress them, but ultimately you want to take this load away from your WordPress server and put it on a CDN. Cloudflare offer an excellent CDN solution – it integrates with W3 Total Cache well and then all your static content is served up directly from a server designed for serving up static content quickly leaving your own VPS to process PHP and serve up cached HTML.
The options for even more WordPress performance after this are memcached, Varnish, scaling up your VPS to a dedicated server and then ultimately scaling out. If you need this level of tuning, you should have the money to spend since your website is clearly flying.
Check out our fixed price WordPress development options or request a quote.
Wordpress on cloud
July 22, 2016 @ 10:09 am
Have you ever configured Mercury configuration on a Upcloud server ? They say they have faster servers than digital ocean and AWS. I’m hesitating to try them.
Would you be able to provide me with your Mercury installation service if I get their plan ?
Thanks for your answer,
July 26, 2016 @ 12:00 pm
Can they provide Ubuntu 14.04?
September 14, 2017 @ 6:51 pm
Awesome blog post, I’m also an avid user of Digital Ocean.
September 14, 2017 @ 6:53 pm
Thanks – Digital Ocean are great – fast servers deployed in 55 seconds. Plus server snapshots and SSD disks are great.