A slow WordPress website is bad for business! You may have great content, an amazing product, and a beautiful design but if the site takes forever to load, your visitors will bail on you.
We live in the era of instant gratification. We don’t like waiting for anything. We don’t like waiting in line at the counter, stop lights, restaurants and the same applies to websites!
On the other hand, a fast loading website can engage visitors and keep them surfing through your pages. Google also considers page speed as a ranking factor when delivering results for desktop users and, as of July 2018, mobile users as well. You can read more about Google’s latest “Speed Update” in this post on the Official Google Webmaster blog.
Creating an optimized WordPress site is not a simple task. Many different parts of the project need to come together.
That’s why fixing a slow website is not always straightforward.
Without further introductions, I have outlined our troubleshooting tips into three sections:
Hosting Related Issues:
Website Related Issues:
- Malware Infection
- Outdated Software
- Heavy Theme
- Too Many Plugins
- Conflicting Plugins
- Theme and Plugin Bugs
- Database Optimization
- Minification & Concatenation
- External HTTP Requests
Content Related Issues:
Now, some of the listed points may not apply to your website. Simply take your take time, and work through the list crossing off points as you progress through the guide.
As a side note, we wrote a shorter and similar article about fixing slow WooCommerce sites and if you don’t have time to play detective with your website, we also offer a paid speed optimization service.
The first step when debugging a slow website is to run a speed test. Here are some of the best websites:
ByteCheck is a simple tool that measures the Time To First Byte (TTFB).
TTFB measures the duration from the user’s browser making an HTTP request to the first byte being returned from the server.
TTFB is a helpful indicator when assessing if your site is hosted on a slow server. Ideally, the first responsive should be returned in approximately 500ms.
Pingdom is one of the most popular speed testing tools and our favorite. The software provides important performance metrics and a waterfall analysis of your website.
The waterfall analysis is a chronological list (ordered by load order) of your website’s assets. It’s a wonderful overview that can help you identify any assets that may be slowing down your site.
Another cool service is GTmetrix. In addition to performance metrics and waterfall analysis, GTmetrix presents a list of recommendations to improve your site’s page speed.
4. PageSpeed Insights
Hosting Related Issues
1. Slow Server
Even if your website is perfectly optimized – a slow server will, naturally, slow your site down.
The quickest way to determine if your website is hosted on a sleepy server is to measure the Time To First Byte (TTFB).
If your server takes too long to respond, you may want to proactively look for an alternative hosting provider.
2. Server Location
If your website’s main audience is in Australia, but your website is hosted in the United States, then your website is hosted on the wrong side of the planet! Just think about the distance that needs to be covered to get a response from the server!
Try to book a hosting account that operates as close as possible to your audience.
3. PHP Version
As outlined in the official documentation, WordPress recommends hosting providers to run:
- PHP version 7.2 or greater.
- MySQL version 5.6 or greater.
Legacy versions of PHP may cause conflicts with some of your plugins and may expose your site to security vulnerabilities.
To update your PHP version, login into your cPanel account and look for the PHP Version Manager icon.
CDN stands for Content Delivery Network.
A CDN is a network of servers that are strategically located across the globe with the purpose of accelerating the delivery of your static web content such as your images, CSS and JS files.
We recommend the services of content delivery networks to webmasters who operate a website with an international audience. At Fixmysite.com, since our visitors come from all corners of the world, we use KeyCDN.com. Here is a short article about integrating KeyCDN with the popular WP Rocket caching plugin.
Website Related Issues
5. Malware Infection
When a WordPress installation gets hacked, the website really starts to slow down and act buggy.
Common indications that a site may be hacked include:
- Slow to load
- Unable to access the WordPress admin dashboard
- Strange error notifications
- Spammy redirects
- Spammy ads
- JS Coin miner anti-virus warning
- High server usage
If you notice any of the above symptoms on your website, install one of the following malware scanner plugins.
If your site is hacked, don’t panic, just work your way through this guide on removing malware from WordPress.
6. Outdated Software
For your WordPress website to work correctly, you need to regularly update your themes, plugins and the WordPress core. If you haven’t updated your site in a while, there is a good chance that you are running outdated software that’s slowing your site down.
Sometimes, all it takes to fix a slow website is pressing the update button!
7. Heavy Theme
Most popular themes are well coded and thoroughly tested.
No one wants to change themes, but if you are stuck with a slow one, you may want to consider upgrading to a lightweight theme. Check out StudioPress.com. They are well known to develop some of the most reliable and fastest themes on the net!
8. Too Many Plugins
Let’s take the example of the personal computer. When you install a number of games and software on your machine, doesn’t it start to slow down?
The same concept applies to your WordPress website. The more active plugins you have on your site, the more processing power is needed to render your website. As a general rule of thumb, the fewer plugins – the better off you are.
Another approach to debugging your plugins is to locate the plugin that’s dragging your load time.
One way to go about that is to install P3 Plugin Profiler.
P3 Plugin Profiler creates a profile of your WordPress site’s plugins’ performance by measuring their impact on your site’s load time.
9. Conflicting Plugins
Based on our experience troubleshooting websites, we sometimes see clients with two to three plugins installed that do exactly the same thing.
Most common is to see conflicting speed optimization (caching) plugins.
So if you have more than one caching plugin installed on your site, de-activate one or the other.
10. Theme and Plugin Bugs
If you find yourself running into a 500 internal server error, there is a good chance that either your theme or one of your plugins has a bug!
Thankfully, debugging in WordPress is pretty straightforward.
FTP into your installation’s root directory and locate the wp-config.php file.
Download the file and locate the following line:
define( 'WP_DEBUG', false );
And replace it with:
This will enable WordPress’s built in debugging feature!
Then open the “wp-content” folder and you will notice a new file called “debug.log”. The log will list all your installation’s PHP errors. From there you can assess which plugin or theme needs to deleted or replaced.
11. Optimize Database
As time goes by, your database will probably start filling with content that you no longer need. To improve your site’s performance, you can optimize your database by deleting any unnecessary entries.
A super handy plugin to achieve this is WP-Sweep. By installing the plugin, you can clean up your database by deleting things like post revisions, post drafts, spammed comments, and unapproved comments. It will also optimize your database’s structure with just a click.
The most important step in optimizing a WordPress website is to enable caching.
Caching is a little tricky to explain and definitely worthy of its own blog post! But, here is a short technical summary taken from WP Rocket:
When a visitor comes to your WordPress site, their browser talks to your web server which loads up WordPress – this involves PHP processing, making requests to your database, sending files back to the browser to finally be assembled into a fully formed webpage. This can take several seconds – an eternity to modern web surfers.
Caching replaces that process by sending a static HTML file to the browser instead, which is much faster.
There are a number of caching plugins available for WordPress, but we recommend W3 Total Cache and WP Rocket.
W3 Total Cache is one of the most popular WordPress plugins in the WordPress repository. To its advantage, the plugin supports a ton of features including CDN support and GZip compression. However, there is soo many features and settings that installing the plugin is a little daunting for most users.
Alternatively, one can install WP Rocket. WP Rocket is a premium plugin starting at $39 per license. It supports all the features of W3 Total Cache packed into a beautiful and easier to understand user interface.
13. Minification & Concatenation
A modern WordPress website contains a number of CSS and JS files. In some cases, there are soo many files that the rendering of the site is delayed. To cut back on HTTP requests and reduce the file size of your static assets, you can minify and concatenate your files.
Minification removes unwanted spaces and characters from JS and CSS files.
Concatenation combines several CSS or JS files into one file.
If you have WP Rocket or W3 Total Cache installed, both features are supported.
14. External HTTP Requests
Many websites load all kinds of stuff from other websites. Common external files include:
- Google Analytics
- Google Fonts
- Google Maps
- Facebook’s Pixel
This is not necessarily a bad thing.
Most of the services are well optimized and will load faster on their servers then yours. However, review your waterfall analysis from your speed test and see if an external request is slowing down your website.
Before the browser can display your website, it has to render its HTML.
Content Related Issues
16. Lazy Load Content
Lazy loading can improve actual and perceived loading time as images, iframes, and videos will be loaded only as they enter (or about to enter) the viewport.
This is a life saver for long posts with lots of images. Notice as you scroll down this post that the images fade in? Well, that’s lazy loading in action!
Lazy loading is a built-in feature in WP Rocket.
17. Optimize Images
A picture is worth a thousand words!
Pictures are a great way to engage your audience. But if they are not correctly optimized, they could be harming your website’s performance.
Before you upload images from your mobile or camera, they should be saved in the correct format.
If you use Adobe Photoshop, the feature is known as “Save for Web”.
There also online services like TinyPNG (they also have a WordPress plugin) that uses smart lossy compression techniques to reduce the file size of your images. The effect is nearly invisible but it makes a very large difference in file size!
Galleries and Sliders
While we are on the topic of images, another common cause of an underperforming website is the use of poorly coded/outdated gallery and slider plugins.
Shout out to Envira Gallery and Soliloquy WP for creating two of the fastest gallery and slider plugins.
Hotlinking, on the web, is bandwidth theft!
It occurs when other websites use your images without uploading them to their servers. As a result, you may see a spike in bandwidth without seeing an increase in traffic.
We seldom see this among small and medium-sized business websites, but it’s increasingly widespread among popular content websites.
One way to prevent hotlinking is to add the following syntax to your .htaccess file.
Replace fixmysite.com with your domain.
Over to you – Fix your Slow Website!
Well, there you have it! 18 real-life tips to improve your website’s performance.
Work your way through the guide and try out a few of the techniques.
And don’t forget to run a speed test before and after optimizing your website.
If you found this article helpful, please share it with your friends and leave your comment below!