Vroom, Vroom: A Comprehensive Guide To Speeding Up A WordPress Blog
MakeUseOf serves hundreds of thousands of visitors everyday, and we do it all on WordPress. WordPress can and does scale from tens to millions of pageviews, but you’re going to need some heavyweight plugins and strategies to increase performance at that level. Here’s a comprehensive list of things you can do to speed up your blog, and the plugins you can use to do it.
Switch hosting provider
I’ve explained before about the differences between types of hosting , but it boils down to this: shared hosting is very slow. If you’re still running on shared hosting, that is your greatest bottleneck. An incredibly fast virtual private server costs as little as $40/month, and not only gives you an instant speed boost, but allows you to implement server level customization’s to speed up WordPress even more.
Host external resources on a CDN
I’d suggest MaxCDN, which I personally use and is very cost effective – but to connect to WordPress side of things you’ll need a plugin to change your image and resource URLs to the URL of your CDN provider. w3 Total Cache handles this admirably if you’re looking at an all-in-one solution, but for CDN functionality alone, try these:
- WPSuperCache will be mentioned elsewhere; it includes CDN support with the addition of .
- WPBooster has a dedicated plugin, though the service pricing is far greater than a general CDN.
If you have large files (like music or PDFs) where speed isn’t essential, Amazon s3 is an even cheaper option to offload them from your server. It can also be used as a CDN, but isn’t as fast (Amazon also does a CDN called CloudFront you may wish to look at).
Minimize text files
Both can again be done with w3 Total Cache, or you can use the standalone JS&CSS Script Optimizer plugin. The only difficultly with minimization is ensuring the load order is correct; some scripts depend on others, so for example you’ll want jQuery right at the top, then perhaps jSON and jQuery UI, then finally your own theme scripts.
Change server software
Most of us understand Apache to be the “web server” software that most sites run on – but it’s certainly not the only web server software out there. NGINX is a faster alternative – we use it here at MakeUseOf. WordPress is able to run fine on NGINX, though you’ll need to read up on correctly configuring the site. There won’t be .htaccess rewrites anymore, for instance, which WordPress uses to make pretty permalinks – the same is achieved in NGINX config files. [Performance test graph from Joe Williams]
Memcached and APC are additional caching systems that you can install on your server – various caching plugins can then take advantage of this within WordPress, such as w3 Total Cache or WP SuperCache. However, beware that this is pretty advanced, and you may end up breaking your VPS if you do something wrong; be sure to do a full system image backup of your VPS before attempting these kind of adjustments – the same goes for NGINX. These changes are out of the scope of this article, but a Google search for “how to install memcached on mediatemple” or your host will do the job nicely.
Prevent false requests
CloudFlare is a wonderful free service we’ve talked about before and one of my essential installs on any new site. It acts as a quasi-CDN to cache some of your pages, and also places a firewall between your site and the incoming requests by replacing your hosts DNS. This means it can capture and prevent malicious scans, bots and such from ever reaching your site; freeing up your bandwidth for genuine users. Implementing this is as simple as changing the DNS settings; or if you’re hosting with MediaTemple, my favorite VPS provider who recently acquired the CloudFlare service, it’s a one-click setup in your account settings.
Make things static
Cut down on plugins
For instance, instead of having an entire plugin just to add some share buttons at the end of each post, open up the single.php template file and learn how to add them yourself. Instead of hosting your own image gallery, consider uploading Flickr then using widgets to display them.
Does this really help with speeding up WordPress? Yes – every plugin you have needs to read a set of options from the database each time it runs, all of which slow down the core page load times. The more things you can remove from this chain, or offload elsewhere entirely, the faster your blog can run.
I set out to provide a comprehensive overview of all the ways of speeding up a WordPress blog, and I’m pretty certain I’ve achieved that. If you think I’ve missed something, I’d love to hear from you in the comments. If you appreciate this post, please share it with your friends, and be sure to check out all our development focused articles.