Speed Up WordPress: 21 Ways To Boost The Speed of Your WordPress Website

Written by Mohit Gangrade
Last updated July 1, 2021

Web Hosting Sumo content is free. When you purchase through referral links on our site, we earn a commission.

Let’s face it:

No one likes to wait for a website to load.

If your website takes more than 3 seconds to load . . .

. . . most people will leave right away.

If you want people to stay on your website, keep reading . . .

Why Your WordPress Site’s Speed Matters

Here’s the most important reason why:

If your website is slow, most people will leave right away and never come back again.

In fact, according to Kissmetrics, 47% of the consumers expect a web page to load in 2 seconds or less, and 40% will abandon a website that takes over 3 seconds to load.

That means if your website takes more than 3 seconds to load, you are losing a lot of subscribers and revenue.

Not only that, according to WebsiteOptimization.com, if your website is slow:

  • it will be perceived as low-quality
  • will raise your users’ blood pressure
  • and decrease your traffic by up to 20%

The bottom line?

The faster your website, the better.

1. Switch To A Faster Theme

Impact On Speed: Medium

The theme you use has a huge impact on your website’s speed.

Most WordPress themes (even the premium ones) are bloated with features you will never need.

Needless to say, this slows down your website.

In simple words: the more resources (CSS, Images, JavaScript) your theme uses, the slower your website.

It is way easier to switch to a better, faster theme than it is to fix a crappy theme.

When choosing a WordPress theme, it is a good idea to check the speed of the theme demo with a tool such as Google Pagespeed Insights or GT Metrix.

Any theme that takes more than 3 seconds to load is not worth using.

And if you can’t find a fast theme, use the default theme that comes with WordPress. It is a light-weight theme that is faster than most premium themes on the market.

2. Move To A Better Web Hosting Service

Impact On Speed: Medium

If your web host is slow, nothing you try will improve the speed of your website.

When you are just starting out, choosing a shared web host might make sense. After all, they offer everything Unlimited (pageviews and bandwidth) for such a low price.

On the surface, it looks like a sweet deal.

And if you sign up, your website will run smoothly for a while.

But as soon as you start getting some traffic (readers), your website will slow down, and if you suddenly get a surge in traffic, your website might go down for hours.

The bottom line?

Invest in a good web host from the start of your blogging journey.

If you can’t invest in a premium web hosting service right now, move your website to a premium host as soon as possible.

3. Enable Browser Caching

Impact On Speed: Medium

Static files such as your Logo, CSS, and JavaScript are required on more than one page on your website.

These resources are loaded every time a visitor visits a page on your website.

Even on the second visit, your visitor’s browser requests a fresh copy of all the files it has already downloaded on the first visit. This not only costs you bandwidth but also slows down your website.

The solution?

Leverage browser caching.

It’s a simple technique of caching commonly-used resources on the browser-side.

Here’s how it works:

When a user visits your website, her browser downloads all the resources (images, CSS and JavaScript) used on the page and makes a copy.

If you don’t have browser caching enabled on your server, her browser will download a fresh copy of all those files even on the second visit.

And when you have browser caching enabled . . .

. . . your server will instruct browsers to cache (make a copy of) all the resources it downloaded on the first visit, and use those resources on the second visit instead of requesting a fresh copy.

This reduces the number of resources the browser has to download on the second visit.

To enable browser caching, add the following code to your .htaccess file:

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access 1 month”
ExpiresByType image/jpeg “access 1 month”
ExpiresByType image/gif “access 1 month”
ExpiresByType image/png “access 1 month”
ExpiresByType text/css “access 1 month”
ExpiresByType text/html “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x-javascript “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 month”
ExpiresDefault “access 1 month”

The above code will request browsers to cache your resource files like images and CSS for one month.

4. Give Your Site A Boost With Caching Plugins

Impact On Speed:  Very High

When someone visits your website…

WordPress goes through hundreds of tasks to generate the requested page.

It does this for every page view.

Not only does this takes a lot of time, it also increases the load on your server.

This is where caching plugins come to rescue.

They make the process of serving a page faster.


By removing the need to generate pages every time they are requested.

Let me explain . . .

A caching plugin caches every page the first time it is requested. When the “cached” page is requested again, a pre-generated copy of that page is served.

This cuts the time required to generate a page by half.

The bottom line?

Start using a caching plugin like WP Super Cache.

It’s free, easy to set-up and will give your website’s a serious boost in speed.

5. Optimize Your Images

Impact On Speed: Medium

Here’s the deal:

Images make up more than half the size of any website.

If you can reduce their size, you will be able to reduce the size of your website. And therefore, increase the speed of your website.

The best way to reduce the size of your images is to optimize and compress them without compromising the quality.

Now, to do this, you can use a tool like CompressPNG to compress individual images.

But compressing images one at a time is a painful experience.

Enter WP-SmushIt.

It is a free WordPress plugin that compresses and optimizes all the images on your WordPress site automatically.

It will automatically optimize not only the images that already are on your website but also the new images that you upload.

6. Optimize Your WordPress Database

Impact On Speed: Medium

