Translate

Tuesday, April 13, 2021

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

 


Have a slow WordPress site on HostGator?

If your WordPress site is slow on HostGator, you'll 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 ascertain if reduce server response times is in your report. If yes, your HostGator server is slow. this might 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 couple of (like the WordPress Hosting Facebook Group) to urge real, unbiased opinions. There are far better options like DigitalOcean on Cloudways which is whom most of the 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 within the comments! And if you would like help, leave your GTmetrix report within the comments and I’ll provide you with suggestions.

How To Fix A Slow Website On HostGator

  1. Check For Slow TTFB
  2. Upgrade To PHP 7.3
  3. Configure A Solid Cache Plugin
  4. Use Cloudflare’s CDN
  5. Rethink Your Page Builder
  6. Avoid Slow Loading Plugins
  7. Optimize Images
  8. Remove WordPress Bloat
  9. Clean Your Database
  10. Fix Redirect Errors
  11. Avoid External HTTP Requests
  12. Fix Bottlenecks In GTmetrix
  13. Consider Moving To Cloudways

Quick Ways To Fix A Slow HostGator Website

  • Upgrade to the newest PHP version in HostGator
  • Install a solid cache plugin with Cloudflare’s CDN
  • Use a quick page builder like Oxygen rather than 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 a picture 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 ascertain if reduce server reaction time shows within the report (Google recommends 200ms). Servers are controlled by your hosting.

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


A warning about HostGator: HostGator is one of the slowest hosts. I found a uniform 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 on their pages – you'll 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 won't upgrade you automatically (because they don’t want to risk breaking your site) so you would like to try to do this yourself as HostGator releases new PHP versions.


HostGator’s Optimized WordPress Hosting doesn't have cPanel, so you can't upgrade PHP versions yourself. you'll get to contact support to possess them to roll in the hay. you'll try these instructions, but I had to possess their support team does that on my behalf of me.

How To Update PHP Versions On HostGator


  • In your HostGator cPanel, attend 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 accompany these features. In other words, WP Rocket allows you to use 1 plugin for everything rather than having to put in multiple plugins. That’s also why WP Rocket usually gives you better scores and cargo times in GTmetrix.

The following features are built-in WP Rocket. But if you’re using another caching plugin that doesn’t accompany a selected feature, you’ll get 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 is #1 in most Facebook polls (click on image to enlarge):


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

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


HostGator does have a choice to enable cache within the cPanel which you ought to leave disabled if you’re employing a cache plugin. Cache plugins look out of the many other optimizations aside from caching (eg. minifying HTML, CSS, JS), and you'll get far better results with a cache plugin.


4. Use Cloudflare’s CDN

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

1. check-in for a free Cloudflare plan, add your website and run the scan.


2. you'll eventually come to a page where Cloudflare assigns you 2 nameservers.



3. HostGator says you'll get to contact them to line up private nameservers.

Unfortunately, you would like private nameservers on HostGator to try to do this which is merely available on their reseller account, VPS, and dedicated server. I even have no idea why they are doing this. WP Rocket and W3 Total Cache have settings for Cloudflare – you'll try setting it up through one among these (let me know if this works within the comments please!)



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


5. attend your Cloudflare speed settings and use these:


6. attend Cloudflare’s caching settings and Purge Everything.


All done! It can take 24 hours for Cloudflare nameservers to propagate so twiddling my thumbs :)


5. Rethink Your Page Builder

Elementor and other page builders add many scripts to your website.

You can check these using Perfmatters or Asset CleanUp. the sole builders I like to recommend are Gutenberg, Oxygen, and GeneratePress. I made the error of getting my site redesigned in Elementor and you'll see what percentage times it’s within the ASCII text file. Add other Elementor plugins like Ultimate Addons and Premium Addons, and you'll find yourself with a slow site. While you'll disable a number of these scripts, many got to load for your site to figure properly.










6. Avoid Slow Loading Plugins

