How To Speed Up Your WordPress Site – Complete Guide

speed up wordpress

A fast loading website is important for getting and keeping steady traffic. WordPress speed is thus a concern for everyone who wants to grow their WP website, increase their traffic, and increase revenue. As a site owner, how can you optimize WordPress performance?

There are several factors that could slow down your WP website, including your host, the theme or WordPress plugins that you use, and the images you use.

And even if your website isn’t particularly slow, it still makes sense to optimize your speed. When it comes to website loading time, it cannot be too fast.

In this post, we will help you identify issues that can slow down your site and show you practical steps to improve your WordPress Speed. Ultimately, your aim should be to optimize WordPress performance and cut your website load times to less than 1.5 seconds. And this guide will show you how to achieve this result.

Table of Content

Where should you start?

How page loading speed affects your website

Case Study

How to make your WordPress Website lightning fast

Optimization steps for regular WordPress users

  1. Use Caching plugins
  2. Minify and combine WordPress code
  3. Enable Gzip Compression
  4. Optimize images
  5. Enable lazy loading
  6. Use a Content Delivery Network
  7. Use Excerpts in your homepage
  8. Limit Comments per page
  9. Clean up database
  10. Turn off pingbacks and trackbacks

Case study result after optimizations steps for regular users

WordPress Speed optimization Steps for advanced users

  1. Enable Keepalive for transfer connections
  2. Disable hot linking of your content
  3. Set Expires header for static content

Core optimizations to improve WordPress speed

  1. Hosting
  2. DNS Provider
  3. Themes
  4. Plugins

How can you use this information?

Speed up WordPress – Where should you start?

To begin, it is good to get a benchmark of your current site speed. To do this, you can use Pingdom Website Speedtest Tool or GTmetrix.com. In this article we tested the website with Pingdom, but by following the instructions on this guide you will get good results on all testing tools.

WordPress speed test tool

Have you ran your test? What is your load time? If it is consistently less than 2 seconds, that’s fair, but it can still be optimized. If it is more than 2 seconds, you should be concerned, and here’s why.

How page loading speed affects your website

A slow loading site will negatively affect your site traffic and revenue. Essentially, your WordPress site performance can directly affect the performance of your business.

Speed affects traffic for at least 2 reasons:

1. Search Engines give a low ranking to slow sites

In 2010, the search giant Google announced that they would begin considering site speed as a ranking factor. This means that no matter how great your SEO, and how many good articles and resources you offer, if your site loads slowly, you will not get great traffic from Google. And the same goes for Bing and other search engines.

2. Users dislike slow loading websites

Have you clicked on a result in Google Search only to find that the page wouldn’t open for the next few seconds, what did you do? A recent survey conducted by Akamai and Gomez reveals that nearly half of internet users expect a page to load in less than 2 seconds. Anything more than that and they would hit the back button and click on another result.

If you run an eCommerce website, you should be doubly concerned about optimizing your WordPress speed. In the same survey quoted above, 79% of online shoppers said they would not return to buy from a site if it has performance issues, and 44% said they would tell a friend if they had a poor experience shopping in a site.

With both your traffic and revenue at stake, you certainly have to take steps to ensure your site is lightning fast. We recommend that you aim for a less than 1.5 second loading time, and this guide will show you how to optimize WordPress to achieve this speed.

Speed up WordPress – Case Study

We will be testing and illustrating how the steps covered in this guide can improve your speed using a sample WordPress website.

This test website uses the Linear WordPress theme and has some plugins installed and activated. Here’s an initial benchmark of the page load speed for our test site.

WordPress Speed - Case study

As you can see, it loads in 1.87seconds. After implementing the steps below, we will redo this test to see what speed improvements we gained.

 

How to Make Your WordPress Website Lightning Fast

In the rest of this article, we will be walking you through steps you can take to increase your WordPress Speed. If you want to skip all the work, we can have one of our WordPress experts take care of your speed optimization and make your site lightning fast. You can request our service here.

speed up wordpress - banner

