Last updated on: March 18th, 2014
WordPress hosting comes in all shapes and sizes and there are lots of players in the market. Generally how things works is the more you pay for hosting the faster your site is. At least this has been my experience.
So a WordPress site hosted on GoDaddy or some other shared host is typically super slow. Where as a site hosted on WPEngine or another managed host are super fast. I’m going to show you how to get those super fast speeds on a cheap WordPress hosting plan.
I Feel the Need for Speed
We all know that adding CloudFlare can speed up your site. The way it works is CloudFlare acts as a proxy and stores all your images and other assets and serves them from a global content distribution network. The actual request for the page however still hits your hosting provider and has to be processed. On a cheap host this is usually the slow part. You can add a caching plugin and that can help a bit, but there’s actually a cooler trick you can use with CloudFlare to have your website’s page html be server from CloudFlare’s CDN making it blazing fast.
Here’s a video compares of 4 different hosting provider.
org = My live site hosted on WPEngine
cheap = GoDaddy’s Shared Hosting Plan
do = DigitalOcean’s $5 VPS
managed = GoDaddy’s Managed WordPress
As you can see the cheap GoDaddy hosting plan is the slowest, which is to be expected. All the other ones load just over 2 seconds.
Captain Prepare for Warp Speed
To speed things up on the cheap hosting we are going to use CloudFlare to host our pages html and completely bypass our cheap server. How do we do this?
We tell CloudFlare to ‘Cache Everything‘ and use ‘Page Rules‘ to bypass the cache for the WordPress admin section. You’ll need 3 pages rules to achieve this and that just happens to be how many come with the CloudFlare free plan.
Here’s how to set up the rules after your login to CloudFlare.
The 1st rule you want to add is to tell CloudFlare to bypass the wp-login.php page so you can log in.
The second rule tells CloudFlare to bypass the wp-admin.
The last rule tells CloudFlare to cache everything for 1 hour . You can set this higher.
Note the order this is import because rules are processed in order.
After you set this up you can then visit your site check to see if it’s being server from CloudFlare by checking the headers using Chrome’s Dev tools. This 1st time will likely be a miss, after that you should see a hit in the headers like this.
Congrats you now have a super fast site on a cheap host!
See the results:
As you can see the cheap GoDaddy hosting is now just as fast.
Whoa, Whoa, Whoa Stop the Clock
So this is great but now you are probably asking “What’s the catch?” We’ll you’re right there is one. So now that all your content is being cached what happens if someone adds a comment or something else changes on your site. We don’t want to have to keep going in and clearing CloudFlare’s cache.
No worries, the mighty WordPress plugin system comes to the rescue. Use Disqus to offload comments and this nifty plugin to automagically purge CloudFlare’s cache when you make a post or page change in WordPress.
Do not use this method for a WordPress e-commerce site since there are so many parts of the site that need to be dynamic. Also I’m not telling you to drop your awesome managed host in favor of this. But if the use case is right then this makes cheap hosting for WordPress site super fast!