How To Reduce Server Response Times (Time To First Byte) In WordPress To Under 200ms: Item In Google PageSpeed Insights

Home » WordPress Hosting » How To Reduce Server Response Times (Time To First Byte) In WordPress To Under 200ms: Item In Google PageSpeed Insights

So you ran your WordPress site through Google PageSpeed Insights and need to reduce server response times.

Servers are controlled by your hosting. The easiest way to reduce server response times in WordPress is to upgrade to a more powerful server since shared hosting has strict CPU limits. Also try using a CDN to offload resources, remove high CPU plugins, and clean your database.

Shared hosting (GoDaddy, Bluehost, HostGator, even SiteGround) has insufficient server resources to make sure your WordPress site fast, let alone run high CPU plugins and tasks like WooCommerce, Elementor, WPML, or AdSense. Even SiteGround has strict CPU limits. Moving from shared hosting to cloud hosting should immediately fix this. Otherwise, you will need to reduce server response times by lowering CPU usage and lightening the load on your server.

Reduce-Server-Response-Times-WordPress

TLDR; Cloudways is who most people recommend in Facebook Groups and will fix your TTFB.

Short Server Response Time

Reduce-Server-Response-Time-Facebook

 

1. Avoid EIG And Poor Hosting

If you have slow server response times, I bet you are hosted with GoDaddy, EIG brands (Bluehost or HostGator), Namecheap, or another low quality host. Even SiteGround has many complaints about a slow TTFB especially on their cloud hosting. Do your research on EIG, SiteGround’s TTFB, and join the WordPress Hosting Facebook Group to get unbiased opinions.

List-Of-EIG-Brands

Cloud hosting makes a huge difference.

Managed Hosting Poll

 

2. Upgrade To Cloud Hosting

Cloudways (cloud hosting) is much faster than shared hosting, including SiteGround.

Since they do free trials and free migrations, I suggest migrating to their DigitalOcean plan and retesting your server response time in PageSpeed Insights, as well as TTFB in GTmetrix and Google Search Console’s “time spent download a page”. Here’s what happened when I moved.

SiteGround-vs-Cloudways

Here’s what happened when other people moved:

Cloudways Response Times

WP Engine To Cloudways

DigitalOcean Pingdom Report

Godaddy to DigitalOcean Migration

Cloudways Server Response Times

Cloudways Load Time Improvement

Cloudways vs WP Engine

Untitled

Cloudways Pingdom Load Times

Cloudways Pingdom Report

Vultr Migration

Namecheap To Cloudways Migration

Cloudways WooCommerce Migration

Cloudways AWS Migration

I signed up for 15+ hosting accounts to test their speed. All domains in this video are live, which means you can visit them in real-time and click through their pages, use GTmetrix, etc.

Each website is identical except for it’s hosting (same Astra Starter Site, SSL, no caching, no CDN, and the same 6 plugins). I also used WP Hosting Performance Check and KeyCDN to measure the most popular options. The results align with what most people are saying in the WordPress Hosting Facebook Group which I recommend joining to get real, unbiased opinions.

Hosting-Comparisons-Pingdom

 

3. Check Your CPU Usage

Check your hosting account to make sure you’re not maxing out your CPU limits. Try to never exceed 80% of your limits so your server stays relaxed. On cloud hosting, you can add more CPU + RAM which will help, and on shared hosting you will have to upgrade your plan. But before you do, follow this guide as it should also help you reduce CPU consumed by your site.

Reduce-CPU-Usage-WordPress

That’s why it’s so important to choose a plan with enough server resources. Host companies give you guidelines based on your monthly visitors, but they don’t take into account how many plugins you have, whether they consume lots of resources, and whether you’re using a CDN.

SiteGround-Server-Resources-Comparison

 

4. Eliminate High CPU Plugins

*Most slow WordPress plugins include social sharing, statistic (analytics), sliders, portfolios, page builders, calendars, chat, contact forms, related post, sitemap, Wordfence, WPML, WooCommerce, and any plugin that runs ongoing scans or processes. These can be identified using Query Monitor or Waterfall in GTmetrix.

  1. AddThis
  2. AdSense Click Fraud Monitoring
  3. All-In-One Event Calendar
  4. Backup Buddy
  5. Beaver Builder
  6. Better WordPress Google XML Sitemaps
  7. Broken Link Checker
  8. Constant Contact for WordPress
  9. Contact Form 7
  10. Contextual Related Posts
  11. Digi Auto Links
  12. Disqus Comment System
  13. Divi Builder
  14. Elementor
  15. View Full List Of 65 Slow Plugins

