This will be a post made of pictures with optimal settings to follow to speed up WordPress. If you are a WordPress user you might have slow speed on your websites.
It took me a while, and I was very skeptical at first about magical configurations that would speed up WordPress.
The thing that I want to tell you, is that you can go forward and just copy all my settings. None of them will cause problems on your sites and the speed will be a lot faster after you have finished this long configuration.
Google Speed Insights is less accurate than gtmetrix, but it’s how Google sees your website via his crawlers. So you want to make google speed insights happy and achieve “GOOD” there for sure.
If you just started a WordPress site and you are going to test your site on gtMetrix your speed can be pretty bad, even up to 10seconds to load. (an ideal speed would be less than 1 second).
I strongly advise you to make an account and test it a few times now with gtmetrix! Then, we are going to do the same at the end of this configuration to see how much faster your website loads.
First Step To Take To Speed Up WordPress Is To Have Cloudflare
It will take me too long to explain why you need to have Cloudflare on your website. But if you are planning on being cheap and having an awesome performance just create an account with Cloudflare now.
It is 100% free for what we need, you can also upgrade if you want the extra features but for us, the free version is enough.
Cloudflare will give you a lot of awesome capabilities to speed up WordPress to the max.
Another thing that is very important is the free SSL also called HTTPS protocol on your website. More than that also an HSTS protocol that is an even more secure. It has the advantage of not having a redirect to the origin server from HTTP to HTTPS so that your site will be faster.
P.S. The biggest speed optimizations will be accomplished in the next section with a plugin called W3 total cache. But if you don’t configure Cloudflare the way we are going to configure it now, W3 total cache will not work. If you have questions and you don’t understand something just comment below and I will reply.
So let’s start to put some nice pictures you need to follow to configure your website so you can speed up WordPress to the next level.
How To Install Cloudflare On Your Website
The Cloudflare installation on your website is dang easy, all you have to do is to head to the Cloudflare website.
Once you are there you want to create an account with your best e-mail. You can add unlimited websites to an account, so what I advice is to make one single account and secure it with a 2FA to keep hackers away.
Once you have created an account and secured it! Click on “add new website” as shown in the picture below. And put in your website URL without HTTP.
Follow the screen and go forward until you get to a point where Cloudflare will give you the URLs of your custom (NS) Name Servers.
Click on Domain, find your domain, manage the settings, and you will see the TMDHosting NS servers on the bottom left.
You need to replace those NS with the ones given from Cloudflare, doing this you will allow Cloudflare to manage the DNS of your domain.
So you will not need anymore to go to your domain provider. This is very handy if you have domains purchased in different places.
But mostly, you will have access to Cloudflare awesomeness. Now let’s go to the practice, It is a very long post so grab water.
It might take a few hours the first time for the NS to propagate and being able to use Cloudflare and all the tabs.
USE THE TABLE OF CONTENT ON TOP OF THIS ARTICLE IF YOU GET LOST! YOU WILL HAVE TO FOLLOW ALL THE PICTURES!
Cloudflare Crypto Settings And Optimal Configuration
On the overview tab, you can enable developer mode and see your API keys. On analytics, you will see analytics on your domain. And on DNS you can manage A records and your DNS in General. The pictures below are related to how to speed up WordPress.
The Crypto tab is the SSL tab! You need to have HTTPS always on and preferably the HSTS activated with the settings as shown in the picture below.
Cloudflare Speed Settings And Optimal Configuration
Firewall and Access are interesting tabs but we are not going to look at them here in this speed up WordPress tutorial.
Head to the Speed Tab and follow the picture below, here is where the minification will take place. Minifying code means that your browser will need less time to read the files that give the look to your site. Also, brotli is a monster that helps us achieve a better loading speed.
Cloudflare Caching Settings And Optimal Configuration
Here make sure that you have “always online” ON, and I have put 1 day as browser cache expiration, you can put 4 hours and it’s fine.
Cloudflare Page Rules Settings And Optimal Configuration
Workers are paid, so we want just to speed up WordPress and pay zero dollars right? Just go to the page rules tab.
With the free Cloudflare plan, we have 3 rules we can add! If we want more, buying new rules is cheap. But we don’t care that much because 3 rules are more than enough for now.
The first rule we are going to add is the “forwarding URL” rule. This rule will help speed up WordPress because there will be only one request to the origin server instead of the 4 possible ones.
When you request a website Google will look at these versions:
We want to tell Google that only one has to be available and it will be
Cloudflare Rule 1
Add the rule “Forwarding URL“.
The code for the top part would be
www.yourdomain.com/* Where you are going to replace
yourdomain.com with your domain name.
Then we want to pick “301 permanent redirects” and add
https://yourdomain.com/$1 where you want to replace yourdomain.com with your domain name.
P.S This rule needs to be deployed and has to be always first, you can drag rules up and down wherever you want.
Cloudflare Rule 2
The next two rules are of course only for WordPress users. They will speed up your website since the admin parts are less important under the eyes of Google.
The code you need to put might vary depending on where you installed WordPress. In my case, my root folder is at,
/blog but in most of the cases is just at the end of the URL.
- In my case, the code would be
- In most of the cases would be
Then add one rule at the time in this order as shown in the picture.
Cloudflare Rule 3
This is more related to pictures and caching pictures previews. It is very similar to the previous rule, so just follow the pictures.
The code you need to put might vary depending on where you installed WordPress. In my case, my root folder is at
/blog, but in most of the cases is just at the end of the URL.
- In my case, the code would be
- In most of the cases would be
Cloudflare Network Settings And Optimal Configuration
IPv6 compatibility is hard to nail without Cloudflare. You should enable it and put it ON for sure. Then follow the pics for the other config.
Cloudflare Apps Settings And Optimal Configuration
Traffic and customize are paid features, we want it all free so now I am gonna show you the apps installed via Cloudflare on marcodiversi.com
I find Google Analytics and BackTop Button nice to have! But there are tons of apps you can install and try. All of them will load asynchronous so they will not slow down your site and code will be injected like a medicine.
Cloudflare Scrape Shield Settings And Optimal Configuration
Here you should turn them all ON! I have the Hotlink protection off because I am using a software to do a certain thing that requires hotlink linking. But this slows down my site for sure. If you are not doing weird stuff just turn it ON so you will speed up WordPress more than mine.
How To Install W3 Total Cache On Your Website
I take for granted that your website runs on WordPress and you want to speed up WordPress. One of the most powerful plugins that will help you make your website faster to load is W3 total cache.
If you did not already head over your WordPress plugin section and search for “W3 total cache”, install it and follow the pictures below.
If you are lazy and you trust me enough, you can download my W3 total cache configuration from the button below. (WordPress does not allow .json files, so it’s on my Dropbox, click on direct download on the top right of the window that is going to open).
You have to go in the “general settings” tab, and then at the bottom page, there is “import configuration”, upload the .JSON file you have just downloaded and you will be ready to go.
P.S. Under the “page cache” tab, you will need to put your own sitemap URL, look at the pics below and/or on the table of contents search for “W3 Total Cache Page Cache Optimal Settings“.
P.S. Also, you will need under “extension” grant your Cloudflare access. You will have to go there activate Cloudflare and go into “settings” and connect your Cloudflare via API “authorize/ reauthorize”. It ‘s easy, but if you don’t understand comment below and I will help you.
W3 Total cache General Settings optimal settings
You need to follow the picture, this is the best configuration you can get for free and that will improve the speed.
From this page, you can upload my optimal configuration file, please read above for more details on what to modify if you upload this file.
If you download the file and change just the sitemap URL and Cloudflare permissions, it will be definitely faster. But you will not learn how to speed up WordPress with the W3 total cache plugin. Here you will find all the pictures to follow to get the best out of your WordPress.
W3 Total cache Page Cache optimal settings
If you decided to import my configuration file, here is a section where you will have to add your website sitemap.
Look at the picture and under “cache preload” you want to put your sitemap, in my case, it is
https://marcodiversi.com/blog/sitemap_index.xml but in most of the cases it will be
https://yourwebsite.com/sitemap_index.xml you need to replace yourwebsite.com with your domain name and add at the end of the URL
On my site, WordPress is not installed in the root folder, that’s why I have
/blog. If you have installed WP like me just go forward and do the same otherwise you need just to add
sitemap_index.xml at the end.
W3 Total Cache Minify optimal settings
Follow the picture, the biggest minification job has been done by Cloudflare already, here is for the W3 total cache plugin.
W3 Total Cache Database Cache optimal settings
Follow the pictures below, not a lot to do with this.
W3 Total Cache Object Cache optimal settings
A few little settings to adjust here, follow the picture.
W3 Total Cache Browser Cache optimal settings
This section is one of the most important sections, here you can remove the query strings from static resources. This is a very common error we get from gtMetrix and it is useless to cache the URLs with “?” at the end. These URLs are not considered as real URL and they just slow down your site.
Follow the pictures for good, and if you did not decide to import my config file, make sure that all of these settings match mine.
W3 Total Cache User Agent Groups optimal settings
Not very much to do here, just look at the pic and adjust.
W3 Total Cache Referrer Groups optimal settings
Look at the pictures, not a lot to do even here.
W3 Total Cache Cookie Groups optimal settings
Here just a few things to check, and follow the pics as always.
W3 Total Cache CDN optimal settings
If you are using Cloudflare free and no maxCDN which is not free, follow the pictures below. The parts where you need to authorize maxCDN to leave it as they are.
Just make sure to check all the option in the first black box, and in the other black boxes marked in the picture below.
W3 Total cache Fragment Cache optimal settings
Not many settings to change here.
W3 Total cache Monitoring optimal settings
A few setting to adjust here, especially the ones in the second black box will speed up WordPress, look at the picture.
W3 Total cache Extensions optimal settings
Here it can be tricky, what you have to do is this:
- Activate all the things that are active in the picture below.
- Deactivate all the things that are not active.
- If you did not already, go into “Cloudflare” settings and authorize your Cloudflare account.
- Do not change the Cloudflare settings, we have already put the good ones in the first section of this article.
- If for some reasons you have different extensions or you have fewer extensions it’s normal, these can depend on the plugins you have installed.
How To Install WP Disable On Your Website
Just go into the plugin section of your WordPress backend and search for “WP Disable” by optimization.io. Install it and activated it.
The part on the right of this plugin is very important! You need to put your google analytics ID there and check the options as shown in the pic.
WP Disable Requests Settings And Optimal Configuration
You can go ahead and disable the settings as shown in the picture! Note that depending on the theme some of these settings might influence the front-end of your website.
What I suggest to do, is to go into Cloudflare and activate the “Developer Mode” from the Overview tab. And then after you have saved the new settings, purge the W3 total cache, from the menu of your WP backend.
Then open an incognito browser window, to see if these changes influenced your website look! You need to have “developer mode” ON and clear the cache because otherwise, you will see a cached version of your site.
But I have tested many settings on many sites and with the configuration below you will speed up WordPress without making any mistake.
WP Disable Tags Settings And Optimal Configuration
Here you can turn them all ON!
The first one might cause some problems on certain themes, but for the 85% of themes, it’s fine to turn it on as well.
WP Disable Admin Settings And Optimal Configuration
Follow all the settings in the picture, just copy and do the same on your website!
WP Disable SEO Settings And Optimal Configuration
Here you can check them all, it’s up to you, but I rather keep the first option unchecked for an SEO Point of view.
WP Disable Others Settings And Optimal Configuration
This is the most important WP disable settings tab! “Disable pingbacks and trackbacks” is a must to turn ON, this is a famous error on gtmetrix.
I will talk about how to disable pingback and trackback also later in this article and you can read more here as well. How to Disable Trackbacks and Pings on Existing WordPress Posts
If you want to keep your RSS Feed, do not turn ON the option “Disable Feed”.
How To Install WP-Optimize On Your Website
Once you found it, install it and activated it. This plugin will allow you to clean up useless stuff in your database, and other advanced options you can use.
WP-Optimize WP-Optimize Settings And Optimal Configuration
Before cleaning up your database you want to install updraftplus on your WordPress and perform a full backup.
Just go to “add new plugin” section, and search for “updraft plus“! Then make a backup on your computer. Just in case something goes wrong when cleaning up the database.
The things to check in the settings are shown in the picture, once the backup is done you can go ahead and click on “Run all selected optimizations“. Take a look at how many MB you are cleaning up.
WP-Optimize Settings And Optimal Configuration
Here you can disable trackbacks with the buttons on the left. This will delete the useless and old ones. Meanwhile, with the plugin WP Disable, we have used before we are going to delete the new coming ones.
The settings in the picture below are settings I like, but you might want to disable auto cleaning or adjust these settings as you like.
How To Install Auto Optimize On Your Website
Look at the picture here on the left since it might not come first in search results, here is a link to it as well.
You can see all your websites requests in gtmetrix or chrome dev tools, this plugin will skyrocket your website speed.
I usually keep the HTML optimization off since I am very precise and I see that condensing HTML code can cause some minor effects.
AutoOptimize Main Settings And Optimal Configuration
Just auto optimize CSS and JS, to get advanced features you need to click on the top right “show advanced settings“. Just copy my settings in the main section.
AutoOptimize Extra Settings And Optimal Configuration
I keep the “remove emojis” unchecked but feel free to try it checked on your site. You must check this option “Removing query strings (or more specifically the ver parameter) “, this will improve your Yslow score on gtmetrix.
How To Install WP-Smush On Your Website
This plugin works under the scenes everytime you upload a picture to your WordPress posts pages etc. What this plugin does is beyond of incredible! It will Smush any picture you upload, resize it, rename it and you will have to do zero work.
Shrinking pictures is very important if you want to keep your speed high! You can not have 5 MB pictures on a page. This tool will take care of everything, so install it.
WP Smush Main Settings And Optimal Configuration
Just copy my setting! And if you are new to it, smush all the images that have not been smushed with the bulk editor. Having smaller images in size will speed up WordPress a lot, you need to try it to see the results.
You can smush a certain amount every day for free so do it.
Speed Up WordPress And Websites | Miscellaneous Tips and Articles
Improve Time to First Byte
TTFB (Time To First Byte) is the time that is needed to reach the first byte of your website. This depends mostly on your hosting provider, and if you get a shared host like here on marcodiversi you cannot go very low on speed performance.
To have a very low TTFB you need to get a VPS or dedicated server. But still with a cloud hosting as I said in another article it’s fine. You can measure theTTFB with gtmetrix, under the “timings tab”.
Also, I suggest you read an article from MOZ, where they are talking about the TTFB. You can read the MOZ Article here, Improving Search Rank by Optimizing Your Time to First Byte.
Remove heavy plugins
There are certain WordPress plugins that are just against the speed up WordPress process, and they are just slowing down your website. They will not add any value to your business at all. In these two articles, there are the reasons why and which ones are the worst.
Disable trackbacks and pings
We have already disabled trackback with WP Disable, but just to be sure that everything is disabled for good you might want to check out this article here.
Trackbacks and pings were used back in the days to notify other bloggers of your new content so that you could read it.
At the moment these techniques to alert people are surpassed with the push notifications. We don’t need any more trackbacks or pings to know if a blog we love posted new content.
How To Install PHP7 on your hosting.
WordPress is built with PHP language if you are not familiar with this word you should. As the current state of development, PHP has reached the version 7.2.
In order to make WordPress working your hosting provider needs to have PHP installed on it so that they can understand it.
Almost all the hosting companies have it by default, but what they don’t have it’s the latest version and updates.
Right now I strongly advise you to select PHP 7.0 from your hosting providers. Do not put 7.2 because some plugins might be not compatible with it yet.
If you upgrade to PHP 7 you will have improvement in speed for sure. TMDHosting have all the PHP versions, and according to me is the best company to host a website. Here there are some screenshots of how to pick PHP 7.0 on TMDHosting.
Select PHP 7.0 so that all your plugin will have no compatibilities issues.
How To Install AMP On Your Website
And to conclude this article I would suggest you install AMP plugin to speed up wordpress on mobile.
AMP (Accelerated Mobile Pages Project) is an ambitious project that will make your site blazing fast on mobile.
There are countries where the internet is not fast as for other countries like Latvia or the United States. Also, people in 3rd world countries tend to have a smartphone instead of a laptop because is more affordable.
The AMP project aims to transform a web page to a more simple page that can be opened using fewer data. You probably saw from your mobile the little flash in search results, that flash is AMP.
If you were to develop the all thing alone it would be hard, but with WordPress, all you need is to install the AMP for WordPress Plugin.
To install this plugin, as always go to your WordPress “add new plugin” section and search for “AMP for WordPress“.
Once you have installed the plugin you can test it with the official Google Test for AMP, with the button below.
AMP For WordPress Advanced Settings And Optimal Configuration
There are a lot of configurations within the AMP plugin, I suggest you see them all and adjust it based on your needs.
Something I have found important is to enable the endpoint to “?”, under the advanced settings, it is important.
I will put a screenshot of the advanced config you should have as well down below.
Re-Test Your Website With gtMetrix Now
If you have reached this point you finally want to see some results. Now we are going to re-test your website speed with gtMetrix. You need to compare the first result you’ve got, to the one you are going to have now to see how much you speed up WordPress on your end.
I told you to run a test before adjusting all of these configurations, I hope you did a test earlier so you can compare.
To have more accurate results I advise you to turn OFF the Cloudflare “developer mode” if you have it enabled. And purge the cache from the W3 total cache plugin.
You should see a huge improvement if you test it again, but actually, the biggest improvements can be seen after a few hours when all the caching options we have enabled starts to work on your hosting.
So if you are impatience run a test again with gtMetrix using the button below. Please comment below the speed you had before starting to read this tutorial and the speed that you have right now.
I am super curious.
In conclusions, this is the best guide online and optimal settings to speed up WordPress instantly and for 100% free.
It is very normal to have websites speed of 25 even 30 seconds. With this config it can be reduced to 2 – 3 seconds or less depending on where you host your site and how much stuff you have on your sites.
All you have to do is to have:
If you are lazy to look at W3 total cache settings you can download my config! Go back to Chapter 3 and read what you still need to do.
P.S.GO BACK TO THE TABLE OF CONTENT ON TOP OF THE ARTICLE IF YOU GET LOST.
What you will learn on this blog!
Stay tuned and subscribe to my blog so you will get notifications on new posts. I will slowly break down these topics:
- SEO(Search Engine Optimization).
- Affiliate Marketing.
- Free and Paid traffic hacks.
- Coding and WordPress
- Make money with a computer and an internet connection even while you sleep.
Follow me on social media, you’ve got all the links on the right bottom side of this blog, also comment and contact me if you need help.
Here are my top resources I always use to become a great affiliate, take a look here!
Do you want to be a free man or woman? Jump in the crew then!
Much Love and Peace Out,