WordPress stores a lot of data in the database to help perform important tasks. Over time, a lot of this data becomes redundant.

This redundant data in your database keeps on growing over time.

As you might already know, the more cluttered your database, the slower your website.

So it’s a good idea to optimize your WordPress database every month.

To do this, you can use a plugin like WP-Optimize.

It’s a free plugin that deletes all the redundant data from your blog’s database.

7. Make Your Pages Load Faster by Lazy-Loading Your Images

Impact On Speed: High

Browsers load all the images on your page one-by-one.

They load one image . . .

. . . and then move to the next one.

This keeps on going until there are no images left on the page.

This takes a lot of time and might block the page from rendering.

The more images you have on a page, the slower it will load.

So, what’s the solution?

Lazy-Load your images.

It is a simple technique for loading images only when they are visible to the user.

This means an image located at the bottom of the page won’t be downloaded by the user’s browser until he reaches the bottom of the page.

This limits the number of images the browser has to load and makes your site load faster.

To implement this technique, you don’t need to hire a developer.

Just install the free BJ Lazy Load plugin and you are good to go.

8. Limit The Number of Post Revisions

Impact On Speed: Low

Post Revisions is an awesome feature offered by WordPress. It works kind of like a time machine.

It helps you revert a post back to any of its previous versions.

Made a mistake while editing your posts?

Revert back to the last version of your post with just a few clicks.

Every time you make changes to a post, WordPress stores the old copy of the post as a revision.

It’s a really helpful feature.

But here’s the problem with Post Revisions:

WordPress can create and store literally hundreds of revisions per post.

And most of these post revisions are useless.

The more post revisions in your database, the slower your website.

To solve this problem, you can either limit the number of revisions WordPress creates for every post or disable Post Revisions altogether.

We don’t recommend disabling post revisions as you might need this feature in the future. Limiting the number of post revisions will work just as well as disabling them for most small websites.

To do this, add the following code to your wp-config.php file:

define(‘WP_POST_REVISIONS’, 5);

define(‘AUTOSAVE_INTERVAL’, 300);

It will change the default autosave interval from 60 to 300 seconds, and limit the number of revisions per post to only 5.

9. Deactivate Unused Plugins

Impact On Speed: High

Most people don’t realize this:

The number of plugins you use on your blog has a huge impact on your website’s speed.

This is because each plugin you install on your website increases the number of tasks WordPress has to go through to complete a page request.

For example, if you install an Anti Comment Spam Plugin on your blog, it will run every time someone posts a new comment.

Deactivating unused plugins is one of the easiest ways to increase your blog’s speed.

Visit the plugins page on your WordPress dashboard, and deactivate every plugin that you don’t need or is not in use.

10. Split Comments Into Pages

Impact On Speed: Medium

If you are getting a lot of comments on your blog . . .

. . . it means you have an engaged audience that loves your work.

But here’s the problem with too many comments:

Comments increase the size of your web pages and make them slow.

Not only that, the more comments there are on a page, the more time it will take WordPress to generate the page.

To solve this problem, split your comments into multiple pages.

This will reduce the size of your web pages and make your site load faster.

Here’s how you can do this:

Login to your WordPress dashboard and navigate to Settings -> Discussion.

Now, check the “break comments into pages with” checkbox:

11. Minify JS and CSS files

Impact On Speed: Medium

The size of your JavaScript and CSS files has a major impact on page load time.

Now, there’s not much you can do to reduce the size of your files . . .

. . . but when it comes to CSS and JavaScript files, you can easily minify them.

What does it mean to minify?

In simple words, it means to reduce the size of these files by removing redundant characters.

These redundant characters include blank spaces, tabs, newlines, and comments.

To do this, you can use the free Autoptimize plugin.

It’s a free plugin that optimizes your CSS and JavaScript files to improve performance.

It does more than just minifying these files.

It also concatenates them, caches them, and even adds expires header to them.

12. Enable GZIP Compression

Impact On Speed: Very High

GZIP Compression is a method of reducing file size.

It can reduce the size of your files by more than half.

It will not only save you tons of bandwidth but will also boost the speed of your website.

When GZIP compression is enabled on your server, all files are compressed before they are sent to the browser. The browsers then uncompress the files before using them.

This reduces the size of all your files (HTML, CSS, JavaScript, and Images) by more than half.

To enable GZIP compression, add the following code to your .htaccess file:

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

Alternatively, you can use the free GZip Ninja plugin.

13. Disable Hotlinking of Your Content

Impact On Speed: Medium

I get it.

People love your content and like to share it on their own websites.

Because let’s face it:

You are awesome.

I know how good it feels when people share your content.

But here’s the problem with that:

When most people share your content on their own site . . .

. . . they tend to link to the images and videos on your server.

This increases the load on your servers.

That means, poor performance for your readers and increase in bandwidth costs.

To get around this problem, you need to stop people from “hotlinking” your content.

And here’s how you can do it:

Paste the following code at the end of your blog’s .htaccess file:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?your-website.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [F]

Before you use the above code, you will have to change your-website.com with your real domain name.

14. Load Scripts In The Footer

Impact On Speed: High