Use GTmetrix To Find Your Slowest Plugins
If you see a plugin showing multiple times in GTmetrix, or it takes a long time to load in the Waterfall tab, you should either delete it or replace it with a more lightweight, faster plugin.

Slow WordPress Plugin

Lightweight Plugin Alternatives

Other Plugin Tips

  • Be minimal
  • Deactivate + delete all plugins you don’t use
  • Avoid plugins that have duplicate functionality
  • Turn of specific plugin settings that consume CPU (eg. Query Monitor and Broken Link Checker constantly scan your site and consume CPU, delete them when you’re done)

 

5. Upgrade To PHP 7.4

Many WordPress sites still run PHP 5 even though PHP 7.4 is much faster. That’s because hosting companies won’t automatically upgrade your PHP version (due to potential compatibility issues) which you can use the PHP Compatibility Checker plugin to check for.

WordPress PHP Benchmarks

Upgrade to PHP 7.4 in your hosting account, then check your site for errors:

PHP-7.4

 

6. Configure Optimal Cache Plugin Settings

Most people don’t configure their cache plugin to the optimal settings. I have written popular tutorials on configuring WP Rocket, WP Fastest Cache, W3 Total Cache, and WP Super Cache.

With most other cache plugins, you would need to install about 6 extra plugins to get these features, when WP Rocket has them all built-in, reducing the number of plugins on your site. If you’re like me, you only want to use 1 plugin, otherwise you will need to research which features your cache plugins comes with, then install these plugins if it doesn’t support them.

WP-Rocket-Features

2016 best cache plugin poll2019 cache plugin poll

Swift vs WP Rocket

2016 cache plugin pollBest cache plugins 2018 poll

wp rocket vs w3 totla cache

 

7. Add Cloudflare

Cloudflare’s free CDN offloads bandwidth consumption to their data centers (putting less stress on your server) while reducing the geographical distance between your server/visitor.

Here’s what WordPress says:

CDN-WordPress-Recommendation

Here’s the bandwidth you can save with Cloudflare:

Cloudflare-Bandwidth-Savings

Most hosts have an option to enable Cloudflare in their cPanel:

SiteGround-Cloudflare-Activation

You can also setup Cloudflare using most cache plugins (below is for WP Rocket), but WP Fastest Cache and W3 Total Cache also have options for Cloudflare + CDN integration…

WP-Rocket-Cloudflare-Add-On

 

8. Block Unwanted Bots

Have you checked your Wordfence live traffic report lately?

I did, and I saw the same few bots were hitting my site constantly and putting stress on my server. Obviously Googlebot and other ones are good, there may also be spam bots hitting your site. Unless you check, you’ll never know. Here’s what I did, and what you should do too:

Step 1: Install Wordfence.

Step 2: View the live traffic report for a few minutes to see who is hitting your site in real-time.

Live-Traffic-Report-Wordfence

Step 3: Take note of sketchy-looking bots constantly hit your website. Google their hostnames to see if other people are reporting them as spam (Googlebot and Bingbot are obviously okay).

Step 4: Block all spam bots (you have a few options here). Wordfence has blocking settings as well as rate limiting rules. However, Wordfence consumes a lot of CPU itself. The alternatives are Blackhole For Bad Bots, Block Bad Queries, or Cloudflare Firewall Rules (this is what I use). You can create up to 5 free firewall rules which means you can block your top 5 spam bots. Just copy their hostname from Wordfence, then block it in Cloudflare. Be sure to use an asterisk* so any variations of that bot are also blocked: amazonaws.com linode.com are 2 common ones.

Cloudflare Firewall Rule To Block Bad Bots

 

9. Clean Your Database

If you deleted a plugin, theme, have lots of post revisions, spam comments, or expired transients, clean your database. You should do this every week or so to keep your site fast.

If using WP Rocket, run this in the database settings:

WP-Rocket-Database-Settings

If not using WP Rocket, use the free WP-Optimize plugin:

WP-Optimize Clean Database

 

10. Optimize Images