[thrive_leads id=’24593′]

Optimization steps for regular WordPress users

The WordPress optimization steps in this section are simple to perform and can be done by a regular WP user. Each one is also very important to your WordPress performance and speed. After going through the steps in this section, you may run a page load test again to see how your speed has improved.

1. Use Caching plugins to Speed Up WordPress

When a request is made to your site, WordPress processes php scripts and generates html, and other content. With a caching plugin, the processed html content from a previous request can be saved and sent on the next request without running any php scripts, thus cutting page load time.

Some great caching plugins include WP Rocket and WP Fastest Cache. These can help you boost your WordPress performance.

How to Install the WP Fastest Cache plugin

To do this, login to your WordPress Dashboard and go to Plugins > Add New. Search for WP Fastest Cache and install it.

WordPress Speed - WP Fastest Cache

After installation, click Activate to enable this plugin.

Setting up the WP Fastest Cache  Plugin

Next, click on WP Fastest Cache on the left side menu. This will open the settings page for this plugin. Enable the options as seen in the screenshot below:

WordPress Speed - Configure cache plugin

Lastly, click Submit to activate caching on your site.

You should also set your cache timeout, which is the amount of time after which the cache will be cleared and refreshed. To do this, switch to the “Cache Timeout” tab and click Add New Rule.

WordPress speed - Cache deletion cycle

In “If REQUEST_URI”, select “All”. In “Then”, select your duration after which cache is cleared. This duration should be determined by the amount of traffic you get to your site. If you get a lot (5000 hits per minute for example), you can select a short time like 5 minutes. Next, click Save to activate this clearing schedule.

WordPress Speed - Set cache deletion cycle

If your site doesn’t get much traffic and you select a short time, by the time the next user browses to your site, the cache is already cleared, which means content has to be loaded through PHP, and this plugin will have no effect on your speed.

One thing you should keep in mind about caching is that if it is enabled, changes you make to your site may not immediately be seen, as WordPress may still be serving cached pages. If you encounter this issue, simply use the “Delete Cache” tab to clear your cache and you will be able to see your changes.

2. Speed up WordPress – Minify and combine WordPress code

To minify your code means to remove unnecessary characters, spaces, and lines, to make the file smaller. The resulting smaller size would also mean the code loads faster and your WordPress speed improves.

To combine your code means to join all the Javascript and CSS files needed to display a page. After combining, you end up with one Javascript and one CSS file, thus reducing the number of http requests needed to load the page. This will optimize WordPress performance and increase site speed.

You can minify and combine WP code using the WP Fastest Cache plugin we installed in step 1. To do this, click on WP Fastest Cache on the main menu on your Dashboard. Next, tick the four options to enable minifying and combining of code (see picture below).

WordPress Speed - Minify and combine scripts

In addition to minifying and combining the files, you can also reduce their size using Gzip compression.

3. Speed up WordPress – Enable Gzip Compression

With Gzip Compression, your web pages will be compressed to a much smaller size before being sent to a browser. This reduction in size means the pages are downloaded a lot quicker, and your WordPress speed and performance improves.

You can enable Gzip Compression using the WP Fastest Cache plugin. On the settings page of this plugin, tick “Gzip”.

WordPress Speed - Enable Gzip compression

Click Submit to save your changes.

4. Optimize Images to Speed up WordPress

Images are important to every website. You cannot write captivating content, showcase items for sale, or tell a story on your travel or news blog without using good images.

However, images are usually larger in size than most other content on your webpage and can slow your site down.

There are two major things you can do to make your images load quickly:

–  First, you should save your images using the right file format. For colorful, real life images, use JPG. For line art, simple graphic works, and text heavy images (such as screenshots), use PNG.

– Second, you can use image compression to reduce the size of your images.

For example, below are two pictures.

Picture 1

WordPress Speed - Large image

Picture 2

WordPress Speed - Sample image small

Both pictures look exactly the same, but what you may not realize is that the first picture is 3.57mb in size, while the second is 960kb. Using compression tools, I was able to reduce the size of the second picture by more than 74%. A page containing the optimized image will load a lot quicker than the first one.

