WordPress Hosting and High Speed WordPress
Ivan Bjelajac
Company and Product builder ?? Experienced tech executive and solutions architect. Recovering ex-CEO and perennial PR risk. Pet friendly.
A one second delay in load time decreases conversions by 7%! You probably read something like this in the past.
Is this a myth? Should we call mythbusters?.
It really is true. A slow website can have extraordinary effect on your business. And by extraordinary I mean extraordinarily bad.
We had our own experience with this. On Monday, Sep 15th 2014, just a few days after I returned from my vacation, we deployed our new high availability setup based on HAProxy doing load balancing between ManageWP.com servers that worked in an active-active cluster.
It was supposed to make us faster and more reliable but because of a glitch in our network setup, pages on ManageWP.com were opening about 4 seconds longer than usual.
More precisely metric known as ‘time to first byte’ was affected (basically time before your browser receives and starts rendering any content from the moment you visit a site).
Saying “4 seconds slower” maybe does not sound like much but we lost nearly 50% traffic that day. I was genuinely shocked and surprised to learn that. Here are some screenshots to illustrate that.
We fixed the issue and our traffic went back to the old level almost instantly.
There are several tools you can use to measure website speed.
Most common and really good ones are webpagetest.org and tools.pingdom.com
These tools are great because they will give you a relatively accurate assessment of the situation you are in and also some pointers about how to fix the issue.
This is an example of how my personal blog measures on one of these:
In the mean time I decided to shut down ivanbjelajac.com considering my LindedIn Profile has more views.
If you check these websites you will be able to see that you can get extensive info about the performance of your page.
This can help you pinpoint the issue of website speed to your Hosting provider (is the DNS slow, are you running on oversold servers or are database responses sluggish) , your network connection, WordPress setup (such as your theme or plugins you are using).
How did I accomplish a load time under 400ms?
First of all I am using the latest HHVM alongside MariaDB MySQL drop-in to achieve this.
Both HHVM and MariaDB are currently considered top of its field when it comes to running fast WordPress setups.
HHVM and PHP7 are currently involved in a speed battle. You will notice a lot of reviews on HHVM and PHP7 on the Internet are just copied over from the same resource - PHP7 development blog post.
OpenLiteSpeed ran a test of their own and this was their conclusion:
“For the WordPress test, HHVM beats PHP 7, running up to 7% faster. If we recall HHVM’s reported lockdown results, HHVM claimed to be 18.7% faster on a WordPress workload. We can endorse :HHVM’s faster performance; however, we did not experience as much as 18%.”
Results we ran in-house here at ManageWP were similar.
For caching I am using Varnish and Memcache, with some custom modifications in order to avoid a big caching issue - which is caching WP admin.
All caching is realized in three separate stages.
First being the Varnish HTTP Cache, which covers the entire content and which is used most of the time.
Largest performance impacts are naturally made by configuring Varnish properly. The reason why this is true is because Varnis
h single-handedly eases the stress put on by client requests on: PHP engine, database, and last but not least - the filesystem.
As a second line of caching we have Memcached which in conjuction with a customized WP object cache helps speed up the WP admin interface easing the pressure off the database.
In the last line of caching stands the MariaDB's query cache, minimizing the chance of needing to run queries on the database itself.
Varnish lets us show most of our content really fast to our users and works really great with our CDN setup which saves us bandwidth and adds additional speed.
CDN in use is MaxCDN and I usde CloudFlare for DNS management. CloudFlare DNS service is fast and reliable and many web hosting providers actually have issues because of slow First Byte Time we mentioned at the beginning of this talk.
Theme running on ivanbjelajac.com is also really fast. It is a free theme called Modern and you can download it from the WordPress.org Theme Directory. It is free, responsive and retina ready (and all other buzzwords) so it is really a great option for a personal website.
This entire setup is running on one 10 USD/Mo Linode VPS without any issues and I am quite happy with our cooperation with Linode so far.