The Ultimate Guide to Increase Your WordPress Website Speed

With this guide, you will be able to increase the speed of your Wordpress website so that it gets - at least - in what the standard is for all websites is, which is less than 3 seconds.
Share on facebook
Share on linkedin
Share on pinterest
Share on reddit

When it comes to running your website, a good experience for your users is composed by many things, one of them being – probably the most important – how fast your website loads. You may have an aesthetically beautiful website, it will not matter if it’s not optimized for speed because it will not even load before users get tired and just move on to something else.

When it comes to WordPress speed optimization, there are several tasks to do and features to implement. On this guide, I have rounded them all up so that you’ll be able to speed up WordPress and get your website to what’s – at least – the standard for all websites, which is less than 3 seconds.

increase wordpress website speed

How Can You Speed Up WordPress?

Before you actually start doing anything on this guide, you should have in mind which hosting company and plan you are using, as that is one of the aspects that greatly impacts on the speed at which your site loads.

That said, what you should be doing next is going to what I call the big three of speed testing so you can get a reference on how your site loads. These three sites are:

Pingdom

GTMetrix

PageSpeed Insights

In each of these sites, you are going to enter the URL of your site without the http, https or www. You’re just going to enter your the domain and wait for a couple of minutes while these services test how much time does it take for your site to fully load. If you haven’t done anything to increase your website’s speed, then don’t panic if the numbers and data are crazy high or if they’re shown a little bit in red. This is extremely normal.

Now that you’ve put a number to the loading of your website, it’s time to start making it faster.

 

Inactive plugins and themes: a no-no

increase your wordpress website speed

 

Ok, so I’ll start with something that’s fairly easy to do.

Sometimes, when you have all of these ideas for what you want your site to do, you begin to install plugin after plugin after plugin to then find out they weren’t what we were looking for and we just leave them there.

I’m not blaming you, this is something that we all do. I did so myself when I started building websites because some of the plugins I installed just weren’t enough for what I needed.

So, what should you do? Everything that’s not being used should be deleted. I’m talking about plugins and themes, all of them. Because even if you have deactivated them, they’re still taking up storage on your server. So, by reducing the workload on your server, you’re also reducing the time your website takes to load.

Plugin-wise, you can also install P3 Profiler to see which of the plugins that you have running take the heaviest toll on your site and then try to find an alternate better optimized plugin to switch to.

 

Get rid of the trash

 

The next step on this guide is checking wherever there is trash on your site.

You can do this by first going to your cPanel and check for the trashed files there. If there are, you can delete them. They won’t do you any good by keeping there. On the contrary, they’re only going to make your site slower.

Then, you check on your pages, posts and custom post types for any trash. I mean, there is always that time where you created a test page or post to see how something looked. Delete those completely from your site.

The point of all of this trash-deleting process is making the consumption of your server’s storage the most minimal possible.

I understand this process can be time-consuming, so if you’re ready to get all techy and a little hands down with code, you can tweak the configuration file of your WordPress website to delete all trash automatically after X number of days or immediately.

The period WordPress keeps your trashed pages, posts and CPTs is, by default, 30 days. So, what if you want to reduce that period to just 7 or 14 days?

You go to your cPanel’s file manager, look for the file wpconfig.php and add this line at the bottom:

define ('EMPTY_TRASH_DAYS', X);

X is the number of days you want to keep the trash stored. If you type 0, the trash is going to be deleted immediately.

 

Also, get rid of revisions

In addition to emptying your trash, one thing you can also do to increase your WordPress site speed is reducing the revisions storage of your site, especially on the pages and posts that you work a lot. This happens more when you’re beginning to work on your site and start to make tweaks here and there before it’s ready.

Consider a situation like this: You wrote a blog with 4,000 – 5,000 words.  The size of the post is probably like 10KB. If you start making a lot of revisions to that post, like changing sentences or adding images, the size of post can be increased to 2MB.

Now, imagine that you do that with several other posts without deleting the revisions. Your site starts to get bloated and bloated with unnecessary stuff.

Just like the process for deleting the trash, you can set the number of revisions to be stored by your site. All you need to do is go to your wpconfig.php file again and adding this line of code:

