Fix There has been a critical error on this website in WordPress

Fix There has been a critical error on this website in WordPress Fix There has been a critical error on this website in WordPress

A routine update can turn into an alarming outage when WordPress displays There has been a critical error on this website. The message usually means that PHP stopped executing because a plugin, theme, custom snippet, or core process triggered a fatal error. Your content is probably still in the database, and the site can often be restored without reinstalling WordPress or deleting files at random.

This guide begins with the safest recovery options, then shows how to identify the exact failure through recovery mode, hosting logs, and the WordPress debug log. Before changing anything, create a hosting snapshot or download a backup of the files and database if your hosting control panel remains accessible.

What does the WordPress critical error mean?

WordPress replaces certain public-facing PHP error details with a generic critical-error screen. This protects file paths, database details, and other sensitive information from visitors. The underlying event is commonly a WordPress PHP fatal error, such as an unavailable function, duplicate class, incompatible method declaration, exhausted memory limit, or missing file.

The most frequent triggers are:

  • A plugin update that conflicts with another plugin or the installed PHP version
  • A theme update or custom child-theme function containing incompatible code
  • A hosting provider changing the PHP version or PHP extensions
  • An incomplete core, plugin, theme, Git, or Composer deployment
  • Custom code calling a function or class that is unavailable
  • PHP exhausting the memory available to WordPress

A WordPress critical error after a plugin update does not prove that the updated plugin is defective. The update may expose a pre-existing conflict, require a newer dependency, or stop supporting an older PHP environment.

Start with these safe checks

  1. Confirm the scope. Test the homepage, an inner page, /wp-admin/, and the login screen in a private browser window.
  2. Record the timing. Note updates, deployments, PHP changes, code edits, or hosting work completed immediately before the failure.
  3. Check monitoring and hosting status. A server-wide outage is not fixed by editing WordPress.
  4. Preserve evidence. Copy relevant log entries before rolling back or changing files.
  5. Take a backup or snapshot. Do this before deactivating components, restoring data, or modifying configuration.

Do not begin by deleting random files, reinstalling everything, or switching off firewalls and security plugins. Those actions can remove evidence, create additional problems, or expose an already unstable site.

Symptom-to-cause troubleshooting table

SymptomLikely causeBest first check
Error started after one updatePlugin or theme incompatibilityRecovery email and PHP error log
Only wp-admin failsAdmin hook, plugin, or memory problemDeactivate the named plugin through recovery mode
Error follows a PHP changeUnsupported syntax, missing extension, or old codeHosting PHP log and compatibility requirements
Blank page with no messageFatal error with output hidden, caching, or empty responseServer log and debug.log
Failure began after deploymentMissing files, dependencies, or wrong permissionsDeployment output and file integrity
Intermittent failures under loadMemory or resource exhaustionPHP memory and hosting resource logs

Step 1: Use WordPress recovery mode

When WordPress detects certain fatal errors, it may email the site administrator a recovery-mode link. Check the administrator address, spam folder, and any mailbox configured by your hosting provider. The message may identify the plugin or theme involved.

The link opens a protected session that can let you enter wp-admin while the faulty component is paused for that session. Deactivate the identified component, verify the public site, and then investigate compatibility before reactivating it. Recovery links expire; request a new one by loading the failing page again after the expiration period.

If no email arrives, the server may be unable to send mail, the saved administrator address may be outdated, or the fatal error may occur too early for recovery mode. Continue with the logs rather than repeatedly refreshing the site.

Step 2: Read the hosting error logs

Open the PHP or application error log in your hosting dashboard. Depending on the host, it may be under Logs, Metrics, Errors, PHP, or File Manager. Match entries to the time and URL of the failure. The last line is not always the root cause, so review nearby entries as well.

A useful fatal-error entry normally includes the error type, message, file path, and line number. A path containing /wp-content/plugins/example-plugin/ points toward that plugin, while a path under the active theme suggests a WordPress theme conflict. Errors in a core file can still originate from plugin code that called the core function incorrectly.

Step 3: Enable WP_DEBUG_LOG without exposing errors

If hosting logs are unavailable or unclear, add the following settings to wp-config.php above the line that says to stop editing:

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

Reproduce the error once, then inspect /wp-content/debug.log. Keeping WP_DEBUG_DISPLAY false prevents technical details from being printed to visitors. The official WordPress debugging documentation explains these constants and additional development tools.

A WordPress debug log can contain paths, queries, email addresses, or other sensitive data. Do not leave debugging enabled indefinitely on production. Download the relevant entries, set WP_DEBUG back to false, and securely remove or restrict the log after troubleshooting.

Step 4: Isolate a WordPress plugin conflict

When wp-admin still works

Open Plugins, select all plugins, and deactivate them. If the site returns, reactivate one plugin at a time and test both the public site and wp-admin after every change. Start with essential infrastructure plugins so you can detect interactions instead of assuming the final plugin activated is solely responsible.

When wp-admin is unavailable

Using SFTP or the hosting File Manager, rename wp-content/plugins to plugins-disabled. Create a new empty plugins directory or rename the original directory back after WordPress records the plugins as unavailable. If the site works with plugins disabled, restore the normal folder name and rename individual plugin directories one at a time to isolate the conflict.

Administrators with WP-CLI can use:

wp plugin deactivate --all
wp plugin activate plugin-slug

Run commands from the WordPress installation directory under the correct system user. A must-use plugin in wp-content/mu-plugins is not disabled by the standard plugin command or by renaming the regular plugins directory, so inspect that location when the error persists.

Step 5: Test for a WordPress theme conflict

If plugins are not responsible, activate a known-good default WordPress theme that is already installed. From WP-CLI, use wp theme activate theme-slug. Alternatively, use recovery mode or the dashboard. Do not rename the active theme unless another functional theme is installed, because WordPress needs a valid fallback.

If switching themes restores the site, inspect the theme’s functions.php, included files, template overrides, and child-theme customizations. Preserve modifications before reinstalling or rolling back the theme.

How to interpret common PHP fatal errors

These simplified examples reveal different root causes:

PHP Fatal error: Uncaught Error: Call to undefined function acme_render()
PHP Fatal error: Cannot declare class Payment_Gateway, because the name is already in use
PHP Fatal error: Declaration of Child::save($id) must be compatible with Parent::save($id, $force = false)
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted
  • Undefined function: A required file or dependency did not load, a plugin is inactive, or code calls an API removed by an update.
  • Cannot declare class: Two components use the same class name, or the same file was included twice without a guard.
  • Incompatible declaration: A child class no longer matches its parent method’s parameters, visibility, or return type. PHP-version changes often expose this outdated code.
  • Memory exhausted: A request used all available PHP memory. A loop, oversized operation, or inefficient plugin may be the real cause.

Fix the component named by the trace or obtain an updated release from its developer. Avoid editing a third-party plugin directly because the next update will overwrite the change.

Check PHP, memory, and failed deployments

Compare the server’s PHP version and extensions with the requirements of WordPress, the active theme, and every essential plugin. The current baseline is maintained on the official WordPress requirements page. Test a PHP version change on staging first; moving backward may briefly confirm a diagnosis, but unsupported PHP should not become a permanent fix.

If logs prove memory exhaustion, you may request more WordPress memory with:

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

This setting cannot exceed the host’s PHP limit, and more memory only treats the symptom when defective code continually consumes resources. Ask the host to confirm the effective limit and process restrictions.

After a failed deployment, compare the release with its source, confirm file ownership and permissions, and rerun the approved deployment or dependency installation process. Restore missing files from a clean release package or backup rather than downloading miscellaneous replacements.

Restore access or roll back safely

If a verified backup exists from immediately before the incident, restoration may be faster than live debugging. Prefer a restore that includes both files and the database when an update changed database structures. Restore to staging first when possible, and preserve the broken production copy and logs for diagnosis.

After recovery, clear application, object, CDN, and browser caches. Then confirm login, forms, scheduled tasks, checkout flows, and other business-critical functions. A visible homepage alone does not prove the website is fully repaired.

Critical error versus HTTP 500

The critical-error screen is generated by WordPress after it handles a qualifying fatal PHP error. An HTTP 500 Internal Server Error is a broader server response that may occur before WordPress loads. Invalid server configuration, permissions, exhausted resources, security rules, or a PHP service failure can all produce a generic 500 response.

Contact hosting support when you cannot access logs or files, multiple sites fail simultaneously, PHP crashes before WordPress loads, permissions or ownership changed unexpectedly, resources are repeatedly exhausted, or a server-level configuration caused the outage. Provide the timestamp, affected URL, request or trace ID, recent changes, and relevant log lines.

Prevent another WordPress critical error

  • Maintain automated, off-server backups and test restoration regularly.
  • Apply core, plugin, theme, and PHP changes on a representative staging site first.
  • Review changelogs, minimum PHP versions, and known compatibility notes.
  • Update in controlled batches instead of changing every component at once.
  • Use version control and repeatable deployments for custom code.
  • Monitor fatal errors, uptime, disk space, memory, and scheduled tasks.
  • Remove abandoned components and replace unsupported customizations.

As of November 2026, recovery mode and protected debug logging remain central WordPress troubleshooting tools, but compatibility continues to change as PHP, plugins, and themes evolve. A staging-first update process is safer than relying on emergency rollback alone.

Frequently asked questions

Can I fix the critical error without wp-admin?

Yes. Use the recovery-mode link, hosting File Manager, SFTP, server logs, or WP-CLI. Renaming a specific plugin directory is safer than deleting it and preserves its files for investigation.

Why did the error appear after a plugin update?

The release may contain a defect, conflict with another component, require a different PHP version, or reveal outdated custom code. The fatal-error trace is more reliable than timing alone.

Will increasing the WordPress memory limit fix the website?

Only when the effective limit is too low for a legitimate operation. If a plugin loops or processes excessive data, increasing memory delays the failure rather than correcting it.

How do I fix a WordPress white screen?

Use the same process: inspect PHP logs, enable logging without displaying errors, disable plugins, test a default theme, and check memory. A white screen may be a hidden fatal error, but caching or an empty server response can look similar.

Leave a Reply

Your email address will not be published. Required fields are marked *