Let’s get this out of the way.
SiteGround and Cloudways are almost always top 2 (SiteGround for shared hosting and Cloudways for cloud hosting). I have used both and have 100% GTmetrix reports with near 100% in Google PageSpeed Insights as well as Pingdom. Even this post loads in roughly 2s and it has tons of images with a 5.26MB page size and 138 requests. Now that’s good hosting!
There are others ways to reduce server response times which I’ll cover in this tutorial: eliminating high CPU plugins, offloading resources to CDNs, configuring your cache plugin to optimal settings (I recommend WP Rocket), and fixing specific items in your GTmetrix report.
But, no optimization will replace a slow host/server. Do your research in Facebook Groups!
1. Ditch EIG And Low Quality Hosts
If you have slow server response times, I bet you’re hosted with GoDaddy, HostGator or Bluehost (EIG brands), Namecheap, A2, or another low quality host. Have you done your research in the WordPress Hosting Facebook Group? SiteGround (shared hosting) and Cloudways (cloud hosting) were by far the 2 top-rated hosts in over 40+ Facebook polls.
2. Check Your CPU Usage
Check your hosting account to make sure you’re not maxing out 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.
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.
3. Find And Eliminate High CPU 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.
Recommended Lightweight Plugins
- Backup – UpdraftPlus.
- Sliders – Soliloquy, LayerSlider, or Meteor Sliders.
- Portfolio – Envira Gallery, FooGallery, or The Grid.
- StudioPress Plugins (if using Genesis Framework)
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)
4. Upgrade To PHP 7.3
Many WordPress sites still run PHP 5 even though PHP 7.3 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.
How To Check Which PHP Version You’re Running
Install the Display PHP Version plugin to check which version you’re on. If you’re using an outdated version, login to your hosting account and upgrade to the highest possible PHP version available, then check your site for errors. If you see any, chances are one of your plugins is not compatible. You can either revert to an earlier version or use a different plugin.
Upgrade to PHP 7+ in your hosting account, then check your site for errors:
5. Configure Optimal Cache Plugin Settings
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.
- Database cleanup (built-in to WP Rocket, or use WP-Optimize)
- Heartbeat control (built-in to WP Rocket, or use Heartbeat Control)
- Lazy load images/videos (built-in to WP Rocket, or use WP YouTube Lyte)
- Host Google Analytics locally (built-in to WP Rocket, or use CAOS For Analytics)
- Host Google Fonts locally (built-in to WP Rocket, or use CAOS For Fonts, or SHGF)
- Integration with Cloudflare + other CDNs (built-in to WP Rocket, or use CDN Enabler)
6. Add Cloudflare
Here’s what WordPress says:
Here’s the bandwidth you can save with Cloudflare:
Most hosts have an option to enable Cloudflare in their cPanel:
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…
More CDNs = More Data Centers = Less Bandwidth Consumption
StackPath also has their own 30+ data centers which offloads even more resources. Cloudflare is enough for most websites, but I would use StackPath for mid to high traffic sites, and you can use KeyCDN’s speed test to see how fast your site loads in different locations. To activate Stackpath or another CDN, use WP Rocket’s CDN tab, or the CDN Enabler plugin.
7. 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.
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.
8. 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:
If not using WP Rocket, use the free WP-Optimize plugin:
9. 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
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.
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.
- Install the Imagify Plugin
- You will be prompted with instructions
- Sign up for Imagify and enter your API key
- Set your compression level (normal, aggressive, ultra)… I use aggressive
- Imagif’em all (bulk compresses all images on your site)
- Once your limit is up, buy a plan or wait next month to reset your limit
When you’re done, run your pages through GTmetrix and make sure all 3 items are 100%.
10. 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 AdSense and social widgets which are best to avoid all together), but I listed some optimizations below.
Tips For Optimizing External Scripts
- Disques – use conditional load.
- Contact Form 7 Asynchronous Loading – load it asynchronously.
- Google AdSense – use Ad Balancer and Rocket Loader.
- Google Analytics – host it locally using WP Rocket or CAOS Analytics.
- Google Maps – only use them on pages where you need them (eg. contact form)
- Google Fonts – combine Google Fonts in WP Rocket, Autoptimize, or try Self-Hosted Google Fonts/OMGF. Or, host fonts locally by downloading them directly from Google Fonts, converting them to web font files in Transfonter, and adding them to your CSS.
- Gravatars – try Optimum Gravatar Cache, FV, Harrys, or WP User Avatar.
- Embedded YouTube Videos – lazy load videos and replace iframes with preview images using WP Rocket (in the media section), or use the WP YouTube Lyte plugin.
- Prefetching – this helps browser anticipate external resources. Copy these common domains to prefetch then paste them into WP Rocket, Perfmatters, or do it manually.
- Selectively load plugins using external scripts – use Asset Cleanup or Perfmatters to disable plugins (especially those with external scripts) from loading on certain content.
11. Delete Unused Themes + Plugins
Go 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.
12. Enable Hotlink Protection
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).
13. Update WordPress Software
Keep WordPress core, themes, and plugins updated.
14. 40+ Facebook Polls On “The Best Hosting”
The polls speak for themselves:
15. SiteGround: Fastest Shared Hosting
SiteGround is used by Yoast, myself, and recommended by WordPress. They are #1 in nearly every Facebook poll and give most people significant load time improvements especially if they were using mediocre hosts: GoDaddy, Bluehost, HostGator, InMotion, Dreamhost, EIG.
I use their semi-dedicated GoGeek plan which comes with 4x more server resources than shared hosting. Click through my pages to see how fast they load, check out my GTmetrix report, or see people who migrated and posted new load times. They also do free migrations.
SiteGround is recommended by WordPress:
SiteGround has 3 plans:
Higher plans include more server resources (#1 factor in the WordPress optimization guide). Here’s the full comparison chart, but GrowBig gives you about 2x more server resources than StartUp, and GoGeek is semi-dedicated hosting which gives you even more. GrowBig and up comes with a free migration, staging, advanced caching, and ability to host multiple websites. GoGeek comes with priority support. Their cloud hosting is quite the price jump at $80/month.
You can see this on their features page:
16. Cloudways: Cloud Hosting Is Even Faster
Cloudways is even faster than SiteGround:
Their support isn’t as good as SiteGround, they don’t support email hosting, and they are more expensive starting at $10/month (I recommend their DigitalOcean or Vultr plan). But for pure performance, you can’t go wrong with them. There are usually #1 or #2 in Facebook polls and my Cloudways review includes tweak in your CW dashboard that make your site even faster.
They have 5 cloud hosting providers to choose from:
Never tried managed cloud hosting? It makes a huge difference.
They also do free migrations:
Feedback on Cloudways:
(save 25% for 2 months with promo code OMM25)
17. Migration Results
Here are people who migrated to SiteGround or Cloudways and improved their server response time, load time, and Pingdom/GTmetrix reports. Using a more powerful server can make drastic improvements if you’re with a low quality host. Both will migrate you for free.
People who migrated to SiteGround:
People who migrated to Cloudways:
Do your research is all I’m sayin’:
18. Frequently Asked Questions
Why 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 <200ms. However, this is usually only possible if you are knowledgable about website optimization and are using fast hosting.
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.
Does hosting matter?
Yeah, it does. It’s your hosting server we’re talking about.