define( 'WP_POST_REVISIONS', 3 );

Note: In this case, you can set either a number of the word ‘false’. The latter disables revisions altogether.

 

Gzip-it

If you felt good doing the last part because you messed up with the site’s code without shutting it down completely, then this is going to be better, because more code is involved. If not, then fear not, because what you’re going to do isn’t really difficult.

When compression matters this much as now, someone telling you that you can reduce the size of your website by 70% on average, that’s something you’re definitely going to want to take, right? That’s what you can do with Gzip compression, which means you can also decrease the loading speed of your site by 70% as well.

To do so, you have to go to your cPanel again (I know!), and look for the file .htaccess in your file manager (beware, some cPanels tend to have this file hidden). To enable Gzip compression, you need to add the following snippet on that file:

<IfModule mod_deflate.c>

# Compress HTML, CSS, JavaScript, Text, XML and fonts

AddOutputFilterByType DEFLATE application/javascript

AddOutputFilterByType DEFLATE application/rss+xml

AddOutputFilterByType DEFLATE application/vnd.ms-fontobject

AddOutputFilterByType DEFLATE application/x-font

AddOutputFilterByType DEFLATE application/x-font-opentype

AddOutputFilterByType DEFLATE application/x-font-otf

AddOutputFilterByType DEFLATE application/x-font-truetype

AddOutputFilterByType DEFLATE application/x-font-ttf

AddOutputFilterByType DEFLATE application/x-javascript

AddOutputFilterByType DEFLATE application/xhtml+xml

AddOutputFilterByType DEFLATE application/xml

AddOutputFilterByType DEFLATE font/opentype

AddOutputFilterByType DEFLATE font/otf

AddOutputFilterByType DEFLATE font/ttf

AddOutputFilterByType DEFLATE image/svg+xml

AddOutputFilterByType DEFLATE image/x-icon

AddOutputFilterByType DEFLATE text/css

AddOutputFilterByType DEFLATE text/html

AddOutputFilterByType DEFLATE text/javascript

AddOutputFilterByType DEFLATE text/plain

AddOutputFilterByType DEFLATE text/xml

# Remove browser bugs (only needed for really old browsers)

BrowserMatch ^Mozilla/4 gzip-only-text/html

BrowserMatch ^Mozilla/4\.0[678] no-gzip

BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

Header append Vary User-Agent

</IfModule>

 

Caching is your best friend

If you followed the first thing on this guide and tested your site on GTMetrix, you will notice there is one item that is usually low and red and that is “Leverage Browser Caching”. Now, there’s no need to get technical and explain what that means exactly (though you can find an explanation here). We’re just here to increase your WordPress website speed.

With the previous step, it’s quite possible we reduced the size of your website by 70%. However, when it comes to speed optimization, there’s no such thing as too fast or enough. So, we’ll reduce it even more by eliminating the need of your website having to load each and every time a user visits it.

You do this by going to your cPanel’s file manager’s htaccess file (by now, you know how powerful this file is) and adding this code snippet:

## EXPIRES CACHING ##

<IfModule mod_expires.c>

ExpiresActive On

ExpiresByType image/jpg "access 1 year"

ExpiresByType image/jpeg "access 1 year"

ExpiresByType image/gif "access 1 year"

ExpiresByType image/png "access 1 year"

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 year"

ExpiresDefault "access 1 month"

</IfModule>

## EXPIRES CACHING ##

 

If you read closely at that snippet, you can see that what it does it tell browser to keep file types stored on the browser for some time. 1 year for images, and 1 month for code files and other stuff.

To further optimize your site’s loading time, you should install a caching plugin. From my point of view, all the caching plugins you’ll find on other blogs do its job fairly well. I’m talking about WP Rocket, W3 Total Cache, WP Fastest Cache, WP Super Cache, and Autoptimize. There are plenty more, but those are, like, the most popular ones.

improving website performance

I’m particularly using SG-Optimizer for this website and for my client’s because I always use Siteground as my hosting. More on hosting next.

