How to fix “There has been a critical error on your website.”

I have been developing WordPress for 8 years now and have encountered the error “There has been a critical error on your website” so many times. There are resources online on how  to resolve this issue but what I am about to share is my personal experience on how to resolve this problem.

The problem with this error is that its too ambiguous and it doesn’t really give you any specific clue as to why the error happened. So you are mostly left on how to figure how to resolve the issue. 

The best way to resolve any website issue is to document the changes you made to your website. This will allow you to target your troubleshooting.

Here are some causes and the solution I made resolving the common but ambiguous problem.

 

1. Deleted taxonomies and custom post type

I love work with Elementor Pro and use a lot of the functionality of the Theme Builder features to simplify template creation specially on single post and archive. There was one time I accidently deleted a taxonomy for a custom post type  that I dynamically pulled out on a single template and it caused the  “There has been a critical error on your website” problem. The good thing about WordPress is that posts and taxonomies are trashed before they are permanently deleted so I just restore that particular taxonomy.

If you have been using the ACF plugin, check your custom post type and related taxonomies. You might have used them somewhere in your Elementor templates but you have deleted them at some point.