Thank you, Ivica from the WordPress Speed Up Facebook Group for contributing to the present 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 simply 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 allow you to selectively disable plugins on specific pages/posts. for instance, if you’re only using your contact form on the contact page, disable it everywhere else. Or if you simply use social sharing buttons on the blog, disable them on all of your pages. browsing your scripts/plugins, viewing their size, and disabling plugins where they’re not getting used can significantly improve scores and cargo times.


7. Optimize Images

There are 5 primary ways to form images load faster:

  • Serve scaled images: resizing large images to be smaller.
  • Losslessly compress images: compress images employing 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 employing a plugin.

Serve Scaled Images

Serve scaled images are found in GTmetrix where they tell you which of the images are overlarge and therefore the dimensions they ought to be resized to. GTmetrix only shows unoptimized images for one 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 make an “image dimension cheat sheet” listing the size of all of 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 vital 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 additionally good. Install a picture optimization plugin, set your compression level, and test a couple of images to form sure you're proud of 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 that they only load once you scroll down the page and see them. Videos are heavy so I suggest a minimum of doing that – I don’t lazy load photos since it is often annoying to load photos as you scroll down. WP Rocket has an option for this within the Media tab, otherwise, you'll use a plugin like A3 Lazy Load and WP YouTube Lyte.



Specify Image Dimensions

Specify image dimensions means you would like to locate the image, view its HTML, and add a width and height within the HTML (which is provided by GTmetrix). Since the WordPress visual editor and most page builders do that 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. counting on which format you select, most image optimization plugins have a choice to convert your images to WebP format, or for SVG, use the SVG Support plugin.


8. Remove WordPress Bloat

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



9. Clean Your Database


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


One thing I prefer about WP-Optimize is that it allows you to 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 would like to correct these which may be wiped out bulk using the higher Search Replace plugin. GTmetrix will only show you errors for that page, so test a couple of page call at GTmetrix to form sure you took care of all redirects throughout your website.





11. Avoid External HTTP Requests


Third-party scripts are often found within the reduce DNS lookups section of GTmetrix. These are anything that makes 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 a preview image (in WP Rocket)

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



Preconnect + Prefetch
If you absolutely must use an external resource throughout your site, you ought to preconnect/prefetch it. This basically lets the browser anticipate external resources to form it load faster. WP Rocket, Perfmatters, and other plugins have options for this, otherwise, you'll also use the Pre* Party Resources Hints plugin. If using StackPath, you ought to also add your CDN URL here. Luke (from Bluehost) created an inventory 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 the longest to load and specialize in those optimizations. Good hosting and properly configuring a solid cache plugin should fix most errors in GTmetrix.





Other Optimizations to think about 


  • Use a light-weight WordPress theme
  • Avoid page builders (or if you are doing use one, use Oxygen)
  • Optimize WooCommerce scripts, styles, cart fragments in Perfmatters

13. Consider Moving To Cloudways

Most hosting recommendations are honestly garbage.

Join the WordPress Hosting Facebook Group to urge unbiased feedback from knowledgeable people who’ve been around the block. I won’t tell you to modify hosts if you don’t get to, so run your website through Lighthouse and check for slow server response times (TTFB) over 600ms.

If your TTTFB is slow, many of us in Facebook groups (including myself) use Cloudways WordPress Hosting. Specifically their DigitalOcean or Vultr High-Frequency plan. Sure, it’s $10-$13/month, but we’re talking about speed, TTFB, and core web vitals – not being cheap.

Take a glance at conversations, migration results, and polls posted in a number of these Facebook groups. Or check out Backlinko’s PageSpeed Test where he found SiteGround features a slow TTFB. You already know GoDaddy and EIG brands (Bluehost and HostGator) are obviously not good. Hosting affects TTFB, LCP, and other web vitals which can be a ranking factor as of May 2021.

Here are 22 people that moved to Cloudways and posted their results (click image to enlarge):


No comments:

Post a Comment