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.
How To Fix A Slow Website On HostGator
- Check For Slow Server Response Times
- Upgrade To PHP 7.3 In HostGator
- Configure A Solid Cache Plugin
- Use Cloudflare’s CDN
- Rethink Your Page Builder
- Avoid Slow Loading Plugins
- Optimize Images To Load Faster
- Disable Unused Functionality
- Clean Your WordPress Database
- Minimize Redirects
- Avoid External HTTP Requests
- Fix Bottlenecks In GTmetrix
- Consider Moving To Cloudways
My goal is to make your GTmetrix report look more like this:
This video should help (timestamps are in the video description):
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
Another indicator is if your time to first byte (TTFB) is slow in the GTmetrix Timings tab. Good GTmetrix scores but slow server response times and TTFB indicates your hosting as the issue.
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.
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 your website for errors. If you see any, revert to an earlier version.
- Keep it updated to the latest version 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:
- Database cleanup: WP-Optimize
- CDN integration: CDN Enabler
- Lazy load images: a3 Lazy Load
- Lazy load videos: WP YouTube Lyte
- Heartbeat control: Heartbeat Control
- Host Google Analytics locally: CAOS Analytics
- Host Google Fonts locally: CAOS Fonts, or SHGF
- Prefetch external requests: Pre* Party Resource Hints
WP Rocket (406ms)
WP Fastest Cache (527ms)
W3 Total Cache (619ms)
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.
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.
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!)
4. Once they do, find them and enter the nameservers provided by Cloudflare.
5. Go to your Cloudflare speed settings and use these:
6. Go to Cloudflare’s caching settings and Purge Everything.
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 page builder I recommend is Oxygen. I made the mistake of having my website redesigned in Elementor and you can see how many times it shows up in the source code. Add other Elementor plugins like Ultimate Addons and Premium Addons, and you could end up with a very slow website. While you can selectively disable some of these scripts, many of them need to be loaded and so, you’re stuck with them.
6. Avoid Slow Loading Plugins
- AdSense Click Fraud Monitoring
- All-In-One Event Calendar
- Backup Buddy
- Beaver Builder
- Better WordPress Google XML Sitemaps
- Broken Link Checker
- Constant Contact for WordPress
- Contact Form 7
- Contextual Related Posts
- Digi Auto Links
- Disqus Comment System
- Divi Builder
- 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/Posts – Perfmatters 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 To Load Faster
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.
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. Disable Unused Functionality
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 WordPress 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. Minimize Redirects
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.
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.
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.
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
Hosting recommendations are usually garbage.
Yes, it’s a little more expensive at $10-$13/month, but we’re talking about speed here – not being cheap. With Cloudways, you have a choice of using DigitalOcean, Vultr High Frequency, Google Cloud, AWS, or Linode. These are worlds faster than shared hosting and can handle resource-intensive tasks much better (Elementor, Beaver, Divi, WooCommerce, AdSense, etc).
What happened when I moved from SiteGround:
GTmetrix tests are always different, but even posts with a huge 2.70MB page size and 96 requests can often load in under 2s. I’ll also take a 148ms time to first byte any day of the week. That post has 70+ images, 500 comments (showing Gravatars), Font Awesome, and Elementor.
The evidence is there:
This is a simple Pingdom test to measure TTFB + load times of 16 WordPress hosts. I installed the same Astra Starter Site on 16 hosting accounts (using separate domains) while measuring Pingdom load times for 1 week at 30 minute check intervals, as well as TTFB in various tools. Some domains are still live (cwdoserver.com is hosted on a $10/month Cloudways DO plan and stgrndserver.com is on SiteGround GrowBig). I cancelled most accounts since it got expensive. Even when browsing through these 2 sites or running your own tests, you’ll see the difference.
Hosting Companies You Should Avoid
- SiteGround – they have gone completely downhill in recent years.
- Bluehost – slow servers, owned by EIG, bad support, rated poorly in FB Groups.
- HostGator – also owned by EIG with slow servers, bad support, CPU limit issues.
- GoDaddy – top malware hosting network worldwide, rated poorly in FB groups.
- Hostinger – they write fake reviews and vote for themselves in Facebook polls.
- WP Engine – also not what it used to be, expensive and not even fast anymore.
- *A2 Hosting – if you can’t afford Cloudways, A2 is still fast and uses LiteSpeed.
I use Cloudways because:
- Even posts with a 2.70MB page size can load in under 2s.
- DigitalOcean and Vultr HF are miles faster than shared hosting.
- It’s $10-$13/month (no yearly contracts or high renewal prices).
- Server caching (Varnish, Redis, memcached) = faster performance.
- You get to pick from DigitalOcean, Vultr HF, Linode, AWS, Google Cloud.
- 4.7/5 star TrustPilot rating + highly recommended in Facebook Groups.
- They have 25+ data centers between all their cloud hosting providers.
- No CPU issues like on SiteGround, Bluehost, and other shared hosting.
- SSL, staging, and backups are all very easy in the Cloudways dashboard.
- Support used to be average, but is now really good as reflected on TrustPilot.
- They offer a free migration but their Migrator plugin will also do the trick.
- Adding a server, migrating your site, and the dashboard is actually very easy.
- Muhammed (their community manager) gave me peace of mind when moving.
- Only complaint is they need to add LiteSpeed servers to their list of providers.
Affiliate Disclaimer – if you sign up for Cloudways using my affiliate link, I would seriously appreciate it. I don’t recommend bad hosting like many other affiliates. I also donate quite a bit to charity ($6,000 to GoFundMe so far) and your support would really help. I try to base my reviews not only from my experience, but real evidence from the overwhelming feedback in numerous Facebook Groups. It would mean a lot.
Do your research or look at this Facebook thread.
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 firstname.lastname@example.org. 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.
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.
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.