There is no doubt WordPress is the most often used content management system these days. For all its abilities, it comes with a few problems. Actually, they’re caused by overcomplicated themes rather than WordPress itself. Their complex design, multitude of features, brings along increased number of scripts, style sheets, and other resources. This all slows down your website considerably. Here’s how you can get some of the speed back.
1. Combine resource files
A modern website with fancy features typically makes over a hundred of so called HTTP requests. Each of the HTTP requests needs to be handled by your web server. The more HTTP request your website sends, the longer it takes for them to be processed. Combining those resources (mainly JS and CSS files) can reduce the number considerably. There is a great plugin for that called Autoptimize. Be careful though as combining JS/CSS/HTML can result in a broken website!
2. Use memcached-enabled caching
Operating memory is several times faster than a hard drive. Plugins such as WP-FFPC enable you to cache your website to operating memory, giving it a proper speed boost. Not all web hosting companies offer memcached as standard, I do (of course).
3. Set ‘expires headers’
Give your visitor’s web browser the chance to cache your website’s resources locally so that your visitor can enjoy a faster browsing experience! To achieve that, add the following code to your website’s .htaccess file and save it:
Feel free to adjust the expiration times as you see fit. These are only guideline values that will work for most of us.
4. Optimise images
Images can be found on almost every website. Serving your visitor full resolution images can slow down your page quite a bit. The bigger the image is, the more data your visitor’s web browser will have to download. It’s fine on high speed broadband lines but imagine someone waiting for a large image to load over a mobile network in the countryside. You can make it easier by serving scaled down images. There is no need to use a 2000 by 2000 pixel image that is displayed as 500 by 500 in the browser.
There are several ways to avoid large images. Either you do it in your favourite photo software, or install plugins such as EWWW Image Optimizer. This plugin resizes your images as you upload them to your website. You can also ‘batch’ process existing images in your Media Gallery.
5. Use a CDN (Content Delivery Network) service
A content delivery network is basically a set of servers running around the Globe, running copies of your website, serving them to the visitors from the server nearest to their location. It’s a great way to ensure everybody enjoys a fast website no matter where they are. Services like CloudFlare have different subscriptions, starting with free option. Even this free option gives your website incredible speed boost. And, as an extra benefit, if your web host’s server goes down, CloudFlare still displays your website as if everything was alright.
There are other ways to speed up things
There are a lot more ways to speed up your website but those may be out of your reach because they require adjusting web server’s configuration. Most web hosting companies won’t let you. With Quick Page Hosting, you are allowed to adjust several PHP variables, add custom directives to Apache server, etc. Having said that, this is not for the faint of heart…
Oh, if you want to check how your website scores in Google’s PageSpeed, and Yahoo’s YSlow tests, you can use GTMetrix to do just that.