How to fix critical error on your website during install

The other day, I was in the process of installing a WordPress website locally on Windows, so I set up everything necessary and ran the WordPress installation page step by step. In the final step, after clicking Install WordPress button, the page was loading for a while and then an error message showed up telling me about the critical error on your website. In this article, I will show you how I found the cause of the issue and how I fixed it. Fix Critical Error WordPress Website

The exact error message "There has been a critical error on your website" was not very informative about the cause of the problem.

Even though, the page was complaining about a "critical error", I still tried to check how the website loads, and it did load, but the page was broken. When I tried to log in as an administrator, it complained about the "unknown user" error.

Enabling the debugging with WP_DEBUG

The critical error page was linking to the Official WordPress page about debugging, where it suggests various ways to debug the issues with WordPress.

First, I tried to edit the wp-config.php file and set the WP_DEBUG to true. When the wp-config.php file is first created, it has WP_DEBUG set to false:

Repeating the WordPress installation process

Now I needed to repeat the installation. As I mentioned before, visiting the homepage shows the broken webpage, so I tried to repeat the installation process by going to the install page at:

Unfortunately, WordPress falsely thinks that just because the WordPress MySQL tables already exist, the installation is not necessary, even though the MySQL tables had no data in them. It was giving me the "Already Installed" message saying "You appear to have already installed WordPress. To reinstall please clear your old database tables first":


To fix this, I had to delete already generated WordPress MySQL tables from the failed installation. How to achieve that is discussed next.

Deleting the existing WordPress MySQL tables

We can delete every MySQL tables that the WordPress installation generated using the phpMyAdmin tool with the following steps:

  1. Login into phpMyAdmin. 
  2. On the left sidebar, select the database you created for this installation.
  3.  The list of tables from the selected database should show up. At the bottom, click on the "Check all" checkbox to quickly select all the tables. 
  4. Click on the dropdown menu nearby showing "With selected:" and choose DROP option as shown below.

5.   A generated SQL query will show up in red and ask you "Do you really want to execute the following query?". Click Yes.

The database for the WordPress website should now be empty and going to the Root URL should redirect you to the installation process.

I again entered the required information and the installation failed as expected, but there were no debug messages displayed either.



              Call +1-857-342-2365 for help and support of Fix Critical Error WordPress Website.



Comments

Popular posts from this blog

There Has Been A Critical Error On This Website.

Add or Change Logo: WordPress Options

Finding WordPress Help