How to Speed Up a Slow WordPress Website

Home > Blog > Website Marketing > How to Speed Up a Slow WordPress Website
Optimizing WordPress at a coffeehouse

The speed of your WordPress website is important for SEO and also for retaining site visitors and converting them to prospects or customers. Various

studies by Google, CloudFlare and others have consistently found that bounce rates go down and conversion rates get better as site speed improves, sometimes dramatically. For example, according to Google, as page load time goes from 1s to 5s, the probability of a visitor bouncing increases 90%! *

Before racing down the road of optimizing your site speed, we recommend that you read The Problems with Google PageSpeed Insights so that you are certain you are measuring the performance of your site by the correct metrics. If you are just using the “grades” that Google and other site speed tests provide, you may be mis-informed. The only true metric is page load speed.

If you have a WordPress site that is slow, here are some ways you can improve its speed. The list below is not comprehensive and different sites will have different reasons for why they are slow, but we’ve ordered the list in terms of what we’ve found to have the greatest effect on speed, with the most impactful at the top.

Reduce the amount of JavaScript in use

This is technically one of the most complex of the tips offered here but, in our experience, it’s the one that frequently makes the most difference. When your web page is downloading, the quantity and size of the elements, including images, css, fonts and javascript files, loaded by that page will affect its load time. This is obvious — if you have 100 large images, your home page is likely to load slower than if you have 10 small images. 

What is not obvious, is that not all of these files affect page load equally. JavaScript in particular can have a profound affect on load time because JavaScript files must load and execute sequentially. What this means is that each JavaScript file must download, and then execute in your browser, before the next file can download. By contrast, image files can download and render in parallel. This means that several relatively small JavaScript files can cause your page to load more slowly than several large image files.

How do you reduce the JavaScript in your site? There is no simple answer to this and it will likely require research by an experienced developer. However, in general, the process usually includes turning off plugins that load large JavaScript libraries and reducing the number of externally loaded analytics and advertising pixels. In one instance of a site we were optimizing, we discovered that the slider plugin was adding 6 seconds to the page load time! We replaced that slider plugin with a more efficient one, and reduced page load time by 5 seconds. In a couple of other instances, we discovered more than a dozen advertising pixels were in place, many of which were no longer in use. By removing all but the essential ones, we were able to speed the site up by 9 seconds!

 

Install and Configure a Caching Plugin

Every time a WordPress page executes, dozens of PHP scripts have to run on the server, many of which connect to the database to retrieve content, before the page can be sent to your browser. This is a time consuming process and often costly in terms of the resources required by the server. What this means is that the more people that hit your site at once, the slower it is likely to become because the server is busy executing those scripts every time.

One of the primary functions of a good caching plugin is that it can reduce this script execution to a single time for each page. Once all the scripts for a page have been run, the caching plugin will store the results of that page execution. Subsequent visits to that same page require no scripts to execute at all. The caching plugin simply serves up the results to each new visitor. 

The other thing that caching plugins can often do is to shrink HTML, CSS and JavaScript files by removing all of the white space (spaces, line breaks, etc.) from these files. This process, called minifying, can save a surprising amount of space in each file, causing them to download faster. Caching plugins can also combine (concatenate) CSS and JavaScript files into a single CSS and JavaScript file. This saves time because loading one 10K CSS file takes your web browser less time than loading ten 1K files. 

While minifying and concatenating can greatly speed the load time of your site, they can also cause problems. CSS and JavaScript files will sometimes not run properly when minified or combined in a different order than they typically load. These are very important steps in speeding your site, but expect to have a developer need to do some troubleshooting to get your site to work right after turning on these features in a caching plugin.

Our favorite caching plugin is WP-Rocket because it’s not only easy to setup and configure but it makes incorporating the use of a CDN much easier.

 

Use a Content Delivery Network (CDN)

A CDN stores assets, such as images, CSS and JavaScript files, on servers around the world and serve those files to your website visitors via the server that is geographically closest to them. This can not only make a significant difference in load time, especially for visitors from other countries, but it can also reduce the load on your server, enabling your website to handle more visits.

There are a number of CDNs, but our favorite is CloudFlare because it not only acts as a CDN, but also provides DNS, security, and other site performance features. 

 

Run WordPress on PHP 7.x+

PHP, the underlying scripting engine that WordPress is built on, is constantly undergoing upgrades. Many hosting companies are still running older versions of PHP, which can affect your site’s performance and security. Make sure to upgrade to a version greater than 7.2, though you may not always want to upgrade to the very latest until WordPress and the plugins your site is running on, have been updated to be fully compatible.

 

Turn off Plugins

Plugins are a big part of what makes WordPress awesome. There are so many available and they make it incredibly easy to add functionality to your site. However, virtually every plugin you add has a cost in terms of performance. A site running 40 plugins will almost inevitably be slower than a site running 10 plugins. 

Some plugins may be absolutely required for you to run your site, however, try to be conservative with non-essential plugins and also look for alternative ways of accomplishing the same thing without a plugin. For example, many WordPress sites run the Really Simple SSL plugin to help turn all of their pages to SSL mode. However, with a simple search/replace in the WordPress database, and a few lines added to the htaccess file for your site, you can eliminate this plugin altogether. The same is true for many “utility” plugins which simply provide a nice user interface for tasks that can readily be performed in other ways — ways that have little or no impact on performance.

 

Get Away from Bloated Commercial WordPress Themes

Commercial WordPress themes continue to add features in order to appeal to wider and wider audiences. They add not only more code, but many more “required” plugins. The cost of this is longer load times for you pages. 

The fastest themes are usually custom themes because they contain only the code required to run your site. They are less configurable for a novice user, but they have far better performance, security and reliability over time. The main downside to custom themes is cost, as it takes a developer more hours to create a custom theme than to install an existing commercial theme. Check out this article for a discussion of the pros and cons of custom versus commercial themes

If you’ve done the above and your site is still slow, here are other things to consider:

  • You may need a web host. NDIC Provides world class managed WordPress Hosting at competitive rates.
  • Try analyzing and compressing your images site-wide. Plugins like https://imagify.io/ can help with this.
  • Optimize and fix any issues that might exist with your database tables. We’ve seen partially crashed database tables cause sites to slow tremendously. MySQL has built-in routines that you just have to run which will fix most table issues and optimize them for better performance.
  • If you spend a lot of time in the WordPress admin, consider limiting post revisions and also limiting the WordPress Heartbeat, both of which can slow down a site.

 

*https://www.thinkwithgoogle.com/marketing-resources/data-measurement/mobile-page-speed-new-industry-benchmarks/ 

 

Share

Questions? We're Here.

What's New

Who Is Visiting Your Website? Anonymous Visitor Detection Software Review

Why Anonymous Visitor Detection If someone visits your website and does nothing but read a page or two and leave,… more

How to Speed Up a Slow WordPress Website

The speed of your WordPress website is important for SEO and also for retaining site visitors and converting them to… more

Read All