The good news is, you can install a plugin in WordPress to help with image optimization and automatically compress your images. A very good plugin for this purpose is “Smush Image Optimizations and Compression”. Please install and activate this plugin.

Using the Smush plugin

After activation, you would be taken to the plugin page. Click Bulk Smush Now to begin optimizing all your images.

WordPress Speed - Smushing images

Also, whenever you upload a new image, this plugin will automatically compress it.

Note, however, that on the free version of this plugin, only images less than 5mb would be optimized.

To optimize larger images, use the premium version.

5. Speed up WordPress – Enable lazy loading

This is another way to optimize WordPress images so they do not slow down pages. With Lazy Loading, images only get loaded onscreen when the user scrolls to the part of the page where that image appears.

This way, the page is displayed much quicker since users don’t have to wait for all images to be loaded. And this improves WordPress performance.

You can enable lazy loading by installing and activating the BJ Lazy Load plugin.

WordPress Speed - Lazy loading

This plugin starts working after it is activated. However, you can customize the options by going to Settings > BJ Lazy Load on your dashboard.

Update: Smush plugin now has lazy loading on the free version, so you may decide not to install the BJ plugin.

6. Speed up WordPress – Use a Content Delivery Network

A content delivery network (CDN) is like a cache, but instead of storing the static files in your server, CDNs have servers in many different regions.

When a request is made to your site, your CDN takes a copy of the static files served to the client and sends it to all its servers in different locations. The next time a user makes the same request, the CDN serves the stored files using the server closest to the location of the person who requested the page. This optimizes WordPress performance and improves speed.

We recommend MaxCDN for WordPress. This CDN can be configured using the WP Fastest Cache plugin we already installed.

WordPress Speed - Content delivery network

MaxCDN has a step by step tutorial on how to do this integration. Please start from step 6 as we have already done 1 to 5 in this guide.

7. Speed up WordPress – Use Excerpts in your homepage

The performance of your WordPress homepage is very important. It is likely the first page many users will see, and with which they will form an opinion about your site.

By default, WordPress sets this page to load the full contents of several of your posts. This can seriously slowdown your homepage.

To fix this, change the setting to display only excerpts of your post:

Go to Setting > Reading.

WordPress Speed - Show excerpts

Change the feed setting to “Summary” and save the changes.

WordPress Speed - Show excerpts

8. Limit Comments per page

If you have a really busy website that gets a lot of comments, you can reduce the size of your pages by limiting the number of comments loaded. And the user can expand to view more comments. This will optimize WordPress performance and enable your posts to load faster.

To control how many comments are displayed, go to Settings > Discussion on your WordPress Dashboard.

Under “Other comments settings”, tick the “Break comments” option and set the number of comments to 15 (or any other number you choose).

WordPress Speed - Limit comments displayed

Lastly, scroll down and click Save Changes.

9. Clean up database

Over time, your database becomes filled with data that you probably don’t use anymore. This could lead to database overhead, which in the simplest terms, means your database is no longer working optimally. To fix this, you need to optimize your WordPress database from time to time.

With the paid version of WP Fastest Cache, you can optimize your database by going to the DB tab. Alternatively, you can use the “Optimize Database After Deleting Revisions” Plugin.

Install and activate this plugin in your WordPress site. After activating it, you would be taken to the page displaying all plugins. Search for this plugin and click Settings. Next, set it up as follows.

WordPress Speed - Setup database cleaning

Scroll to the bottom and click Save Settings. Next, click Go To Optimizer.

Database optimizer

In the optimizer page, click Start Optimization.

DB Optimization

After a few moments, you would see the optimization results.

DB optimization report

Now you have an optimal database, and your WordPress performance and speed will improve as a result. Another great thing about this plugin is that, according to the schedule we set, your database will be optimized each month without you lifting a finger.

 10. Turn off pingbacks and trackbacks

