Installation failed: There has been a critical error on your website

WordPress supports installing and updating plugins and themes from the official store right through the WordPress admin interface. However, after trying to install or update a large plugin (like WooCommerce) or theme, you may encounter an error like this:

Installation failed: There has been a critical error on your website. Please check your site admin email inbox for instructions. Learn more about debugging in WordPress.

This error means that the installation process crashed, and may have left you with a broken website. To fix this, you’ll have to get rid of the broken plugin or theme and fix the installation by hand.

Identifying the broken plugin or theme

If you were trying to install or update a specific plugin, you can skip this step. But if you were running a bulk update, or an automatic update happened while you were away, you may be wondering which plugin or theme failed has broken down.

You can figure this out by enabling debug mode in WordPress:

  1. Login to an FTP client of your choice or our web based file manager (found in the client area and control panel).

  2. Navigate to your website folder (which is htdocs for your first domain and example.com/htdocs for addon domains and subdomains).

  3. Open the file wp-config.php and find the line which contains WP_DEBUG. On that line, replace false with true and save the file.

  4. Refresh the page on your website and you should now see error messages.

In these error messages, you should search for texts like wp-content/plugins/ and wp-content/themes/. The word right after that is the folder of the plugin or theme which is generating the error, which is generally the broken plugin or theme.

Don’t forget to disable WP_DEBUG after you’ve seen the error message. The option should not be left enabled for live sites, because it might expose sensitive information.

Deactivating a broken plugin

If a plugin installation has been corrupted, the first thing to do is to disable the broken plugin.

If your WordPress admin area is still working, you can deactivate the plugin from there. If that’s an option, deactivating the plugin from there is the easiest option.

If your WordPress admin area is now broken, you will have to deactivate the broken plugin by hand. You can do so as follows:

  1. Login to an FTP client of your choice or our web based file manager (found in the client area and control panel).
  2. Navigate to your WordPress plugins folder. This is typically htdocs/wp-content/plugins for your first domain, and example.com/htdocs/wp-content/plugins for addon domains and subdomains.
  3. Find the folder of the broken plugin (it should resemble the name of the plugin).
  4. Right click the folder and select “Delete”.

After this, your WordPress website and admin area should be accessible again.

Deactivating a broken theme

If a theme installation has been corrupted, the first thing to do is to switch to a different theme which does work.

If your WordPress admin area is still working, you can switch the theme from there. If that’s an option, changing the theme from there is the easiest option.

If your WordPress admin area is also unreachable, you can change the active theme by hand. You can do so as follows.

  1. Login to an FTP client of your choice or our web based file manager (found in the client area and control panel).

  2. Navigate to your WordPress themes folder. This is typically htdocs/wp-content/themes for your first domain, and example.com/htdocs/wp-content/themes for addon domains and subdomains.

  3. Check which other folders you have there. These are other themes you have on your site, which you can try. Pick one and copy the folder name somewhere. The WordPress default theme (with a name starting with twenty) is a good choice if you have it.

  4. Login to the control panel of your hosting account and navigate to the phpMyAdmin section. From there, click the Connect Now button next to the database of your WordPress site.

  5. Click to the table with the name ending with _options.

  6. Find the row where the column option_name equals template. You can use the Search button at the top bar to find it.

  7. Edit the option_value column of the row you found, and change it to the theme name you found before.

After this, your WordPress theme should be changed to the other theme you selected. Assuming this theme was installed correctly, you should now be able to access your site again.

Installing the plugin or theme by hand

After you’ve removed the broken plugin or theme, you can try to install it again. You can try to do so through the WordPress admin area, but if you try this, you’ll likely end up with a broken installation again.

That’s why you can try to install the plugin or theme by hand instead.

To do so, the first step is to download the plugin or t heme zip file to your computer. If you got the plugin from a third party source, you probably already have this file. If you installed it directly from WordPress, you can find and download your plugin from the official WordPress plugin store or theme store

Next, you’ll need to upload the files to your account.

To upload the plugin or theme with FTP:

  1. Extract the zip file on your computer. It should contain a single folder with files.
  2. Setup a connection with your FTP client of choice. Learn more about how to setup an FTP connection.
  3. Navigate to your WordPress plugins or themes folder. This is typically htdocs/wp-content/plugins for your first domain, and example.com/htdocs/wp-content/plugins for addon domains and subdomains. For themes, it’s the
  4. Copy the extracted folder to the website directory. Depending on the size of the plugin or theme, this can take some time complete.
  5. After the file transfer has been completed, login to your WordPress admin area. From there, you can navigate to the Plugins or Themes interface and hit Activate on what you’ve just uploaded.

You can attempt to upload the archive through our online file manager, but this may not work depending on the size of the plugin or theme. Using a desktop FTP client like FileZilla is recommended, because it works with plugins and themes of all sizes.

