How To Fix A Slow Website On HostGator’s WordPress Hosting

HostGator Slow

Have a slow WordPress site on HostGator?

If your WordPress site is slow on HostGator, you can speed it up by upgrading to PHP 7.3, configuring a cache plugin, using Cloudflare, and optimizing your images, database, and plugins.

To check if HostGator’s hosting is slow, run your site through Google PageSpeed Insights to see if reduce server response times is in your report. If yes, your HostGator server is slow. This may be because you’re running resource-hungry plugins like WooCommerce or Elementor, since shared hosting often doesn’t have enough server resources to accommodate high CPU plugins.

HostGator’s shared hosting is infamously slow and there are countless complaints about their slow servers in Facebook Groups. I suggest joining a few (like the WordPress Hosting Facebook Group) to get real, unbiased opinions. There are much better options like DigitalOcean on Cloudways which is who most people recommend and #1 in many Facebook polls. HostGator is owned by EIG (a publicly traded company) who is infamous for overcrowding servers for profits.

Benchmark your scores + load times in GTmetrix and post them in the comments! And if you need help, leave your GTmetrix report in the comments and I’ll provide you with suggestions.

Quick Ways To Fix A Slow HostGator Website

  • Upgrade to the latest PHP version in HostGator
  • Install a solid cache plugin with a Cloudflare’s CDN
  • Use a fast page builder like Oxygen instead of Elementor
  • Use fast plugins and avoid commonly known slow plugins
  • Combine Google Fonts and be minimal with fonts and weights
  • Avoid uploading very large images which show errors in GTmetrix
  • Compress images using an image optimization plugin like TinyPNG
  • Remove junk from your database and delete tables left behind by old plugins
  • Lazy load images and videos which are often the heaviest elements on a page

 

1. Check For Slow Server Response Times

Run your WordPress site through Google PageSpeed Insights to see if reduce server response time shows in the report (Google recommends 200ms). Servers are controlled by your hosting.

Reduce-Server-Response-Times

Another indicator is if your TTFB is slow in GTmetrix (can also be seen in the structure tab).

OMM TTFB

A warning about HostGator: HostGator is one of the slowest hosts. I set up an identical Astra website on hstgtrserver.com and cwdoserver.com. One is hosted on HostGator’s Optimized WordPress Hosting, one is on Cloudways DigitalOcean who was rated the #1 host in Facebook polls, conversations, or see these migration results. Visit the websites and click through their pages – you will see the difference in speed.

 

2. Upgrade To PHP 7.3

Most WordPress users are running outdated PHP versions when upgrading can make your site 2-3x faster. HostGator will not upgrade you automatically (because they don’t want to risk breaking your site) so you need to do this yourself as HostGator releases new PHP versions.

WordPress PHP Benchmarks

HostGator’s Optimized WordPress Hosting does not have cPanel, so you cannot upgrade PHP versions yourself. You will need to contact support to have them do it. You can try these instructions, but I had to have their support team do this for me.

How To Update PHP Versions On HostGator

  • In your HostGator cPanel, go to Software → MultiPHP Manager.
  • Upgrade to PHP 7.3.
  • Check for errors. If you see any, revert to an earlier version.
  • Keep this updated as HostGator releases new PHP versions.

Supported-PHP-Versions

 

3. Configure A Solid Cache Plugin

WP Rocket and WP Fastest Cache are usually rated highest in Facebook polls.

Many features are built-in to WP Rocket (database cleanup, heartbeat control, lazy load, etc) while WP Fastest Cache and other cache plugins don’t come with these features. In other words, WP Rocket lets you use 1 plugin for everything instead of having to install multiple plugins. That’s also why WP Rocket usually gives you better scores and load times in GTmetrix.

The following features are built-in WP Rocket. But if you’re using another cache plugin that doesn’t come with a specific feature, you’ll need to install these plugins:

WP Rocket is #1 in most Facebook polls (click thumbnails to enlarge):

Here are tutorials for configuring the ideal WP Rocket and WP Fastest Cache Settings. I also have configuration tutorials for W3 Total Cache, WP Super Cache, and Autoptimize settings.

A glimpse of the WP Rocket settings (file optimization tab is the most important):

WP-Rocket-File-Optimization-Settings

HostGator does have an option to enable cache in the cPanel which you should leave disabled if you’re using a cache plugin. Cache plugins take care of many other optimizations other than caching (eg. minifying HTML, CSS, JS) and you will get much better results with a cache plugin.

HostGator Cache

 

4. Use Cloudflare’s CDN

Cloudflare’s CDN hosts your website on 200+ centers and reduces the distance between your server and visitors. It also helps offload resources which can reduce your server response time.

1. Sign up for a free Cloudflare plan, add your website, and run the scan.

Add Site To Cloudflare

2. You will eventually come to a page where Cloudflare assigns you 2 nameservers.

Cloudflare-GoDaddy-Nameservers

3. HostGator says you will need to contact them to set up private nameservers.

Unfortunately you need private nameservers on HostGator to do this which is only available on their reseller account, VPS, and dedicated server. I have no idea why they do this. WP Rocket and W3 Total Cache have settings for Cloudflare – you can try setting it up through one of these (let me know if this works in the comments please!)

HostGator Private Nameservers

4. Once they do, find them and enter the nameservers provided by Cloudflare.

HostGator Nameservers

5. Go to your Cloudflare speed settings and use these:

Cloudflare-Speed-Tab

6. Go to Cloudflare’s caching settings and Purge Everything.

Cloudflare Purge

All done! It can take 24 hour for Cloudflare nameservers to propagate so be patient :)

 

5. Rethink Your Page Builder

Elementor and other page builders add lots of scripts to your website.

You can check these using Perfmatters or Asset CleanUp. The only builders I recommend are Gutenberg, Oxygen, and GeneratePress. I made the mistake of having my site redesigned in Elementor and you can see how many times it’s in the source code. Add other Elementor plugins like Ultimate Addons and Premium Addons, and you could end up with a slow site. While you can disable some of these scripts, many need to load for your site to work properly.

Remove Unused Elementor CSS JavaScript

Elementor Souce Code

 

6. Avoid Slow Loading Plugins

Thank you Ivica from the WordPress Speed Up Facebook Group for contributing to this list.

  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 73 Slow Plugins

Be sure to deactivate/delete all plugins you’re not currently using. If you only use a plugin at certain times, deactivate/delete it – then reinstall the plugin when needed.

Disable Plugins On Specific Pages/PostsPerfmatters and Asset CleanUp let you selectively disable plugins on specific pages/posts. For example, if you’re only using your contact form on the contact page, disable it everywhere else. Or if you only use social sharing buttons on the blog, disable it on all your pages. Going through your scripts/plugins, viewing their size, and disabling plugins where they’re not being used can significantly improve scores and load times.

perfmatters-script-manager

 

7. Optimize Images

There are 5 primary ways to make images load faster:

  • Serve scaled images: resizing large images to be smaller.
  • Losslessly compress images: compress images using a plugin.
  • Lazy load images: delays loading images until you scroll down the page.
  • Specify image dimensions: add a width/height to the image’s HTML or CSS.
  • Serve images in next-gen formats: convert images (eg. to WebP) format using a plugin.

Serve Scaled Images
Serve scaled images are found in GTmetrix where they tell you which images are too large and the dimensions they should be resized to. GTmetrix only shows unoptimized images for a single page. Resize them, reupload them, and replace the old images with the new ones. It’s best to resize images BEFORE uploading them, and to create an “image dimension cheat sheet” listing the dimensions of all your different image sections (logo, sliders, widgets, full width blog images, etc). Start by fixing images that appear on multiple pages (logo, sidebar, and footer images) then run your most important pages through GTmetrix and optimize individual images.

Serve Scaled Images

Losslessly Compress Images
This is the “optimize images” item in GTmetrix. I personally use ShortPixel but Imagify is also good. Install an image optimization plugin, set your compression level, and test a few images to make sure you are happy with their quality. Most plugins are free until you reach their limit.

ShortPixel-Image-Compression-Levels

Lazy Load Images
Lazy load delays the loading of photos, videos, and iframes so they only load once you scroll down the page and see them. Videos are heavy so I suggest at least doing that – I don’t lazy load photos since it can be annoying to load photos as you scroll down. WP Rocket has an option for this in the Media tab, otherwise you can use a plugin like A3 Lazy Load and WP YouTube Lyte.

WP-Rocket-Lazy-Load

Specify Image Dimensions
Specify image dimensions means you need to locate the image, view it’s HTML, and add a width and height in the HTML (which is provided by GTmetrix). Since the WordPress visual editor and most page builders do this automatically, it only usually happens in hand-coded HTML or CSS.

Specify-Image-Dimensions-WordPress

Serve Images In Next-Gen Formats
Found in PageSpeed Insights, WebP and SVG formats can have better quality and compression than JPEG and PNG. Depending on which format you choose, most image optimization plugins have an option to convert your images to WebP format or for SVG, use the SVG Support plugin.

 

8. Remove WordPress Bloat

The Perfmatters plugin lets you disable pingbacks, trackbacks, heartbeat, and limit autosave intervals and post revisions. It also lets you host Google Analytics locally and selectively disable plugins from specific pages/posts. The only other plugin I know that does this is WP Disable, Clearfy, and Asset CleanUp, but I have tested them and personally use Perfmatters on my site.

perfmatters-settings

 

9. Clean Your Database

You can do this in WP Rocket’s database tab (below), otherwise use the WP Optimize plugin. Backup your website if this is your first time doing it and schedule this for weekly or monthly.

WP-Rocket-Database-Settings

One thing I like about WP-Optimize is that it lets you delete old tables left behind by plugins you deleted (shown as “not installed”). If you don’t plan on using the plugin again, delete these.

WP-Optimize-Tables

 

10. Fix Redirect Errors

Usually means you changed the WWW or HTTP(S) version of your site, but your links/images are still using the old version. You need to correct ALL these which can be done in bulk using the Better Search Replace plugin. GTmetrix will only show you errors for that page, so test a few pages out in GTmetrix to make sure you took care of all redirects throughout your website.

minimize redirects

Better-Search-Replace-WWW-Versions

 

11. Avoid External HTTP Requests

Third party scripts can be found in the reduce DNS lookups section of GTmetrix. These are anything that creates HTTP requests from outside websites (Google Fonts, Analytics, Maps, AdSense, embedded YouTube videos, and even social sharing buttons or social media widgets).

Some scripts are easy to optimize:

  • Optimize fonts with the OMGF plugin
  • Host Google Analytics tracking code locally
  • Disable and optimize Gravatars on blog comments
  • Generally, only use a Google Map on the contact page
  • Replace YouTube iframe with preview image (in WP Rocket)

Other scripts like Google AdSense and Google Tag Manager are much more difficult and can absolutely ruin your GTmetrix report, which is why I recommend affiliate marketing instead.

Third Party Usage

Preconnect + Prefetch
If you absolutely must use an external resource throughout your site, you should preconnect/prefetch it. This basically lets the browser anticipate external resources to make it load faster. WP Rocket, Perfmatters, and other plugins have options for this, otherwise you can also use the Pre* Party Resources Hints plugin. If using StackPath, you should also add your CDN URL here. Luke (from Bluehost) created a list of common domains to prefetch on GitHub.

 

12. Fix Bottlenecks In GTmetrix

Slow plugins, images, scripts, and individual elements can all be found in your GTmetrix Waterfall tab. Learn which elements take longest to load and focus on those optimizations. Good hosting and correctly configuring a solid cache plugin should fix most errors in GTmetrix.

GTmetrix Report - OMM
For how long this post is with tons of images/comments, it still loads in .8s

Other Optimizations To Consider

  • Use a lightweight WordPress theme
  • Avoid page builders (or if you do use one, use Oxygen)
  • Optimize WooCommerce scripts, styles, cart fragments in Perfmatters

 

13. Consider Moving To Cloudways

Lighthouse fails your TTFB if it’s over 600ms.

If you have a slow TTFB, join the WordPress Hosting Facebook Group (WP Speed Matters is good too) to get unbiased feedback since most hosting recommendations are honestly garbage.

I use Cloudways is who is #1 in most recent Facebook polls and my TTFB is consistently <200ms. I’m currently on their Vultr High Frequency plan, but DigitalOcean is good too. It’s $10-$13/month, but we’re talking about fast cloud hosting, not cheap hosting with slow TTFBs.

Instead of reading biased reviews, I encourage you to do your own research. Join Facebook Groups and look at polls, migration results, and conversations on “the best hosting” (shown below). Check out Backlinko’s PageSpeed Test where he found SiteGround had a slow TTFB. You already know GoDaddy and EIG brands (Bluehost + HostGator) are not good choices. WP Engine went downhill, Hostinger writes fake reviews, and NameCheap is mainly for domains.

Recent Facebook polls show many people are moving away from low quality hosts to Cloudways, LiteSpeed, Kinsta, GridPane, and A2 Hosting (click on thumbnails to enlarge):

Moving from SiteGround
eCommerce Hosting Poll

People who moved to Cloudways and posted their results (click thumbnails to enlarge):

Cloudways Numbers
Cloudways-BuddyBoss
Cloudways Shoutout
Giving them a shout out in the WordPress Hosting Facebook Group
GTmetrix Report - OMM
I use Vultr High Frequency and you can click through my site to see how fast it loads
Digital Ocean Recommendation
DigitalOcean is also good and recommended in the WordPress optimization guide

Why I use Cloudways:

  • My TTFB is consistently <200ms
  • The WordPress admin loads instantly
  • Easier to pass web vitals on cloud hosting
  • Monthly pricing and free 3-day trials are nice
  • Server-level caching (Redis makes a big difference)
  • They do a free migration and have a migrator plugin
  • Support is fast/helpful as reflected in Trustpilot reviews
  • Choice of 5 cloud hosts: DO, Vultr, AWS, Google Cloud, Linode
  • They have a Cloudways Users Facebook Group to ask questions
  • Only major con is no email hosting, but there’s an option for Rackspace

Affiliate Disclaimer – if you sign up for Cloudways with my affiliate link, thank you! Most affiliates recommend things only for commissions but I take mine seriously and support them with evidence. I also donate to GoFundMe campaigns and everything helps. They do free migrations but if you have questions about launching a server or anything else, you can reach out to me by leaving a comment. Cheers to a faster TTFB.

Cloudways Coupon Code
Sign up for Cloudways using promo code OMM25 to get 25% off 2 months

 

Hire My WordPress Speed Optimizer

Still need help with your GTmetrix report?

I’ve been working with Pronaya for 7 years (he’s the one who optimized my GTmetrix report). You can hire him by signing up for freelancer.com and searching for username bdkamol. Here is his full WordPress speed portfolio. He’s $40/hour from Bangladesh (so there is a time change) and you can email him at bdkamol@gmail.com. He also has a perfect 5 star review on his profile. Serious inquiries only, and please don’t expect 100% scores if you’re HostGator’s slow WordPress hosting, a bloated theme, and tons of heavy plugins. Please follow this guide first.

Pronaya-Kumar-S-Reviews

 

Frequently Asked Questions

How can I speed up my site on HostGator?

Upgrade to the highest possible PHP version inside your HostGator account, configure a good cache plugin like WP Rocket, optimize images with ShortPixel, set up Cloudflare's CDN, and avoid common slow plugins. This will be a great start to make your site faster.

How do you upgrade PHP versions?

Login to your HostGator account and find the PHP Selector. Upgrade to the highest version. Test your website for errors. It's a good idea to take a backup beforehand.

Which cache plugin will yields the best results?

WP Rocket is usually rated the best cache plugin in Facebook polls and will typically yield the best results since it has more speed optimization features than other cache plugins.

Which plugins cause slow load times?

The most common slow plugins include social sharing, statistics (analytics), sliders, portfolios, page builders, calendars, and live chat plugins. WooCommerce sites are usually slower because they require extra scripts, styles, cart fragments, and usually more plugins as well. See my list of 73+ slow plugins to avoid.

How do you set up a CDN?

Sign up for a free Cloudflare account, copy the 2 nameservers provided by Cloudflare, and change nameservers to Cloudflare's in your domain registrar.

See Also: How I Optimized My WordPress Site To Load In <1s

I hope you found this tutorial helpful! Retest your site in GTmetrix and if your WordPress hosting is still slow on HostGator leave me a comment and I’ll be glad to help. I tried to include everything here but I know it can get technical, so drop me a line if need be. Or if you were able to make your site faster, I would love to hear about your new scores and page load times.

Cheers,
Tom

About Tom Dupuis

Tom Dupuis 2017Tom Dupuis writes WordPress speed and SEO tutorials out of his apartment in Denver, Colorado. In his spare time, he plays Rocket League and watches murder documentaries. Read his bio to learn 50 random and disturbing things about him.

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