How To Speed Up WordPress And Get PageSpeed Insights Score 100

The “back” button is your enemy. You only have a few seconds to hook a visitor and get him or her to stay away from it. You better make each second count.

In this guide, I’ll show you how to speed up your WordPress site loading time and get the top score of 100 on Google’s PageSpeed Insights.

This will make your blog better, your visitors happier and you may even be rewarded by more Google search traffic.

How To Speed Up A WordPress Site
This is me trying to drive a Formula but I can make my blog faster than the speed of my driving

Disclosure: This article contains affiliate links. This helps support my blog and allows me to continue making guides like this. If you click my link and make a purchase, I earn a commission at no additional cost to you. I only promote products that I truly believe will be valuable to you.

Take the WordPress speed test to see why your blog is slow to load

Let’s start by checking your current loading time and performance. Run the WordPress speed tests at sites below to see how fast or how slow your content loads right now.

These tools analyze the performance of your site, and provide useful advice on things you can do to optimize the loading time:

Pagespeed Insights
  • GTmetrix: Gives you a “waterfall” view of what files are loading and what requests are being made when a user visits your site.
GTMetrix
  • Pingdom: Allows you to test the speed of your site from Europe, Asia, North America, South America or Australia.
Pingdom website speed test
  • WebPagetest: Allows you to test from multiple locations and from various devices.
Webpagetest

I recommend you take a test on all four of these sites and screenshot the results. Do the test for your home page and also for one of your main posts.

Now you have an overview of the current performance of your WordPress site. This will be useful to benchmark against after we do all the improvements.

Here’s my score on Google’s PageSpeed and the score we’ll aim to get you on too:

Pagespeed insight score 100

Speeding up your WordPress blog will not only be more friendly to your visitors but you will also practice more ethical web development by reducing the number of external calls and tracking scripts.

Action Point: Run the speed tests and save the results so you can benchmark against them after doing some changes.


The elements that affect your site speed

The overall page size and the number of HTTP requests are key metrics that determine the speed of your site.

The requests are anything your posts need from images, fonts, analytics, scripts or JavaScript files. In the reports, look at:

  • The total number of HTTP requests
  • The total size of all the elements

Here’s my site on GTMetrix. Notice the 8 requests and full page size being only 167KB.

GTmetrix 100 pagespeed score

Just keep it simple, stupid

In short, to keep your WordPress as fast as possible you should think like a minimalist. Consider simplicity and user-friendliness when making any decisions.

Your task is to understand all the file requests your site is making. What is the purpose of these files and can you live without them?

Remove and eliminate all the elements that don’t matter such as banner advertising, pop-ups, your sidebar, Google Analytics scripts and external Google fonts.

Steps I took to get PageSpeed Insights score 100

Here are the things I’ve done to speed up my WordPress blog and get PageSpeed Insights score 100. If you take these steps, you will notice that your blog posts are faster to load.

  • Changed to a WordPress theme that makes no external calls by default, needs only a bit of JavaScript and has a tiny footprint. I will give you some of my favorite light themes below.
  • To not add much additional footprint, I have decided not to use Google Analytics, Google fonts, social media sharing buttons and any intrusive pop-ups or banners.
  • Implemented lazy loading on images and videos which means that they do not load unless you scroll down to the areas where they are in. Continue reading for instructions on how to do this.
  • All images I use have been resized to the correct size, compressed and optimized too. I will show you the tools I use in a bit.
  • I minimized the number of plugins that I use. When I install a new plugin, I find the one with the lightest footprint possible. I’ll present some options further down in this post.

Ok, now you know what’s necessary to do. Let’s get started with making changes.

Action Point: Be a minimalist and a speed freak. Consider your site loading time when making any decision.


Choose a WordPress specialized hosting plan

In the speed test tools, you might have noticed the “first-byte time” or the advice to “reduce server response time”. This one is entirely down to the hosting company and server that you use.

GreenGeeks uptime for HowToMakeMyBlog
My blog’s server uptime and loadtime

