If you are running a website and your website loads slowly, you are losing visitors every day. It’s time to do speed up WordPress website. I will show you how I got a 95+ score in GTmetrix and website loading speed less than 2 sec. This method is the easiest and quick method of optimization of the WordPress website.

Table of Content – How to speed up WordPress site

wordpress speed up example

Before going to speed optimization let’s learn about the importance of website speed optimization.


In this tutorial, we will use a website called CMSN POS. Let’s test this website speed on GTmatrix.

wordpress speed up test website

As we can see this website page loading speed is 50% and the Yslow score is 63%. End of this case study we will speed up this website speed more than 95+.This website made by WordPress.Let’s began this WordPress website speed up. Before going to start we have to see Gt-matrix recommendation.

wp speed up example

Gt-matrix shows two recommendation. Server Scaled images and Leverage browser caching.If you solve these two issues.This website will be load faster.Let’s see which images need to optimize.

Images Optimization : 

If your web page contains lots of images. Now it’s time to resize and optimize them. How we will do image optimization. There is a couple of ways to do this. Go to Gtmetrix and test your website. You might be seen under the server scaled images there are a couple of images need to optimize. As you can see this website contains an image’s size of 1080*1080 and Gtamtrix suggested make it 512*512.If we do this 77% images size will be reduced. We can resize these images easily.

How to resize images in the WordPress dashboard :

Login to the WordPress admin panel and go to > media and find the images. After that click on scale and full 510. It will automatically calculate by 510*510. You can resize other images following this instruction.

Here are pro tips for images optimization: 

Don’t upload png format images on your website. Png format images size much larger than jpg format. Before uploading any image on your website. Compress image first using Compressjpg. Please follow this step on how you can do image optimization.
If your image format is png then convert it into jpg.

Leverage Browser Caching :

When a visitor visits your website, the browser stores your web pages on the visitor’s local computer. This is called caching. There are a couple of ways to do this. You may couple caching plugin. Now I will show how you can reduce leverage browser caching, This thing will help your WordPress speed optimization.

Step 1:
Change the request headers of your resources to use caching editing .htaccess file. Paste the below code top of the .htaccess file. This method is called the header expires method.

Be careful : 

You have to be careful when enabling browser caching for speed up WordPress website,  as if you set the parameters too long on certain files, users might not be getting the fresh version of your website after updates.

Now paste the below code into your website .htacss file.

<IfModule mod_expires.c>
ExpiresActive On

# Images

ExpiresByType image/jpeg “access plus 1 year”

ExpiresByType image/gif “access plus 1 year”

ExpiresByType image/png “access plus 1 year”

ExpiresByType image/webp “access plus 1 year”

ExpiresByType image/svg+xml “access plus 1 year”

ExpiresByType image/x-icon “access plus 1 year”

# Video

ExpiresByType video/mp4 “access plus 1 year”

ExpiresByType video/mpeg “access plus 1 year”

# CSS, JavaScript

ExpiresByType text/css “access plus 1 month”

ExpiresByType text/javascript “access plus 1 month”

ExpiresByType application/javascript “access plus 1 month”

# Others

ExpiresByType application/pdf “access plus 1 month”

ExpiresByType application/x-shockwave-flash “access plus 1 month”


Method 2 : 

 Quick cache control paste this code top of the header.


# 1 Month for most static assets

<filesMatch “.(css|jpg|jpeg|png|gif|js|ico)$”>

Header set Cache-Control “max-age=2592000, public”



Use a Content Delivery Network (CDN):

Content Delivery Network will help you to load your website faster.CDN helps your visitor to retrieve his/her requested data from the nearest server. Let’s see how CDN works for website speed optimization. If your website located service in the USA and your visitor trying to visit your website from Europe.How CDN helps your visitor to see your website as fast as possible. When visitors sent a request to browse your website then CDN retrieved your website data from the nearest server (Where already your static data like HTML, CSS, images loaded).

There are a couple of Content Delivery Network service providers. Try them. You can also take a look at our Best CDN providers reviews.

Defer Parsing of JavaScript:

Defer Parsing of JavaScript is the most important thing to improve website loading speed. There are a lot of plugins to do this. But we recommend you use the Autoptimize plugin. This plugin has a lot of functions in this post we will only talk about JavaScript Parsing. Please follow this image’s instructions.

Minify JavaScript to reduce HTTP request:

If you running a website with tons of plugin then you will see a huge number of HTTP requests. Because there are a lot of javascript files there. This thing can solve to minify the JavaScript.Minify JavaScript means you have to combine all JavaScript files into one JavaScript file. This is really complex task if you want to do this manually. In this case, we will a WordPress plugin. The plugin name is W3 Total Cache.

Let’s see how you can minify the JavaScript to speed up WordPress Website. Before doing the minification of JS, Please keep backup your WordPress website. If you don’t know how to take the backup. You may follow our guide on how to keep backup of the WordPress website. After keeping the backup. Please follow the steps. Plugins > W3 Total Cache > Setting

minify javascript