FIXED: "There has been a critical error on this website" WordPress / HostGator

critical-error-solved

Going to your website to find a critical error or a white screen… What a defeating feeling! I had a new Fiverr inquiry where this was the scenario. Most people would not know where to begin when this issue presents itself. I’ve been working with WordPress so long that I’ve seen it 100x and fixed it just as many.

The most common issues:
Hacked, automatic plugin update breaks something, or server side php/mysql update.

Hostgator and most of those cheap hosts are notoriously bad at supporting this. Also they have terrible backups and recovery so you are really on your own.

My #1 advice is get off of Hostgator, GoDaddy, Bluehost or any other cheap host for WordPress and migrate to WP Engine.

Now to solve this issue all I had was access to the host control panel. So I could get into the file structure, PHPMYADMIN etc but could not actually log into the website.

After looking around it become clear that the files were intact, there were no rogue or weird file names anywhere so I ruled out a hack. Then, one clue popped up via the file manager (or FTP):

php

This artifact of a recent upgrade was in the file structure. This indicated that PHP had upgraded around the same time the site went down, so it became an almost immediate answer as to why this would have happened.

I went to hosting support via my clients account:

image (4)
image (6)

Long story short, the PHP version had to be rolled back to unbreak the website.

The next steps in the process are to get inside the site and get everything fully modernized. This should include all plugins, WordPress core and theme.

The best possible way to go about this is:

  • Migrate the site as it exists to WP Engine, where the PHP/MySQL also needs to be rolled back
  • Replicate it into staging
  • Fix it in staging
  • Push it back live
  • Never let your site age from this point forth!

This can be a daunting task, if you need help feel free to ask here or reach out:

download - 2024-05-27T151834.798

I had another one come in from Fiverr:

Greetings my name is —, administrator of —.com. Im in need of a Wordpress & Website management professional. My sites —.com - —.com are both offline. I use A2 Hosting. I was in the process of doing 2 things, updating the PHP from 7.3 to 8.3, but when I did that both sites went down. I get a ‘There has been a critical error on this website.’ I switched it back to 7.3 but the error remained. Im also in the process of switching my website from Shared Hosting on A2 Hosting to Managed VPS Hosting. The Hosting company migrated the data but did a bad job, having broken links and etc. Would you be able to assist?


My fix was simple: Migrate to WPEngine. Doing this proved it was host related.

In order to accomplish this I had to do a bit of investigation inside via the CPANEL, PHPMYADMIN etc.

I then captured the MYSQL database and just the wp-content folder and everything inside. I manually migrated over the site to WP Engine.

Once migrated to a staging site the site came back to life with PHP v 7.4.

Really, these massive hosts or hosts that do anything other than “WordPress” should be abandoned. In this case, something about the PHP upgrade got stuck. Support was absent.

Then, magically A2 support provided the fix as this person was about to migrate away :sweat_smile: :sweat_smile: (retention department)

Marking this as solved

Here’s another: