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 65 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
Switching from HostGator to DigitalOcean on Cloudways is night and day.
I moved from SiteGround (who is much faster than HostGator) to DigitalOcean on Cloudways and the results speak for themselves. Cloudways does free migrations which makes it very easy.
There are plenty of migration results if you check Twitter and Facebook Groups. Avoid the bloggers promoting Bluehost and WP Engine because they have the highest commissions and do your research. Hosting is the #1 factor in WordPress’ optimization guide – very important!
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.
#1. DigitalOcean On Cloudways – cwdoserver.com was the fastest, is who I use, and are very popular in Facebook Groups (especially as an alternative to SiteGround). DigitalOcean is also the only host mentioned in the WordPress Optimization Guide. Cloudways was #1 in most recent Facebook polls and people who migrate usually see significant load time improvements. They use PHP 7.4, Maria DB 10.3, Memcached, Varnish, Nginx, and Redis. Pricing starts at $10/month with no strict CPU limits or renewal prices like on other hosts. The community manager is very helpful and they do free migrations. You can get 25% off your first 2 months with the promo code OMM25.
#2. Kinsta – knstaserver.com had similar speeds as DigitalOcean on Cloudways only they are more expensive starting at $30/month. Known for being capable of handling many concurrent visitors. People consistently recommend Kinsta in Facebook Groups, Twitter, and in migration results. Even though they’re not always #1 in Facebook polls (likely because not everyone can pay $30+/month), they are great for high traffic sites.
#4. A2 Hosting – atwoserver.com usually outperformed other shared hosting but is not nearly as fast as cloud hosting (just cheaper). I use A2 for my girlfriend’s restaurant website and it’s decently fast with good uptimes. A2 (and all shared hosting) is only sufficient for smaller websites with low traffic/plugins. Otherwise, use cloud hosting.
#5. SiteGround – has gone downhill with many complaints about their renewal prices, price hikes, CPU limits, and support isn’t as good as it used to be. SiteGround shifted to Google Cloud hosting (instead of shared) which is supposed to be faster, but load times and TTFB on stgrndserver.com were usually above 1s. Their SG Optimizer plugin should help, but I still wouldn’t use them. You’re better off on Cloudways DigitalOcean.
Affiliate Disclaimer – I would seriously appreciate you using my affiliate links which means I earn a commission at no expense to you. This would help me make GoFundMe donations ($6,000 so far)! I try to base my recommendations on tests, Facebook polls, and conversations I see on a daily basis in the 30+ WP Facebook Groups I’m active on.
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 email@example.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.
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 65+ 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.