Roughly 4 years ago, Google announced page load speed as a SEO ranking factor. Since then, webmasters around the world have been contriving new ways to keep their load times down. In this article, I’m going to provide a collection of these practices to help you speed up your WordPress site.
Before you start implementing any of the tips I’m about to list, it’s important that you know the current speed of your WordPress site. This will allow you to accurately compare the before/after results when testing the new plugins and steps listed. My favorite tool for this is Pingdom, but there are others to choose from.
Here’s a collection of 16 of the best tips and methods for speeding up your WordPress site:
1. Replace High-Load Plugins with Low-Load Alternatives
Using Pingdom, you can analyze each of your page’s requests, and see exactly which elements of your website have high download times. With this information, you can find out which plugins have an unreasonable load time, and switch them out for faster alternatives.
After all, there are a 101 plugins available for each function—it’s only a matter of finding the best option.
2. Install W3 Total Cache
W3 Total Cache is by far the best caching plugin for WordPress. I find it much more functional, feature-filled, and straightforward than its arch rival—WP Super Cache.
However, just installing and activating the plugin isn’t enough—you’ll need to configure each setting for maximum load time gains.
Here are my configuration recommendations:
- Enable page caching via disk: enhanced. This caches your website in visitors’ browsers.
- Enable database cache—you’ll have to set your wp-config.php as writeable for this.
- Enable object cache via disk.
Leave everything else on default.
You’ll also get options to easily integrate CloudFlare and a CDN, but we’ll look at those 2 later on in this post.
Although images are powerful tools when it comes to blogging and marketing—all forms of multimedia take up quite a bit of space on your server, and can even be responsible for high load times.
A fix is to compress each image before uploading it.
WP Smush.it makes image compression simple. Just install and run it, and the plugin will automatically compress every image you’ve ever uploaded (note: it’ll take quite a bit of time, depending on how many images you have).
After compressing your image database, deactivate the plugin. I’ve heard that the plugin itself, when left activated and unused, significantly increases page load time.
You should regularly re-activate the plugin and compress your database.
Most prolific bloggers have huge libraries of trashed posts, spam comments, post revisions, and stale drafts that they don’t plan on using. While none of these cause a significant increase in download time, remember that every bit counts when it comes to optimizing WordPress for speed.
WP-Optimize takes care of all disorganized databases, deleting unused content in just a few seconds.
Autoptimize does a lot of behind the scenes action that will leave your visitors wondering how your site sped up so fast.
6. Deactivate and Delete All Unused Plugins
Every plugin you upload adds another time-consuming request to your server—no matter how internally lightweight it claims to be. If you have a large storage of plugins that once seemed great, but are now unused or irrelevant to your website, get rid of them!
Additionally, don’t just deactivate unemployed plugins—delete them and get them out of your database entirely.
7. Specify Image Dimensions
In the HTML view of your WordPress post editor, find the code that’s responsible for displaying your images (search for the <img> tag), and make sure that image dimensions are specified within it, for example, width=”600″ height=”400.”
When you do this, the front-end browser doesn’t have to figure things out for itself, eliminating an additional request.
8. WordPress-Managed Hosting Providers
Let’s get things straight: shared hosting from non-WordPress-specific hosting isn’t going to give you ideal speed. Going with a managed WordPress hosting provider like WP Engine gets you the fastest speeds possible. Case study after case study reveal this undeniable truth.
However, it’s expensive, so you need to analyze your website income and make a commitment according to whether or not the increased speed will compensate for the additional cost. It’s all about the bottom line.
9. Utilize Gzip Compression
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
10. BJ Lazy Load
When you lazy load your images, images only load when visitors scroll down to view them. It saves time on your initial load. BJ Lazy Load is the most popular image lazy load solution with a 4.6 rating on WordPress.
An example website that uses lazy load is Bloggingtips.com.
11. JPGs Instead of PNGs
Since JPGs don’t support transparency, they are noticeably smaller in size than their contemporaries, the transparency-enabled PNGs. Whenever a transparent background isn’t required, convert the image to a .jpg before uploading it to WordPress.
12. Setup CloudFlare
On CloudFlare’s front page, you can see a rather bold claim that by using their service, you’ll “supercharge” your website in just five minutes. Frankly, they do just that.
Although CloudFlare is primarily meant to help cover the security of your website, it goes a long way towards higher page load speeds as well.
After signing up for a free CloudFlare account (takes no more than a few seconds), you simply enter in your domain name. CloudFlare’s server will then can your DNS records (the process takes 30 seconds), and allow you to verify them.
Lastly, you’ll have to change the nameservers your domain points to CloudFlare’s (they will provide you with the IDs).
12. Invest in a CDN
The Internet is global—no matter where you are, you can access any and every website.
But that’s where a problem occurs.
Suppose that the server your website is hosted with is located in the United States, but you get quite a bit of traffic from the U.K. and the rest of Europe. Since the content is thousands of miles away, your page load speed for Europeans will be significantly lower than your speed for U.S. based visitors.
The solution? A content delivery network (CDN).
In essence, a CDN creates copies of your website and hosts them on various servers throughout the world. So, for example, you might get servers for your content in India, Spain, Nigeria, the U.S., and China (in reality many more locations). So the next time someone tries to access your website from the U.K., instead of the browser having to send a request all the way to the U.S., the request instead goes to the much closer server in Spain.
The result: page load time decrease.
Most CDNs cost money—anywhere from 2-to-5 figures monthly. For the common webmaster without the massive monthly budgets (or need) for a top-level CDN, MaxCDN is probably the most popular choice. It features affordable pricing, great support, and flexible options. (Alternatively, here’s a top ten list of the best CDNs).
Alternatively, there a number of free CDNs—CloudFlare’s, for example. If you really can’t afford the rather low $10/month plan MaxCDN offers, then CloudFlare is the way to go.
13. CSS Goes on the Top and . . .
The style.css of your WordPress theme should always be placed in the head of your document. This turns your website into a blank white page as it loads. Instead of the browser trying to draw and redraw the different design elements of a specific page, the stylesheet just has to render once.
15. Flash is a No-No
Yes, Adobe Flash used to be all the rage, but that was years ago. Flash just isn’t right for the modern-day browser anymore. Not only does it slow down your website speed, but remember that Google spiders can’t read content that’s embedded in Flash. Using Flash on your website is a lose-lose in terms of SEO.
16. Lose the Redirects
If you make a habit of sending users over to links that redirect to other links (e.g. if torquemag.io/redirect-1 goes to torquemag.io/redirect-2) then you’re just increasing the number of requests that the front-end user’s browser has to make.
In short, avoid hyperlinking to URLs that you know will redirect to others.
Optimizing your website for best performance should be one of your main priorities.
Which tip are you going to implement first?