Trackbacks and Pingbacks are a nice way for WordPress Bloggers to communicate across their sites. However, these features can eat up resources and slow down your site. Add to that the fact that most pingbacks and trackbacks are SPAM, then it makes sense to disable them.

To do this, go to Settings > Discussion in your dashboard. In the “Default article settings” section, uncheck “Allow notifications from other websites”.

Disable pingbacks and trackbacks

Scroll down and click Save Changes.

With Pingbacks disabled, you benefit both in optimized WordPress performance, and in avoiding spam.

 

Case study result after optimization steps for regular users

Earlier, we measured the load speed of our test site and got 1.87seconds. After applying some of the steps above, we ran the test again using Pingdom, and here are the results:

Optimized case study result

As you can see, we went down from 1.87seconds to 0.65 seconds. By using these WordPress Speed steps, we were able to reduce the load time by 1.22seconds. That is quite impressive!

 

WordPress Speed Optimization Steps for Advanced users

Are you a more advanced WordPress user, with experience tweaking hosting settings and configuration files? If yes, then you can further optimize your WordPress performance and improve load speed with the steps covered in this section.

1. Enable Keepalive for transfer connections

With keepalive, several files can be transferred using the same connection. If this is disabled, a new connection will need to be created for each transfer, and this can greatly slow down your site.

To enable keepalive, you would need to add an instruction to your .htaccess file. Follow these steps:

Access your WordPress host using ftp.

Next, find your .htaccess file, right click on it, and select View/Edit.Enable keepalive

Add the following code to the file:

Header set Connection keep-alive

Save the file and allow Filezilla to upload the new file when prompted.

2. Disable hot linking of your content

Hotlinking means a site owner getting the URL of images, video, or other resources on your site, and using this URL to display the content on their site. So each time the resource is displayed on their site, it is actually served up by your web server, thus consuming bandwidth. This can make your site load slower.

You can disable hotlinking using your .htaccess file. Here’s how:

Access your WordPress host using ftp.

Next, find your .htaccess file, right click on it, and select View/Edit.

Disable hotlinking

Add the following code to the file (replace fixrunner.com with your domain):
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?fixrunner.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www.)?google.com/.*$ [NC]
RewriteRule .(gif|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|php|png|css|pdf)$ - [F]

Save the file and allow Filezilla upload the updated file when prompted.

3. Set Expires header for static content

Using expires header, you can allow browsers to cache static files for the time you specify. For example, if you specify 1 month, static files will be stored in user browsers for a month. After that time passes, they would be requested once again and stored for another month.

This reduces the requests to your server and thus optimizes your WordPress performance and speed. You can set expires header using your .htaccess file. Follow these steps:

Access your WordPress host using ftp.

Next, find your .htaccess file, right click on it, and select View/Edit.

Set expires header

Add the following code to the file:

<filesmatch "(?i)^.*.(ico|flv|jpg|jpeg|png|gif|js|css|woff)$"="">
ExpiresActive On
ExpiresDefault A2592000

The filesmatch line specifies the filetypes that would be cached.

ExpiresDefault specifies the duration in seconds for which the files would be stored – in this case, 1 month.

Lastly, save the file and allow Filezilla upload the updated file when prompted.

Core Optimizations To Improve WordPress Speed

If you have tried the steps above and observed that your page speed is still not as fast as you wish, then there is likely an issue with one of the following core aspects of your site. At this point, optimizing your WordPress performance would involve making changes to some of these:

– Hosting

– DNS provider

– Themes

– Plugins.

These core aspects can be compared to the engine of a car. If the car engine is bad, reducing the car weight, adding body kits, and renewing suspension parts will hardly do any good for your speed.

Similarly, these core aspects of your WordPress site need to be good first, before other optimizations can help improve your WordPress Speed.

1. Hosting

If your website loads really slow, and you can hardly get it to improve, then it is time for a new host. Your Webhost is one of the greatest factors that affect your speed. If their servers are slow, your site will be slow.

