Let me guess why you landed here: You just checked Google Pagespeed Insights and it said you need to redue server respsonse time to under 200ms.
Yes? Awesome keep on reading! No? Still keep reading!
Servers are controlled by your webhosting company. So if they use outdated PHP Versions or limit your resources to a degree that the server can’t keep up with your resource consumption you are pretty much screwed and left with shitty server response times.
Here are some webhosting companies you either host yourself on or are familiar with:
- Hosgator
- iPage
- Bluehost (although I recommend Bluehost also for beginners and very small websites)
These are webhosting companies owned by EIG. If you happen to host your website with one webhosting company owned by the infamous EIG brand your best bet is to switch to another webhosting company such as Siteground, which I use for most of my website projects and is also rated #1 countless times on various polls (just check out the screenshots below).
Why are EIG hosting companies so bad you ask?
Simple: They are known for throwing too many websites on the same server causing the performance of each website to drastically go down. So if you happen to host with a hosting company owned by EIG, move over to Siteground as fast as possible – lucky for you they also offer free migrations.
And while switching your webhosting company might already cause a huge increase in website performance there are also other things we are going to cover in this post
Contents
Find And Eliminate High CPU Plugins
Using the Pingdom Website Speed Test you can easily hunt down the plugins that cause your website to be slower than a government employee (no hate fellow government employees, I still like you).
Once you find a plugin that causes severe loading times or needs several requests make sure to delete it or find an alternative lightweight solution.
The typical plugins that are causing such loading times are slider-plugins, page-builders, live-chat, plugins that run ongoing scan, etc.
Also make sure to:
- delete unused plugins
- turn off plugin setting that use too much of your resources (scans and statistic plugins)
- only have the least amount of plugins necessary
Get Rid Of Your EIG Hosting Company
As I mentioned in the beginning be aware of hosting companies owned by EIG (Endurance International Group). They own tons of hosting companies including big brands like Bluehost, Hostgator, iPage, Fatcow etc.
For a full and updated list check this article right here: https://en.wikipedia.org/wiki/Endurance_International_Group
If you host with them my suggestion would be to sign up with Siteground and get a free migration from their team. This might already be the solution to your problem because Siteground is ranked #1 in various polls and constantly beating the competition year after year.
If you don’t trust my bold statement just check out various facebook polls with hundreds of users rating Siteground #1 as well:
Upgrade Your PHP Version
Even though PHP 7 is much faster most WordPress sites still run on PHP 5. That’s because users don’t know about it and hosting companies won’t upgrade to the latest PHP version automatically due to potential compatibility issues.
No clue on which PHP version you are running?
Install the Display PHP Version plugin to check which version of PHP you’re running. You should at least be running PHP 7. If you see an earlier PHP version such as PHP 5 contact your hosting provider and ask if they can upgrade you or (if you are using cPanel or have access to cPanel) click to the PHP Tab and upgrade to PHP 7+.
If you are using Siteground, you can use their SG Optimizer plugin and upgrade to the latest PHP Version available.
Upgrade To HTTP/2 Servers
To see if your server comes with HTTP/2.0 just throw it into the HTTP/2 testing tool. Some hosts still don’t use the the latest HTTP version so you’re better of using a hosting company that does (*cough* Siteground *cough*).
What HTTP/2 is you ask?
It’s the latest HTTP version introduced in 2015 and to quote Wikipedia it:
allows the server to “push” content, that is, to respond with data for more queries than the client requested. This allows the server to supply data it knows a web browser will need to render a web page, without waiting for the browser to examine the first response, and without the overhead of an additional request cycle.
If you don’t know what that means just know that it makes your website responding and loading faster.
Configure A Cache Plugin
Most people either don’t configure their caching plugins or don’t use them at all.
Let’s get started with WP Superache
This plugin can be overwhelming for those non-techy people although it’s actually pretty simple.
Ok, so WP Super Cache is just a bunch of checkboxes you need to configure.
Easy Section:
Just check “Caching On” and head to the next tab.
Advanced Section:
You’re going to need to check the following boxes:
- Cache hits to this website for quick access.
- Use PHP to serve cache files.
- Cache rebuild.
- Mobile device support.
- Coarse file locking.
That’s all the settings done, underneath here will be the “Expiry Time & Garbage Collection” I set this to “Clock” and 00:00 with the interval being daily. Even if you forget to expire the cache when you update your site, it’ll automatically expire at midnight everyday anyway.
CDN Section:
This is only if you have a CDN, depending on which service you use will depend on how you need to input your settings here, most CDN providers have a WordPress guide.
Preload Section:
If you don’t have any interactive parts to your website, like blog comments etc… Then you can use this tab to serve static pages, which load quicker and save server resources. Just set the time to every 0 minutes, check the “Preload mode” and “Preload tags boxes” and select “Less Emails”.
Autoptimize
This plugin has very few settings but does a whole heap of work. Just check the Optimize Javascript code and Optimize CSS code buttons and you’re good to go.
If you have a CDN, then you’ll also need to add in your base URL. We’ll cover adding in a CDN later on as well.
Use A CDN
A Content Delivery Network (CDN) delivers your content through its’ network of server locations. Pretty straight forward right? Due to the nature of geographically being close to your end user it the perks of a CDN is high availability and high performance.
Here are 2 popular CDNs:
Free: CloudFlare (that is suitable to for smaller websites)
Simply signup at: https://www.cloudflare.com/
Add your site and follow the instructions… You’ll be able to harness the multiple data centres around the world CF own, for free.
Paid: MaxCDN (get this if you’re running high traffic websites)
You can get there monthly packages pretty cheap: https://www.maxcdn.com/pricing-payg/
Make sure you get their extra locations pack if you’re targeting countries like Australia and China. You can also set this up in WP Super Cache really, really easily.
Configure WP Disable
WP Disable lets you disable unnecessary settings in WordPress that consume CPU and slow down your site. It also has options for heartbeat control and other options that reduce response times.
Quickstart Guide on WP Disable:
- The more yellow settings, the better
- You can also offload Google Analytics tracking
- Optimizing fonts can greatly improve load times
- Schedule spam deletion
- Disable emojis, Google Maps, and Gravatars if not needed
- Pingbacks and trackbacks aren’t usually worth the extra resources
- Set post revisions to 3-10 so you have backups, but you don’t need hundreds
Clean Your Database
You can use the free WP-Optimize plugin and check the following:
- Clean all post revisions
- Clean all auto draft posts and posts in trash
- Remove spam comments and comments in trash
- Remove pingbacks
- Remove trackbacks
Optimize Images
Cut the file size of your images using WP Smush
There is a Pro version of this plugin, if your website is big then I suggest grabbing this as it’ll lower your image file sizes massively, which helps in terms of server resources (bandwith cost) and lowering your load times. WP Smush allows you to automatically shrink your images, by running them through Smush’s servers when you upload a file, as well as being able to optimize any current images hosted.
Navigate to WP Smush’s settings page, found here:
/wp-admin/upload.php?page=wp-smush-bulk
And click “Bulk Smush Now” – Depending on how many images you have hosted, this could take some time.
Note: The free version doesn’t let you smush images over 1mb. You’ll need to
upgrade to Pro for this.
Avoid External Requests
Every tiny bit of data you are loading from another website completely ruins your pagespeed. Try to minimize external requests as much as possible. I can’t give you a blueprint on how to solve this, because it is something you would need to check yourself and decide if you can get rid of it or not.
Activate GZIP
Just put that in your .htaccess file: