Skip to content
DevMarket
Odoo ModulesWordPress PluginsWordPress ThemesShopify ThemesApp TemplatesScripts & UtilitiesBlogSell on DevMarket
WordPress and WooCommerce

How to Fix Common WordPress Errors: White Screen, Critical Error and More

Fix the WordPress critical error and white screen of death calmly: back up, read the logs, find the cause by elimination, then handle database, 500, memory, maintenance mode, 404 and login errors.

By DevMarket EditorialPublished: 9 min read
How to Fix Common WordPress Errors: White Screen, Critical Error and More
On this page

A WordPress critical error or white screen of death almost always comes from a short list of causes: a faulty plugin or theme, a PHP memory or version problem, a damaged file, or a database or server fault. Fix it in order: back up, read the error and the logs, then switch things off one at a time until the site returns. The fixes below come from the official WordPress and WooCommerce documentation as of October 2026.

In short

  • Back up before you change anything, and change one thing at a time.
  • "There has been a critical error on this website" means PHP hit a fatal error. WordPress emails the administrator a recovery mode link, so check spam too.
  • If you cannot log in, rename the plugins folder (or one plugin's folder) over SFTP, or the active theme's folder.
  • Log errors to wp-content/debug.log, never show them to visitors, and turn debugging off afterwards.
  • Ask your host about database, server, 500 and memory problems that survive these steps.

A calm method for fixing any WordPress error

Rushing makes an outage worse, so follow the same order every time.

Three cards joined by arrows from left to right, the last one marked with a green tick
Back up, read the error and the logs, then switch things off one at a time until the site comes back.
  1. Note what you see. Screenshot the message and note the time and what changed just before: an update, a new plugin, a theme edit or a move.
  2. Back up. Copy the files and the database, even if the site is broken. Most fixes below rename or edit files, so this is your way back. See how to back up WordPress.
  3. Read the error and the logs. Use the on-screen text, the email WordPress sent, your host's error log and wp-content/debug.log.
  4. Find the cause by elimination. Plugins first, then the theme, then memory and PHP version, then files, then the host. Change one thing, test, and undo it if it did not help.

The WordPress critical error message and recovery mode

The message reads "There has been a critical error on this website". WordPress's common errors page lists plugin conflicts, theme compatibility issues, an incompatible PHP version, the memory limit and corrupted files as the usual causes.

Recovery mode has existed since WordPress 5.2. When WordPress detects a fatal PHP error during a regular page load (not in cron or background tasks), visitors see the error screen and the administrator receives an email with a login link. The faulty plugin or theme is paused just for your admin session, so you can deactivate it under Plugins or Appearance > Themes, then choose Exit Recovery Mode.

If the email does not arrive, check that the Administration Email Address in Settings > General is read by someone, and look in spam. WordPress warns that the message may be filtered if the error happens before your email plugin loads. Use the file method below.

The WordPress white screen of death, plugins and themes

The common errors page says both PHP errors and database errors can show as a white screen, though in some cases WordPress shows the critical error message instead. The fixes are the same.

Disable all plugins, or one, through the file system

If you can reach the admin screens, deactivate all plugins, then reactivate them one by one. If not, use SFTP or your host's file manager, after a backup.

  1. In wp-content, rename plugins to plugins.hold. WordPress reports the plugins as missing, which deactivates them.
  2. Load /wp-admin/plugins.php and log in, then rename the folder back to plugins. The troubleshooting FAQ says this keeps plugin settings but leaves every plugin deactivated.
  3. Reactivate plugins one at a time, testing after each. The one that brings the error back is the cause.

To test one suspect, rename only its folder, for example hello-dolly to hello-dolly-1, as the recovery mode documentation does. Renaming deletes nothing.

Switch to a default theme

If plugins are not the cause, activate a default theme under Appearance > Themes. Without admin access, rename the active theme's folder in wp-content/themes. WordPress then switches to a fallback theme, the latest core default theme that exists (reference), so check that one is installed. If the site returns, check the theme's latest update and any code you added to it.

Read the logs: WP_DEBUG and WP_DEBUG_LOG

WordPress's debugging documentation gives these settings. Copy wp-config.php first, then add the lines before the comment "That's all, stop editing":

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

WP_DEBUG_LOG writes messages to debug.log in the content directory, usually wp-content/debug.log, and only works while WP_DEBUG is true. WP_DEBUG_DISPLAY set to false keeps messages out of the page. The documentation says WP_DEBUG is not recommended on live sites, so prefer staging. Site Health flags both displayed errors and a possibly public log file, because debug output can contain sensitive information.

In the log, the newest "Fatal error" line has a path under wp-content/plugins/ or wp-content/themes/ that names the culprit. WooCommerce also keeps a fatal-errors file under WooCommerce > Status > Logs, which does not include web server errors such as timeouts.

Afterwards restore your copy of wp-config.php, or set WP_DEBUG to false and remove the other lines, then delete debug.log.

Database, 500 and memory errors

Error establishing a database connection

The common errors page says this is usually caused by wp-config.php: check the database name, username, password and host. Otherwise the cause may be your host: a database over its quota or a server that is down. If a log points to a damaged table, the wp-config documentation describes an automatic repair setting. Back up the database first:

define( 'WP_ALLOW_REPAIR', true );

Enable it only if needed and remove it once solved: while it is on, a visitor does not need to be logged in to use the repair script at /wp-admin/maint/repair.php.

500 internal server error and .htaccess

The common errors page names a corrupted .htaccess file as the most likely cause. Over SFTP, rename .htaccess to .htaccess_old (it is hidden, so show hidden files) and reload. If that works, open Settings > Permalinks and save: WordPress writes a fresh file, or shows the rules to paste if it cannot, as the Permalinks documentation explains. If the error stays, deactivate plugins, switch theme, raise the memory limit and, last, re-upload wp-admin and wp-includes from a fresh WordPress download, never wp-content or wp-config.php. Nginx has no .htaccess: ask your host for the error log.

PHP memory limit errors

"Allowed memory size exhausted" means WordPress lacked memory for the task. WooCommerce's memory limit guide says to add this line to wp-config.php (copy it first) above the "That's all, stop editing" comment, and recommends 256 MB:

define( 'WP_MEMORY_LIMIT', '256M' );

If it has no effect, your host may enforce a maximum, so ask the host or set memory_limit in php.ini. WooCommerce > Status shows the WP memory limit in its system status report. If memory runs out again soon, suspect a plugin.

Maintenance mode, 404s, login loops and mixed content

Stuck in maintenance mode

During an update WordPress places a .maintenance file in the folder that holds wp-admin. If the update is interrupted, visitors keep seeing "Briefly unavailable for scheduled maintenance". Wait a few minutes, then delete .maintenance over SFTP and check Dashboard > Updates, because the FAQ says the upgrade should run again in case it failed.

404 errors on posts after a move

If the home page loads but posts return 404, open Settings > Permalinks: visiting the screen flushes the rewrite rules, and saving shows either "Permalink structure updated" or the rules to paste into .htaccess. The migration guide says to reconfigure permalinks when the moved site goes live and to check the WordPress Address and Site Address. On Apache, also ask whether mod_rewrite is enabled. See moving a WordPress site to a new host.

Login redirect loop

If the login page reloads after correct details, the Logging In guide says, in order: clear cookies for your site, check wp-config.php for correct WP_HOME and WP_SITEURL, check the siteurl and home values in the options table, and rename the plugins folder. To force the right address (copy wp-config.php first), it shows:

define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );

Replace example.com. These lines override the database values without changing them. For "cookies are blocked", the guide says to exclude wp-login.php from page caching.

Mixed content and HTTPS problems

Mixed content is an HTTPS page that loads images, scripts or stylesheets over HTTP; most browsers block active content such as scripts. Find the culprits in your browser's developer tools, check that the WordPress Address (URL) and Site Address (URL) in Settings > General start with https://, and replace old http:// links in the database. The migration guide warns that a plain search and replace can break serialised data and that the guid column must not change, so back up and use a plugin or WP-CLI's wp search-replace with --dry-run first.

When to ask your host

Ask when the database error continues after you confirmed the wp-config.php details, when 500 errors continue after you renamed .htaccess and plugins, when the memory limit will not change, when you cannot read the error log, or when you suspect a hack (see the WordPress security checklist). Send the exact error text, the time and time zone, what changed and what you tried, plus the WooCommerce system status report (Get system report, then Copy for support) if you can reach it. If a plugin or theme bought on DevMarket is the cause, check the support period on its listing.

Frequently asked questions

Is the critical error the same as the white screen of death?

They share causes. The critical error is the message WordPress shows, with a recovery email, when it catches the error.

I did not get the recovery email. What now?

Check the Administration Email Address and spam, then rename the plugins folder as shown above.

Does renaming the plugins folder delete my plugins or settings?

No. It deactivates the plugins and keeps their settings; you reactivate them by hand.

Is it safe to leave WP_DEBUG on?

No. WordPress does not recommend debugging on live sites, and Site Health flags it.

Next steps

Once the site is back, update with the routine in how to update WordPress and WooCommerce safely and schedule the tasks from the WordPress maintenance checklist. You can also browse licensed WordPress plugins, each listing showing its support period and update policy.

Find the right software for the job

Every item on DevMarket has a human-reviewed release, an instant licence key and clear update and support terms.