We generally recommend WPEngine or Flywheel for clients who want lightning fast loading of their pages. These managed hosting platforms for WordPress come prepared with speed optimization features. You can get WPEngine or Flywheel hosting as well as WordPress technical support using our Rocket plan. This all in one plan gives you both performance and reliable WordPress fixing, and ongoing support.

The fact about hosting is, most people aim for a bargain deal on a shared hosting plan. But the downside to this is the servers may be slow.

If you are doing business with your site, then you need a hosting plan that can support your traffic growth, and most importantly, appeal to the mostly impatient people on the internet. For this, we recommend you check out our Rocket Plan.

Side note: If you are looking to make your WordPress website faster, we also recommend checking out Quicksprout’s in-depth review of Best Virtual Private Server (VPS) Hosting.

2. DNS Provider

When a user attempts to open your site, the very first communication is with your DNS provider. Now, if their servers take 200 milliseconds to respond, that’s already too much delay and you are going to have WordPress speed issues.

The solution to this is to choose DNS providers with fast response times. You can see the comparison of response times among the most popular providers at DNS Performance.

DNS Optimization

If your provider is ranked well, great, you can skip to the next item. If not, then it’s time to move your domain to a faster provider. This will help optimize your WordPress speed.

3. Themes

Many modern themes come with a ton of features that you do not need and may never get to use. These bloat of features can reduce your WordPress Speed.

Instead of using a theme with a ton of features, choose a lighter theme, and add only the features you need using plugins.

Also, many free themes (and some premium ones) are poorly coded and not optimized for speed. For example, where a single query to the database would do fine for an experienced programmer, another might make several calls to the database and not bother about how this would affect speed.

Thus, you want to use a cleanly coded, lightweight theme for your blog.

4. Plugins

There is a general belief that having many plugins slows down your site. While there is truth to this, the fact is, if you have 30 efficient, well coded plugins, your site will run well. But if you have 10 plugins, and 1 of them is really poorly coded, that one alone can ruin your WordPress Speed.

Gladly, you can scan your plugins to see those that are slowing down your site. To do this, you would need to install the P3 (Plugin Performance Profiler) plugin.

Follow these steps to install and use P3 plugin:

In your dashboard, go to Plugins > Add New.

Add new plugin

Search for p3 and click Install Now on the plugin.

Install p3 plugin

After the install completes, click Activate.

Activate p3 plugin

After activation, you will be taken to the general plugins page. Search for the P3 plugin and click Scan Now.

Next, click Start Scan in the scan page.

Scan plugins

Set the scan name and select “Auto Scan” to begin scanning.

Scan plugins

When the scan completes, click View Results.

Plugin scan resutls

A pie chart is used to display the performance of all your plugins.

Plugin scan report

As you can see, the report shows that WordFence security plugin has the most impact on the page load time. In fact, it consumes half the time it takes to load all plugins.

If I want to further optimize speed, I can uninstall the WordFence plugin and install another security plugin in its place. After installing, I can run the performance audit once again to see how the new plugin performs.

 

How Can You Use This Information

If you are serious about making a living out of your WordPress site, you certainly want to ensure you can get and keep steady traffic and loyal readership. For this to be possible, your site absolutely has to load quickly. As we considered in the second section of this article, a slow site will kill your SEO ratings, and harm your ability to monetize.

Also, from our case study, we were able to get our test site to load in just 653miliseconds by using some of the steps covered in this guide.

If you want your WordPress site to load really fast, go through all the steps in this guide and try to implement them on your site. You will achieve blazing fast results!

Have you tried these steps? Do you have other suggestions for optimizing speed? If yes, we would love to hear them in the comments section below.

speed up wordpress - banner
[thrive_leads id=’24593′]

More Resources

 This post was written by Mesheal Fegor

Mesheal Fegor is a Web/WordPress Developer and technical writer. His WordPress help articles have been featured on Kinsta and other sites. Mesheal holds a master's degree in computer science. His writing focuses on technical WordPress issues, ranging from core WordPress problems, to issues with WooCommerce, and more.

Last edited by: FixRunner Team