Updated Guide: How to Fix a Slow WordPress Website
UPDATE TO THIS POST (January 2019): We released this guide over 8 years ago. Since then, we’ve updated it regularly with the latest information on WordPress speed optimization.
When we first released this guide we got dozens of emails each month asking for help with WordPress speed problems and fixing slow WordPress websites so we ended up creating a service to address that problem - WP Speed Fix. Since launched we’ve worked on well over 2000 websites.
In this guide, I’m going to give you a checklist of the most important steps you can take to speed up your site in the order you should tackle them. It's a cut down version of how we fix slow WordPress websites.
Then we’ll get deep into the details further down the page. Whether you’re a tech newbie or you’ve done this a few times before, you’ll find an answer to your question of, "How do I fix my slow WordPress website?"
There is a lot of troubleshooting you can do to speed up your WordPress site and you can burn days of time tweaking and messing with it, but the majority of WordPress issues usually come down to poor quality web hosting or hosting-related problems so that’s probably the first place you should start.
1. Use high quality website hosting (i.e. get rid of your bargain basement hosting)
Get rid of the $3 or $5/month hosting - with hosting you get what you pay for. A high quality webhost with HTTP2 protocol support will make a world of difference. Trying to optimize $5/month hosting is like putting lipstick on a pig.
Fast WordPress Hosts we recommend are:
WPX Hosting - fantastic balance of speed vs price with data centers in the US and UK
Cloudways - a new-ish provider offering dedicated VPS servers on a speed optimized server stack which means lightning fast speeds (see our Fastest WordPress Hosting article for more detail)
**If you sign up to Cloudways, use the coupon code FASTHOSTING for $25 off your first invoice
WPEngine - more expensive BUT better if you’re not a DIY-er and have a site that’s making plenty of $$$ (also has a bunch of other awesome features over and above WPX like staging areas, snapshot backups and a handful of other features)
Siteground - the absolute minimum entry point, it’s cheap, passable from a speed perspective and a much better option that Bluehost, Hostgator, Godaddy and other cheap hosts
WPAlpha.com - this is our own hosting product designed specifically for Australian small businesses with maintenance and patching included.
Hosts we know for 100% are slow and that will cause you problems are:
- Any host that is part of EIG
- Melbourne IT
….these guys all make money by stacking 10,000 other sites on the same server which leads to slow, unreliable hosting.
***KEY POINT HERE - make sure you host your site in the country where the bulk of your visitors or customers are. Typically the site will be 1+ second slower outside the country it is hosted in. We’re based in Australia and it’s extremely common for businesses we work with to be hosted in the US which ultimately causes the site to load slowly in Australia.
Why Hosting Is So Important:
Hosting is the foundational component of everything you do online. Your SEO and Google rankings, your Adwords and Facebook ads, and the enquiries, calls and emails your site generates are all tied to the quality of your hosting.
Faster, more reliable hosting will easily pay for itself in the form of more enquiries, calls and sales coming through your website.
If your website is your main source of revenue, then it makes sense to pay for the best hosting you can get, because it’s going to have a direct impact on how much money your business makes.
It’s not just speed that’s important, the quality of your host is critical! Cheap hosts are horrible in terms of uptime and if you run uptime monitoring on your site (try http://uptimerobot.com, free plan available) you’ll likely see multiple outages each day on cheap hosts.
This is the perfect example of spending money to make money, and if you want to make a lot of money, you’re not going to do it when you’re spending $5 a month on your hosting.
A Note on VPS Hosting:
Some common advice you’ll see around the web is that if you want a high performance site you should run your site on a VPS, but this isn’t necessarily a good idea.
Yes, a VPS has more raw server power than a regular hosting account, but server power accounts for only 25% of total performance. Server configuration is significantly more important, and unless you’re a server specialist, you’re not going to have the skills or knowledge to optimize your server to a higher standard than that of a managed WordPress hosting provider.
This is one of the reasons why we LOVE Cloudways - you get the power of a dedicated server AND the configuration is built and optimized for speed.
Quite often the cheap hosts in the list above (eg Hostgator and Bluehost) will upsell you/upgrade you to a dedicated VPS host but the problem here is that you're still on a poor quality, oversubscribed host. It's like buying the premium option in the 2 dollar store, it might be their premium product but you're still in the 2 dollar store!
2. Use caching (a must-do for WordPress)
A key component of getting WordPress to run fast is to use caching. Caching prebuilds each page on your site so all the thinking and processing required to serve the page to the visitor is done before they request the page from your web server.
WP Rocket is the caching plugin of choice for the DIY-er or if you're less tech savvy. It's easy to use and will give you an excellent boost in performance. It’s a paid plugin (dirt cheap) BUT probably the easiest caching plugin to use on the market.
W3 Total Cache is free and by far the fastest caching plugin BUT is very technical to configure so probably not ideal for the DIYer - unless you know what you're doing there's a reasonable chance you'll break your site. If you do use it only enable the Browser and Page Caching options. If you're a developer reading this, one huge win is to get Memcached installed/enabled on your server and enable Database and Object caching in W3TC and you'll see a huge performance boost on database heavy operations, especially in the backend (also a must-do for Woocommerce speed optimization)
NEVER install two caching plugins as that's just asking for trouble (a very common issue we see) AND make sure before messing with caching you have a backup (we only use Blogvault, it's by far the best) and you have Cpanel and/or FTP access to the site as maybe in 1 in 100 sites the caching plugin will be incompatible with something and take down the site (again use WP Rocket if you're not tech savvy). CPanel/FTP access will allow you to revert the changes in case you do break something.
3. Use Cloudflare and/or a Content Delivery Network (CDN)
Cloudflare.com is a service that sits in front of your website hosting and from a speed perspective is like magic!
They’re the fastest DNS hosting provider in the world (see http://dnsperf.com), they’re a content delivery network (CDN) and website acceleration service AND for 7 out of 10 websites we work on, the free plan is all you need. Because it’s a CDN it will significantly speed up your website for your international visitors.
A lot of hosting has Cloudflare functionality built-in into it with an option in the Cpanel - if you have that then turn it on.
In some cases, typically in bigger companies where IT policy dictates which providers you use, you may not be able to use Cloudflare. If you're serving big files like PDFs, MP3s, videos and podcasts they you may need a full CDN.
What is a content delivery network?
A CDN (content delivery network) is a network of servers around the world that host part of your website and associated files. A CDN is especially important for sites that serve an international audience, as the CDN servers will often be closer to the visitor than the web-hosting and therefore faster, and sites that have big traffic spikes as the CDN servers will absorb most of that traffic.
The CDN service we recommend is KeyCDN they provide excellent performance at a great price.
4. Compress Your Images
Compress the images on your site using lossless compression (which creates smaller files sizes with no reduction in image quality). We've tried pretty much all the image compression plugins on the market and right now we're loving ShortPixel (they have a FREE plan so you can give them a try with zero cost)
Often images used on your site can be compressed by 20 to 50% with no impact on the quality. This can easily cut 1 to 2 seconds off the load time of a page and make a huge difference to performance. This might not sound like a lot, but it can be the difference between someone taking the action you want them to, and losing their patience and clicking away from the site.
Make sure you use LOSSLESS compression and NOT lossy compression, here’s the difference:
Lossless = smaller file size, same quality image (great!)
Lossy = slight smaller file size, less image quality (bad for business)
We never want to sacrifice the quality of our images for a marginal speed gain. Our approach to website speed is always a marketing first/commercial first approach and lossy images hurt out marketing.
Often images can be compressed by 20 to 50%, which can easily cut 1 to 2 seconds off the load time of a page.
ShortPixel has some more advanced image optimization versus other plugins so you'll generally get a better result. Click here or the image below for their quick optimization test which will tell you approximately how much smaller your page size will be after image optimization.
5. Switch to HTTPS (versus HTTP) to take advantage of HTTP2 Protocol
When your site is running in HTTPS mode (encrypted) your web browser software will use the newer HTTP2 protocol (so long as your host supports it) which is significantly faster than the older HTTP 1.1 protocol.
Click play on the video below and you’ll see the speed difference between the two. Important note, your host needs to support HTTP2 and most cheap hosts don’t, use THIS TOOL to check your host for compatibility.
Contrary to a lot of things you’ll read around the web, HTTPS will not slow your site down if your host if HTTP2 compatible. Cloudflare also has a feature called 0RTT (zero round trip time) which speeds up the HTTPS encryption negotiation even further!
6. Use PHP 7 instead of PHP 5.6 (30% speed increase)
PHP is the underlying programming framework or language that WordPress runs on. PHP 7 is the latest version and was released at the end of 2015 and it’s 2-3 times faster than the version before it, version 5.6 (version 6 was skipped). Switching from v5.6 to version 7.0 equates to roughly a 30% overall load speed increase on your site and moving to 7.1 or 7.2 (from 7.0) can give you another 5-20% speed boost.
For most hosts you can make the switch in your hosting Cpanel. If you’re unsure, log a ticket with your hosting provider and they should be able to help.
IMPORTANT - if you have an older website it’s important to test PHP7 compatibility first, WPEngine provide a free PHP7 compatibility tester plugin you can use on any website, click here to download the PHP7 Compatibility Check Plugin.
7. Disable any plugins you’re not using
This is especially important for older sites - take an inventory of the plugins you’re using and disable or delete any that you’re no longer using. Less plugins is better from a speed perspective.
Be mindful of plugins that load elements from third party sites for example Sumo.com and Leadpages. Plugins that insert analytics codes, livechat code or remarketing code can also be very heavy from a speed perspective. Using Google Tag Manager (google.com/tagmanager) is generally a better way to insert tracking codes if speed is your priority.
Other Potential Fixes
Below we are going to dig into each of these solutions in detail. It’s amazing how often the same problems crop up for WordPress sites, so try out the common troubleshooting steps listed.
You might get lucky with an easy fix, and you’ll save yourself a lot of time, energy and money tackling these before you go looking for something much more complex.
Before making any changes, make sure you do a baseline speed test using tools.pingdom.com so that you have a baseline to work from. As a general rule, the site load speed needs to be under 5 seconds: 3 seconds is fast enough, and around 1 second is ideal.
Let Us Fix It For You
If you're still stuck after all of these options (or don’t want the headache of handling it all yourself), check out our WP Speed Fix service. For $179 we’ll fix your WordPress speed problems or we’ll give you your money back.
We’ll do a full back-up of your site, diagnose the root cause of your problem, explain it all to you in plain English, and then get it fixed immediately. The whole process is handled in 3 to 5 business days, so that you’re straight up and running faster than ever before.
Alright. Let’s get into the weeds for each of these solutions so you can start troubleshooting the problems with your slow WordPress website.
More On Cloudflare & Faster Web Hosting
Most WordPress websites are hosted on a cheap hosting provider that stacks ten thousand other websites on top of each other on the same server. This means that all the websites are competing for CPU power and server resources.
Unsurprisingly, this makes your site slow, especially when you start having more than a few people visit your site at once. Overloading servers is the only way hosting companies can make any money on those cheap $5/month plans.
The Number 1 Priority to fix your WordPress speed issues is to set up Cloudflare (a caching and acceleration service) and move your site to WPEngine (here's our WPE review) or WPX Hosting. These are two high-performance, managed WordPress hosting providers.
(And if you're in Australia then check out our Australian Based Managed WP Hosting.)
Let me be straight with you here: If you’re being a tight-arse and spending $5 a month on hosting, your site is absolutely going to run slowly.
It will annoy your customers and cost you money. For most WordPress sites, moving to managed WP host will bring your site load time down to 1-3 seconds, immediately, and save you all the stress and hassle of having an underperforming website!
Why Good Hosting is Important…
Hosting is the foundational component of everything you do with your website. Better hosting means a faster, more reliable website. That means that your SEO, Adwords and traffic generation efforts will drive more new visitors with higher engagement (faster site = better SEO rankings; faster site = customers more likely to stick around).
Because the user experience is better, better hosting will also normally improve your conversion rate slightly too (better customer experience = more likely to buy from you).
So yes, good hosting does cost more than the ‘bargain bin’ hosting most sites run on. But if you’re running a business off that WordPress site, then better hosting WILL more than pay for the additional cost.
If you have a tight budget, then the best option is to go with WPX Hosting. While we prefer and recommend WPEngine, it is is a locked environment that doesn’t allow some custom coding and plugins. WPX does allow customisation, so while the majority of our sites are with WPEngine, we have a handful of custom sites hosted with WPX.
Both are good options if you’re taking your business more seriously and need the additional speed and support.
If you have an Australian or NZ business, then I’d like to invite you to check out our managed WordPress hosting. All our servers are based in Sydney, and were built to provide the fastest possible load time on all our hosted sites.
We've combined multiple technologies from cutting edge vendors such as Cloudflare, MaxCDN and WPEngine to ensure your website loads lightning fast, not just in Australia, but worldwide. Websites hosted on our platform can handle thousands of visitors at once AND have rock solid reliability.
The hosting is configured to be friendly to search engines and comes with plugins that help you to rank better, and includes regular WordPress maintenance. Check it out here.
Once you’ve got your hosting sorted out, it’s time to add Cloudflare into the mix.
Why Use Cloudflare?
Even if you’re using hosting that’s total rubbish, Cloudflare can often cut load times in half. Here’s how it helps with your WordPress speed:
- Cloudflare takes over your DNS hosting. There are 4 parts to common business hosting: Your domain name, DNS hosting, email hosting and web hosting. Often slow DNS hosting (the system that ‘calls’ your website up when someone types it into the URL bar) manifests itself as slow website load times. Cheap hosting companies usually have extremely slow DNS hosting, to the point where DNS lookups often fail, adding precious seconds onto your load time. Cloudflare is one of the top 10 fastest DNS hosts worldwide and in almost all cases moving DNS hosting there will speed up your site.
- Cloudflare does acceleration and optimisation. These acceleration and optimisation features reduce the size of your site, help it load faster and help it render faster (so the visitor feels a speed increase).
- Cloudflare is a type of content delivery network. Cloudflare is a CDN (content delivery network) which means your content is distributed across hundreds of servers. This reduces the load on your web host and means that some of the files that make up your website are loaded on servers much closer to the visitor. This means that is less latency (distance for the information to travel) when someone loads a page, which again, results in a much faster load time. Loading files from the CDN also bypasses your web server, which cuts slow hosting out of the picture for some files.
Note that this is a different type of CDN to what WPEngine and some hosting providers offer. You should use both, but don’t use Cloudflare caching on third party CDN hostnames.
As I mentioned, Cloudflare also takes over your DNS hosting. There are two distinct issues with slow sites — either the site itself is overloaded and slow, or the DNS hosting and DNS lookups (at the hosting servers) are slow.
Usually it’s the DNS that’s the issue, and as long as you’re on poor quality hosting, it’s out of your control. This is why I’m so adamant about using Cloudflare — even if you stay on your cheap hosting, it can drastically increase the performance of your site.
(Of course, I also think you should get better hosting so that you don’t get stuck in a bad situation when their servers inevitably crash.)
Cloudflare is also free, so there’s really no reason not to use it.
If you’ve never heard of Cloudflare before this article, here’s a quick video explanation:
Other Common Issues
Usually we recommend troubleshooting in two parts:
- Identify the root cause of slow loading and fix that first.
- Implement best WordPress practices to ensure the site is as fast and reliable as possible.
Before we get to work on a client site, we run the site through tools.pingdom.com to get an independent speed test. This gives us a feel for load times and lets us see which files are being loaded and what their sizes are.
This sets our baseline speed so we can see whether the changes we’re implementing are having a positive or negative impact. Often this speed test will uncover the root cause of the problem and we can then easily resolve it.
We also run the site through the w3c validator to make sure there are no major coding errors – occasionally we’ll find some big problems here which are easy fixes if you know what you’re looking for.
Once you’ve fixed your hosting and added Cloudflare, you can work through this troubleshooting checklist.
- Install a caching plugin: If you’re not going to upgrade to WPEngine then at least install the WP Rocket Caching plugin. At a minimum, this adds some basic browser caching optimisations and compression.
- Review your code in more detail: The root cause of slow load times could be a code issue. This happens when the code is inconsistent and refers to two different forms of the URL (www.domain.com and domain.com), which causes unnecessary redirects to be fired. The code should consistently use www.domain.com or domain.com (whatever is the default for the site) and not a mix. It’s a small thing but it can make a surprisingly large difference.
- Check the bandwidth consistency and reliability of your hosting provider: When troubleshooting a WordPress speed problem, I’ll often upload a bigger file to the site (say a 50 or 100mb zip file) and then download it through the web browser. If the file is slow to download on a fast internet connection then it may not be a WordPress performance issue. It’s more likely to be an issue with the available bandwidth your hosting provider has available. This is where services like WPEngine come into their own, and I can’t emphasise enough that moving your hosting to a site like this is the best investment you can make in your site’s success.
- Review the hosting performance stats: As I mentioned earlier, your site could be hitting the CPU limits on its hosting account. It could either be sucking down too much bandwidth,the website host could be way oversubscribed, or if the hosting company is overseas, it could just have high latency (ping times) in your location. Cloudflare will fix a lot of problems with cheap hosting companies (as their servers take some of the load from your hosting) but if the CPU is being throttled by your hosting company then the site will feel like it hangs regularly. Usually if you have the C-Panel logon, you can review CPU and memory usage under the performance report section.
Test your plugin load speed using the P3 Profiler plugin: this plugin will help identify speed issues that are caused by plugins.
Use The WP Speed Fix Service — We'll Fix Your Site or Your Money Back
You’ve probably ended up on this page because you were looking for solutions on Google to fix your slow WordPress website.
Rather than waste time fiddling with your site yourself and potentially breaking things, let us do it for you.
Our WP Speed Fix Service is $179USD – we’ll fix your WordPress speed issues or we’ll give you your money back.
We’ll do it quickly, too. It usually only takes us 3 to 5 business days to fix everything and have your site running like new.
Here’s what we’ll do for you:
- Run through our troubleshooting checklist to identify the root cause of your WordPress speed problem
- Compress all images on your site using lossless compression (so they load as fast as possible without taking up so much storage)
- Review your plugins and troubleshoot speed issues as required
- Check your code and fix any bugs in it that are causing your site to load slowly
- Setup Cloudflare and migrate your DNS hosting for you (optional but recommended)
- Migrate your site to a new host (if required)
- Correctly configure WordPress caching (if appropriate)
- Provide before and after load time reports
Remember that your hosting is the foundational component of everything you do online. Your SEO and Google rankings, your Adwords and Facebook ads and all the leads that comes through your website are tied to the speed and user experience of your website. Faster, more reliable hosting will easily pay for itself in the form of more enquiries, calls and sales.
Want to make sure your site loads as fast as possible?