6 Likes
I can't access my website - there is a critical error
There has been a critical error on your website. Please check your site admin email inbox for instructions. SOS
Critical error in website
WordPress error after update
How to solve critical errors
Issue with Secure Connection on My Website
Fatal error
Wordpress theme reset
Restore Website Crypto
Database error
I cant edit my website with elementor
Fatal error when migrating a local site to hosting
There has been a critical error on this website
I got critical error after adding the code to functions.php
Error login to my admin word press
Help to fix: There has been a critical error on this website
Critical Error
Site doesn't open anymore
WordPress Issue
Admin page
My website is no longer accessible
My site shows an error
Can not access my website
Ssl certificate issue
Fatal error - help i can't get my website working!
critical error on my website
MySQL Databases Missing / SQL 2002 Connection Refused
Wordpress 6.0 not working
Cannot delete files/folders in FTP
Error 500
Wordpress error
Wordpress error
There has been a critical error on this website.
WordPress 6.0 Not available to update
I can't access my website - there is a critical error
There has been a critical error on this website
Website doesnt work when VPN on
Blank Screen
Critical error in website
50-50 cpu ban
The uploaded file exceeds the upload_max_filesize directive in php.ini
Cannot access the website admin area
Unable to open the admin url of the wordpress site
Critical Error Web site down for multiple days
Hmm. We’re having trouble finding that site. We can’t connect to the server at www.onyaitdigital.co
Wordpress site corrupted following upgrade
WordPress upgrade to 5.9 went wrong
Quota Full
There has been a critical error on this website
I'm receiving There has been a critical error on this website
Recovery link
Email to restore my wordpress!
WordPress: There has been a critical error on this website
I have a problem
There has been a critical error on this website
There has been a critical error on this website
Fatal error when debugging
A critical error has occurred on this site
Unable to login to the WordPress Dashboard
Wordpress Update Failed
WordPress error: There has been a critical error on this website when I tried to update the version
Wordpress Installation Failed, Need Help
Critical Error
There has been a critical error on this website
There has been a critical error on this website
There is a critical error on your website
There is a critical error on your website
There has been a critical error on this website
Incompatible with Elementor's new update?
Login error
Error login dashboard
I can't access my website
Site error
There has been critical error on this website [Error]
There has been a critical error on this website
Random Internal Server Error - Unstable Website / Outage
Website not loading
I Could not access my website
Ditplanet.rf.gd unexpectedly closed the connection
Critical error
There has been a critical error on this website
There has been a critical error on this website
Error in my website desktop view
Instructions can be found in the site administrator's email inbox
There has been a critical error on this website
Critical error
Ssl
Wordpress admin panel is not working
Website has been fix from website outage but now critical error
There has been a critical error on this website
Download backup failed
There has been a critical error on this website
Cant Open wp-admin panel
Unable to update db details in Softaculous
Critical error on wp-admin page
Domain Pointing
My website is giving an error
There has been a critical error on this website
Website keeps craching
Why website is not opening, is this PHP version issue?
I am delete my website sitemap folder by mistake in infinity file manager
I have installed Wordpress maually and need help getting my domain to point towards my wordpress
Error loading the element
It's possible to install Wordpress to a free plan of InfinityFree?
Error message: There has been a critical error on this website
Can’t Access WordPress Admin – Critical Error & Cannot Open htdocs
Issue
There has been a critical error on this website. Please check your site admin email inbox for instru
Fetal error
Big problem
Help!
Wordpress doesn't see database
There has been a critical error on this website
Website Critical Error?
Wordpress
Restore Another Website
Critical error on this website
There has been a critical error on this website

Instead of just

define( ‘WP_DEBUG’, true );

Why not

define( ‘WP_DEBUG’, true );

define( ‘WP_DEBUG_LOG’, true );

define( ‘WP_DEBUG_DISPLAY’, false );

@ini_set( ‘display_errors’, 0 );

This way, only person(s) with the right credentials can view the debug.log in the “wp-content” directory. Error messages will also be suppressed from displaying on live sites.

Isn’t this safer?

5 Likes

Yes and no.

It’s true that error messages should not be shown to visitors. And the configuration you’re proposing indeed does ensure the debug information is not displayed on the page.

However, WordPress doesn’t protect access to the debug.log file, so anyone could download it. And because the debug output isn’t printed, it’s easy to forget to remove this code after the issue has been fixed.

Does this mode also log native PHP errors? Because if not, you’d be missing out on information that display_errors may show you.

And finally, the guide is intended to be as easy as possible. Editing a single line is easier than adding multiple new ones, I think.

7 Likes

I would believe so. This is what I can see from the debug log

[11-Jul-2022 19:18:56 UTC] PHP Deprecated: Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /home/vol9_4/

Fully agreed

4 Likes