These types of plugins – or at least the ones I listed – also come with minification and compression for your CSS and JavaScript that you can just activate with the check of a box. Minifying these files is always recommended to increase site speed because browsers read code one line at a time and the CSS and JS like they’re written. When they’re minified, the lines are always reduced, reducing as well the size of these files. To put an example, a CSS file can be like this:

#first-section {

display: flex;

background-color: red;

}

Minified it’ll be like this:

#first-section{display: flex;background-color:red;}

This example is just four lines of code to one so the impact is minimal to none, but when they’re 2000-3000 lines, the reduction can have quite the impact.

The last thing you’re going to want to do on the caching side, is using Content Delivery Network or CDN like Cloudflare.

how to increase wordpress website speed

What’s good about these services – Cloudflare specifically – is the fact that they can speed up your website for like 5-10 times, and they can also protect your website(s) against all types of attacks or hacking penetration practices.

 

Always MCO (Minify, compress and optimize)

They say is better safe than sorry, right?

This old-time adage applies to pretty much everything in life and your website is no different. Media files like images, PDFs and other types are heavy by nature, so always try to compress them before uploading. Tools you can use for that are Tiny PNG or Tiny JPG. You can reduce the size of your images for 50% to 90% without degrading quality. It can also be time-consuming to do this every time you’re going to upload something, but trust me, it’ll be worth it bottom line.

 

Choose a good hosting provider

Now, while all of the tips previously mentioned can greatly help you to increase your WordPress website speed, if your hosting provider and the server is not great, then you’re not helping yourself.

Recommending something here on this guide would not be genuine of me, because I haven’t tried them all. And the number of hosting providers claiming to be the best is high. What I can say is that Siteground is the hosting platform I have used the most and so far, I have nothing bad to say about them.

 

fast hosting provider

 

Reducing The Number of Requests

Once you test your site on a tool like Pingdom or GTMetrix, one item that is really noticeable is the number of HTTP requests your site is making. When this number is high (On GTMetrix, it usually tends to have red icon next to it, and on Pingdom, a grade) your site tends to get slower.

The HTTP requests work this way:

Whenever a user goes to your site, the browser they’re using makes a call to your web server and requests the file containing the content of the individual page they’re visiting, which can be an HTML file, a CSS file, a JS file, images, icons, etc.

The server where your website is hosted on receives such request, sends the required files and then proceeds to render them on the page.

This little and basic explanation can tell you right away why having a high number of requests is not good for your site.

Now, how to reduce it?

There are files on some pages that don’t need to be requested. For example, you may be selling products with WooCommerce but there’s nothing related to WooCommerce on the homepage or any other non-WooCommerce pages. That’s stuff you don’t need that’s creating more requests.

So, you install a plugin called ‘Asset Clean-Up’.

speed up wordpress performance

 

Here’s a tutorial on how to use it:

 

Make sure you have a good WordPress theme

Choosing the theme that works best for your site can be quite frustrating with so many themes to choose from and the many other blogs and sites giving their recommendations for the best theme ever. Again, while I have worked with a lot of themes, I haven’t tried all of them, so my recommendation would not be completely honest.

All I can say is that the themes I use are Hello Elementor, Astra and OceanWP. With Hello Elementor specifically, I have gotten the best scores on the testing sites mentioned at the beginning of this post.

 

wordpress fast themes wordpress fast themes

 

Increasing the speed of a WordPress website can be daunting at first, but it gets easier once you have the right information on how to do it. Anyways, thanks for reaching the end of this guide. I hope you can use it to boost your website by speeding up WordPress so much that it makes you crazy how fast it is.

Improve your Elementor site today!

Want your website to perform better? Are you inching to see those scores on PageSpeed and GTMetrix up? Just want some great Elementor customizations? Well, you’re in luck! We have plans available that fit all situations and budgets to make your site the best it can be!

Leave a Reply

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

backgroundLayer 1

Home

The right clients, at the right price, anytime you want.

About

It takes 3 things for a program to create life-changing results.

Team

We have the skills you need to build a multi-million dollar business.

Contact

Helping coaches & thought-leaders all over the world.

You could use this for a mission statement or something else about your business that could really help people know more.

Navigation Menu

Newsletter (this is pretty important here!!)

Sign up to our newsletter

This guide is included in all template purchases, but you can get it here if that's what you only want