Here’s the deal:

The position of the scripts on your page impacts your website’s loading time.

This means if your scripts are at the top of your HTML code…

… the browser will first load the scripts and then start rendering the page.

The more scripts you have at the top, the more time it will take a browser to start rendering your pages.

The solution?

Move your scripts to the bottom of the page.

Loading your scripts right before the closing </body> tag will allow browsers to start rendering your pages without the need to first load the script.

How do you do it?

The best way to do it is to hire a developer and ask him to move the scripts to the bottom of the page.

But if you are looking for a quick fix, you can try Scripts to Footer. It’s a free plugin and IS NOT a long-term solution.

15. Use Async Scripts

Impact On Speed: Medium

When a browser loads a page, it will not render the content until it has loaded all the script files that come before the content.

The best way to fix this problem is to move all your scripts to the footer.

But there are a lot of cases when this is not possible.

In those cases, you can use an async script.

Here’s what it looks like:

<script src=’http://yoursite.com/script.js’ async=true></script>

The only difference between an async script and a regular script is the async attribute.

This attribute tells the browser to start rendering the page without waiting for the script to load.

16. Enable Keep-Alive

Impact On Speed: Medium

To download a file, browsers need to create an HTTP connection to the server.

They have to do this for every file there is to be loaded on a page.

This means, the more files you have on your page, the more connections a browser will have to create.

And here’s the problem with that:

It takes some time to create a connection to the server.

This time keeps adding up with every file.

The solution?

Enable Keep-Alive on your server.

With Keep-Alive enabled, browsers can use the same HTTP connection to download more than one file.

This saves the time it takes to create a new HTTP connection.

To enable Keep-Alive on your server, add the following code to the top of your htaccess file:

<ifModule mod_headers.c>

Header set Connection keep-alive


17. Use A CDN

Impact On Speed: High

The time required to connect to a server depends on how far it is from the user.

In simple words, it will take more time to connect to a server that is located in a continent far away from yours than it will take to connect to a server located in your city.

A Content Delivery Network (CDN) solves this problem.

It replicates your website across a massive network of servers spread around the world.

And when a visitor requests your website, he is served from a server nearest to his location.

This cuts the time required to connect to the server by half.

It’s not the only problem a CDN solves.

It also improves the security of your website and decreases the load on your server.

If you are just starting out, try the free CloudFlare CDN service.

18. Turn Pages Into HTML

Impact On Speed: High


There are a lot of pages that don’t require any kind of processing on the server.

You can turn these dynamic pages into static HTML pages to speed them up.

You should try turning pages that don’t change very often like static Landing Pages into HTML.

Because when you do this, you will see a huge boost in speed.


Because there will be no PHP code to execute, no data to pull from the database and no WordPress plugins to load.

When you do this, your server will send the HTML file directly to the browser.

This will cut the time required to serve the file by more than half.

19. Reduce Number of Requests

Impact On Speed: Medium

Here’s the deal:

The number of files there are to load on a page impacts the speed of your website.

Because for every file, the browser has to connect to the server and download it.

This means, if you have multiple files to load on your page, the browser will have to create a new connection to download every file.

And obviously, this is not efficient at all.

Combining multiple files into one is a good way to minimize the number of  HTTP requests.

You can combine multiple CSS files and JavaScript files together to reduce the number of files there are to load.

You can either do it manually or use this free plugin.

20. Reduce Number of Images Per Page With Image Sprites

Impact On Speed: Medium

The more images there are to download, the more time it will take the browser to fully display the page.

The best way to reduce the number of images on your pages is to use an Image Sprite sheet.

An image sprite sheet is simply a collection of images put together into a single image.

Here’s an example of a spritesheet used by Mailchimp:

Sprite sheets can reduce the number of images the browser has to download.

If you want to learn more about CSS Sprites, Check out this awesome tutorial by CSS Tricks.

21. Disable Pingbacks and Trackbacks To Reduce Server Load

Impact On Speed: Medium

Pingbacks and Trackbacks are WordPress’s way of communicating with other blogs.

I know it sounds like a helpful feature.

But here’s the problem:

It can put a lot of load on your servers.


Because when enabled, your site sends a notification to every blog you link out to…

… and receives a notification from every blog that links to your site.

This increases the load on your servers and can make your site slow.

The solution?

Disable Pingbacks and Trackbacks by navigating to Settings -> Discussion.


Most of these tactics don’t take more than a minute or two to implement.

So, before you leave this page, I want you to:

  1. install a caching plugin. (See #4)
  2. and enable GZIP on your server.  (See #12)

Even if you do only these two things, you will see a massive increase in your website’s speed.

If you have any stories, tips, or suggestions of your own to share, feel free to leave a comment.

Free WordPress course for beginners


Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our weekly newsletter and we will show you how to:

- Get thousands of visitors every month.

- Buy businesses with no money.

- Get more customers.

Join other Entrepreneurs like yourself today!

You have Successfully Subscribed!

Subscribe To Our Newsletter

Sign up for our newsletter and receive our best advice on improving your website's speed, picking the best web host, and getting more customers:

You have Successfully Subscribed!