Choosing a good host is arguably the best thing you can do to have a speedy blog.

You want a host that specializes in WordPress, guarantees a 99% uptime and a server with fast response time.

There are many hosting companies on the market. Prices range from a few dollars per month to hundreds of dollars.

It’s not an easy market to navigate for a beginner.

As long as you keep your blog light and lean, you can have a speedy blog on one of the affordable, shared hosting plans. These are an excellent option for beginners as they cost as low as $35/year.

My blog is hosted on GreenGeeks. It’s an independently owned hosting company based in Los Angeles. They specialize in WordPress and are eco-friendly so your blog can be carbon-reducing.

The plans start at $2.95/month for one site and $5.95 for multiple sites. I’m on the “Ecosite Pro” plan at $5.95/month as I run several blogs.

This plan gives me top scores for “first-byte time”, perfect uptime and speedy load time. It’s excellent value for money and I recommend it to beginners.

webpagetest-first-byte-time

Monitor your server uptime/downtime

Keep an eye on the uptime of your web server. Uptime basically tells you what percentage of time your site is up and available to visitors.

The more reliable your web host is, the higher uptime you will have and your downtime will be minimal if any at all.

WordPress runs the Jetpack plugin which allows you to activate the “Monitor” add-on that continually checks your server and notifies you in case of downtime.

I also use StatusCake for more detailed analysis of my uptime and loading time tested from different locations around the world. Here’s a sample of my blog’s performance:

A recent test of uptime and load time of my blog from various locations around Europe and the USA

Action Point: Keep an eye on the server response time of your host. Next time it’s the time to renew, consider moving to a more WordPress specialized host and/or plan.


Use a light, fast, clean and minimal design theme

All WordPress themes are not equal:

  • Some have more features than you’ll ever need.
  • Some have bad, bloated or old code.
  • Most have unnecessary images, external fonts and JavaScript file requests.

All these contribute unnecessary load to your site even before you add your own customization and your content.

You should choose a light and clean coded WordPress theme with a right balance between the looks, functionality and speed.

5 of the fastest and lightest WordPress themes

I’ve handpicked these minimalist, lightweight and mobile responsive options for you to consider.

Everything except for Astra, I’ve used for a more extended period of time in the real world action on this blog itself.

Disclosure: This article contains affiliate links. This helps support my blog and allows me to continue making guides like this. If you click my link and make a purchase, I earn a commission at no additional cost to you. I only promote products that I truly believe will be valuable to you.

  • Susty: Probably the lightest theme in the world. Only 6KB in total. Completely free.
susty-theme
  • GeneratePress: The theme that I use on my blog. The total size of this theme is less than 30KB. Free to use but you can upgrade for extra features.
generatepress
  • Astra: Another lightweight option under 50KB in total size. Free to use but you can upgrade for additional features.
astra
  • Twenty Nineteen: This is the official theme made by the WordPress team. Pretty light and minimal by default. Completely free.
Twenty Nineteen
  • Revolution Pro: Premium theme by Genesis StudioPress. A minimal and lightweight theme. This is not a free theme.
revolution-pro

Activate any of these WordPress themes and do the site speed test again. Look at the total page size and on the number of files requests.

You will see a boost in your scores using any of these five themes alone.

Action Point: Install and activate one of the five lightweight themes recommended. Run the speed tests and compare the difference.


Compress and resize your images

High-resolution images are an integral part of web content. They brand your site, and they keep your visitors interested in your posts.

The size of images can be huge and will dramatically impact the loading time. First-time visitors are impatient and won’t wait around for your large images to load.

Your photos should be big enough to make an impact, but not so large that the file size prevents a quick page loading time.

In your speed tests, you might get the suggestion to “optimize images”. This means that you should:

  1. Resize the images to the exact dimensions that you need in your content. It is a bad practice to upload the pictures in the size that they are produced in your camera.
  2. Compress the images without losing image quality. I aim for the majority of my pictures to be less than 100KB.