We’ll use GTmetrix for this. Run your site through GTmetrix and in your report you’ll see images can be optimized 3 ways. GTmetrix only shows unoptimized images for a single page so start by optimizing images that appear on multiple pages (logo, sidebar and footer images), then run your most important pages through GTmetrix and fix individual images on those too.

There are 3 ways to optimize images in GTmetrix:

  • Serve scaled images – resize large images to be smaller
  • Specify image dimensions – specify a width/height in the image’s HTML or CSS
  • Optimize Images – losslessly compress images using Imagify

image-optimization

Serve Scaled Images – GTmetrix tells you which images are too large and the dimensions they need to be resized to. Find the image, crop or resize it, upload it to WordPress, then replace the old image with the new one. Follow your “image containers” and create a cheat sheet (below). You can manually check for large images by right clicking an image → copy image address then go to that URL where you should see if it’s too large. Never use the drag to resize feature in the visual editor since this only resizes the displayed image (not the actual image).

Sample cheat sheet:

  • Logo: 150(w) x 37(h)
  • Sliders: 1950(w) x 550(h)
  • Sidebar Widgets: 319(w)
  • Blog content body: 600(w)
  • Featured images: 200(w) x 200(h)
  • Carousel images: 225(h)

Specify Image Dimensions – refer to your GTmetrix report and expand these items to see which images need this. Locate each one in WordPress, then specify the dimensions (width/height) which GTmetrix will tell you. The visual editor takes cares of this automatically so you usually have to do this with images that are in widgets, page builders, and other places.

specify-image-dimensions

Optimize Images – losslessly compress images using Imagify or Kraken (both are free until you reach the monthly limit). While there are other completely free plugins that offer unlimited compressions, do NOT use these since they have bugs, won’t work, or will break your images.

Imagify Instructions

  1. Install the Imagify Plugin
  2. You will be prompted with instructions
  3. Sign up for Imagify and enter your API key
  4. Set your compression level (normal, aggressive, ultra)… I use aggressive
  5. Imagif’em all (bulk compresses all images on your site)
  6. Once your limit is up, buy a plan or wait next month to reset your limit

imagify

imagify-wordpress-image-optimization

When you’re done, run your pages through GTmetrix and make sure all 3 items are 100%.

 

11. Optimize External Scripts

If you’re using third party scripts, these cause extra requests and will show up in your GTmetrix report. Some scripts are difficult or even impossible to optimize (especially Google AdSense and social widgets which are best to avoid all together), but I listed quite a few optimizations below.

Third-Party-Usage

Tips For Optimizing External Scripts

 

12. Delete Unused Themes + Plugins

Head to Appearance → Themes and delete any themes you’re not using. You can keep one version (eg. Twenty Seventeen theme) in case something goes wrong with your active theme.

Delete Unused WordPress Themes

Delete WordPress Plugins

 

Cloudflare and some hosting companies let you enable hotlink protection which prevents people from copying/pasting your images on their website (which sucks up your bandwidth).

Cloudflare Hotlink Protection

 

14. Update WordPress Software

Keep WordPress core, themes, and plugins updated.

WordPress Updates

 

15. Frequently Asked Questions

✅ What causes a slow server response time?

Servers are controlled by your hosting. If you're using a low quality host or are putting too much stress on your server (eg. too many plugins), this can cause slow response times.

✅ Which hosting has slow servers?

GoDaddy, Bluehost, HostGator, and EIG brands are infamous for having slow servers. The top 2 rated hosts in Facebook polls are usually SiteGround (shared hosting) and Cloudways (cloud hosting). Migrating to a faster host is the easiest way to remedy a slow server.

✅ What is a good server response time?

Google recommends a server response time of

✅ What affects server response times?

Hosting, cache plugins, high CPU plugins, spam bots crawling your site, whether you're using a CDN, and optimizing images can all affect server response times.

✅ How do you measure server response times?

Google PageSpeed Insights is the best way to measure server response times.

Conclusion: join the WordPress Hosting Facebook Group to get real, unbiased opinions. Look at the Facebook polls that were taken and people who migrated to different hosts and posted their results. Finally, stay clear of low quality hosting affiliates who only want the commissions.

Do your research is all I’m sayin’:

Bluehost-Managed-WordPress-Hosting

HostGator Feedback

Godaddy Managed WordPress Hosting Feedback

Cheers,
Tom

Subscribe
Notify of
guest
10 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments