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

Hostgator slow

Have a slow WordPress site on HostGator?

To check if HostGator is slow, run your site through PageSpeed Insights and check for slow server response times (TTFB). Google flags your TTFB if it’s over 600ms, but 200ms is ideal. TTFB is directly related to your hosting speed, so you can identify HostGator as the problem.

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

But HostGator’s shared hosting is infamously slow and there are many complaints about their slow servers. I suggest joining the WordPress Hosting Facebook Group to get unbiased opinions. Cloudways was rated the #1 host in most recent Facebook polls. I use their Vultr High Frequency plan and my TTFB is under 200ms. This guide should help make your website faster while helping you pass core web vitals, but I recommend moving away from HostGator.

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.


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

Omm ttfb gtmetrix

A warning about HostGator: HostGator is one of the slowest hosts. I set up an identical Astra website on and 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.

Kinsta 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.



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):


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.


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:


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.



7. Optimize Images

There are 5 image optimization recommendations in PageSpeed Insights:

  • Properly size 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.
  • Use explicit width/height: 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.

Properly Size Images
Properly size images shows you which images are too large and the dimensions they should be resized to. PageSpeed Insights only shows unoptimized images for a single page. Resize them, upload the new images, and replace them. 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 PageSpeed Insights and optimize individual images.

Properly size 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.


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.


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.


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.



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.


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.



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



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.

Omm gtmetrix 2021
Even long posts with tons of images and 600 comments still load in about 1s with a 51ms TTFB

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

Most hosting recommendations are garbage and I suggest joining the WordPress Hosting and WP Speed Matters group to get unbiased feedback because let’s be honest, we’re all affiliates.

  • SiteGround has a slow TTFB, CPU limits, support went downhill, among other issues. Unethical considering their community manager (Hristo) is an admin for this Facebook Group, and the TOS (sec. #9) prevents affiliates from using ‘SiteGround’ in bad reviews.
  • Hostinger writes fake reviews, votes for themselves in polls, also unethical.
  • GoDaddy is like my ex-girlfriend: lots of promises, but absolutely no delivery.
  • WP Engine used to be good, but most people left them and speed/support are awful.
  • EIG brands (Bluehost + HostGator) cram too many websites on slow, shared servers.

Regardless if you use my aff links, please don’t support unethical companies.


I use Cloudways (Vultr HF) who has always given me a fast TTFB and great GTmetrix results even on huge posts. You can click through my posts (most of them are very long) and they will load instantly. LiteSpeed is also popular which you can get through NameHero or A2 Hosting. I like NameHero’s Turbo Cloud plan which includes more RAM, NVMe storage, and is still cheap.

Both have different setups. On Cloudways, I use WP Rocket + BunnyCDN. On NameHero or A2, you would use the LiteSpeed Cache plugin + CDN. They’re both great setups and should give you a fast TTFB, especially if you use my WP Rocket or LiteSpeed Cache guide.

You can read my Cloudways review or NameHero review. NameHero is easier (cPanel, A+ support, email hosting) while Cloudways is a little “techier” but gives you better control of your server and has way more data centers in the US, India, UK, etc. Cloudways has monthly pricing with a free migration while NameHero has a 30-day refund policy and also does free migrations.

I switched from SiteGround to Cloudways in 2019. My response times were 2x faster, I was paying 1/2 the price of what I was on SiteGround, and had no CPU issues or high renewal prices.

Cloudways shoutout

When in doubt, check recent Facebook polls and migration results (view more here).

Cloudways promo code omm25
25% off 2 months of Cloudways with code OMM25 (or use their coupons page for 30% off 3 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 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 [email protected]. 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.

Bdkamol freelancer


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.


About Tom Dupuis

Tom 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.

23 thoughts on “How To Fix A Slow Website On HostGator’s WordPress Hosting

  1. Don’t use Hostgator, I’ve tried them and they are the worst! My site was fresh, just installed the Astra theme, no plugins, no images, just the theme. My site scored less than 20 in pagespeed insights. Plus I had a hard time customizing my site because my WordPress backend was so slow like it took around 30 seconds just to switch pages, no exaggeration.

Leave a Reply

Your email address will not be published.