Here’s how:

  • Have a massive archive of poorly optimized images on your blog? Smush can help optimize your existing data in bulk by stripping metadata and compressing.
  • Squoosh is an image optimization tool made by Google and it works directly in the browser. I use Squoosh for all new images I am about to upload.
  • These are the Squoosh settings that I use to resize the image to the correct size but also to compress the size without losing much quality.
  • It decreases the image size by 70% or more.
  • As an alternative, PageSpeed Insights gives you compressed versions of your images alongside your score too.
  • Click on the “Download optimized image, JavaScript, and CSS resources for this page” under “Desktop” and upload onto your site to replace the original files.
  • Prefer to do all this on your desktop? ImageOptim is a free, open-source app. It’s available for Mac, Linux and Windows.
Google squoosh image compression

Action Point: Bulk optimize your image archives using the Smush plugin. Then use Squoosh to resize and compress all the new images you are uploading.


Add lazy loading to images and videos

If you have an image or video heavy site like a fashion blog (I have a guide on how to start a fashion blog) or a YouTube blog you should use a lazy loading plugin.

Lazy loading only loads images and videos that are in the browser’s view (i.e. above the fold). It loads the rest only as the visitor scrolls down the page.

It makes your page size lighter and reduces the number of calls by default.

I recommend the Lazy Load By WP Rocket as it doesn’t use any JavaScript and doesn’t add any extra weight to your site. You can see it in action on my blog right now.

In the settings, tick these boxes:

lazyload-settings

As an alternative, Jetpack plugin comes with lazy loading feature too. Under “Performance & speed” within Jetpack settings, you should select “enable lazy loading for images”.

Action Point: Enable lazy loading for your images and videos using Lazy Load By WP Rocket.


Activate a caching plugin

“Leverage browser caching” is one of the tips you get in the WordPress speed testing tools.

Caching plugins speed up WordPress by generating static files and serving those instead of the WordPress default dynamic files.

This means that your files don’t need to be refreshed every time they are viewed.

Install and activate a caching plugin and you will immediately see an improvement in your speed.

I recommend Cache Enabler as it’s simple to use and it works out of the box. Just activate it and do another speed test.

Action Point: Activate caching using the Cache Enabler plugin.


Activate Autoptimize to aggregate and minify CSS, HTML and JavaScript

Another tip you might have seen in the speed test tools is to minify CSS files, HTML and JavaScript.

Minification reduces the size of your resources by removing unnecessary or redundant data and characters without affecting the functionality.

Autoptimize plugin is a great solution. Activate it and tick to optimize HTML, JavaScript and CSS code. It aggregates all the files so you have fewer requests and it minifies them.

Here’s what to select in the Autoptimize settings:

Action Point: Use Autoptimize to aggregate all your files and to minify them.


Enable compression

Your speed test tool might give you the suggestion to “enable compression”.

Install the Yoast SEO plugin which gives you the ability to edit the .htaccess file from your dashboard. Go into WordPress SEO settings, select “Tools” and then choose “File Editor”.

Insert this code at the end of your .htaccess file to enable compression:

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

Leverage browser caching

This is the code to insert at the end of your .htaccess file in case you see the suggestion to “leverage browser caching” in your speed tests.

<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 application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
</IfModule>

After doing this you might still get the suggestion to leverage browser caching for your external scripts and requests such as Google Analytics.

External scripts are something you cannot control but there is a plugin called CAOS that helps you fix this for Google Analytics script.


Eliminate render-blocking JavaScript and CSS in above-the-fold content

Insert this code in your theme’s functions.php file within the “Theme Editor” menu in the “Appearance” settings in your dashboard.

It will help you eliminate render-blocking JavaScript and CSS in above-the-fold content.

/*function to add async to all scripts*/
function js_async_attr($tag){

 # Add async to all remaining scripts
 return str_replace( ' src', ' async="async" src', $tag );
}
add_filter( 'script_loader_tag', 'js_async_attr', 10 );

Use a CDN

You also have the option to enable CDN (Content Delivery Network) support to offload static files to fast data centers around the world.

If your server is located close to the location of your target audience, the chances are that you won’t see much benefit from a CDN. But it’s still worth a test.

Site Accelerator, a part of the Jetpack plugin that Automattic (the company behind WordPress) runs, can speed up both your statics file load times and your image load times. Here’s how:

  1. Install and activate the Jetpack plugin in the Plugins section of your WordPress admin
  2. In the left-hand side menu click on Jetpack and choose “Settings”
  3. In “Performance & speed” turn on “Enable site accelerator” and choose to “speed up image load times” and “speed up static file load times”.

Cloudflare is an alternative option that you can try.

Action Point: Enable the Jetpack Site Accelerator CDN and test to see what difference it makes.


Reconsider the plugins you use

Do WordPress plugins slow down your site? The answer is yes, they can do. I love WordPress plugins as they allow me to add any feature that I can imagine.

The potential issue is that the more plugins you add, the more CSS and JavaScript requests you have and this hurts the page loading speed.

Consider whether the plugin truly adds any value to your site before installing it. You should try to avoid using a plugin when a bit of modification to your theme will get you the same results.

I’m currently using only a handful of plugins, down from having some 25+ not too long ago. A ballpark figure is to try to keep your WordPress to 10 or fewer plugins activated at any time.

Check the speed impact of WordPress plugins that you use

Measure the effect each plugin has on the loading time. Run the speed test and compare your performance before and after installing a new plugin.

Keep an eye on the extra page size and the number of requests that the plugin has added.

Consider removing any of the plugins that slow you down. Always deactivate and delete any plugins that you do not use.

Consider a lightweight plugin option

If you insist on having the feature that the plugin can add, consider a more lightweight alternative. That’s the great thing about WordPress. You’re never stuck with one option only.

Your social media sharing buttons might slow you down. This is common as those buttons use external scripts and make too many calls to services.

Consider using a lightweight option like Scriptless Social Sharing instead of the official buttons. See it in action at the bottom of my posts.

How do you know which one is a lightweight option? You install and test some of the alternatives and see what difference they make.

Action Point: Reduce the number of plugins that you use and choose lighter options.


Keep WordPress, plugins and themes updated

Great looking design, stunning imagery and valuable content are essential elements of a successful blog. And WordPress helps you take care of these which is why it is one of the best blog sites.

WordPress gets regularly updated with cleaner and leaner coding and functionality. You should always make sure to keep your WordPress and its plugins updated to the latest version.

It’s an easy process that is automated for security updates on WordPress by default and with most hosting companies.

For Jetpack connected self-hosted blogs you can set plugins to be updated automatically too. Here’s how:

  • Log in to your account on WordPress.com.
  • Go into “Plugins” within the “Tools” menu.
  • Click on “Manage Plugins” on the top right to see the overview of all your installed plugins.
  • Select “Autoupdates” under individual plugins to auto-update them.
autoupdate-wordpress-plugins

Action Point: Make sure to update your WordPress, themes and plugins. Set them to be automatically updated to make this easier.


Optimize the WordPress database

You should make sure to optimize the WordPress database too. This is where WordPress stores and organizes all your data.

WP-Optimize is a great plugin that helps you run regular database maintenance without any tech know-how and with one click on a button. It cleans all post revisions, spam comments and reduces the size of your database.

Aim to set it to do this process automatically at least once per month.

Action Point: Optimize your WordPress data on a monthly basis using WP-Optimize.


Speed up WordPress site: The checklist

Let’s look at the WordPress speed optimization checklist first:

Speed up WordPress checklist

Aim to implement the majority of the steps recommended as they will make a difference and will help you speed up your WordPress site.

Your visitors will love you for the faster and more efficient experience and so will Google.

Marko Saric

Created by Marko Saric

Marko started How To Make My Blog in 2008 to help people start their own blogs and make them a success. Learn more about Marko.