8 Ways to Fix "There Has Been a Critical Error on This Website"

You are in the middle of editing a post when your browser goes white. You refresh and see the full sentence: "There has been a critical error on this website." Your stomach drops. A client's WooCommerce store, a membership site, or your own portfolio is now showing visitors a blank error screen instead of content. The good news is that this is almost always a recoverable problem — not a permanent outage.

The most common cause is a memory limit breach or a faulty plugin update. The quickest fix is to increase the PHP memory limit via wp-config.php, which we will walk through first. Below you will find nine proven methods to diagnose and fix the "There has been a critical error on this website" message, arranged from the simplest checks to advanced recovery steps.

Before you start: Back up everything

Before making any changes, back up your site's database and files. Use a plugin like UpdraftPlus or do a manual backup via cPanel. If your wp-admin dashboard is inaccessible, back up via FTP or your hosting control panel. A backup ensures you can always revert to a working state if a fix causes further issues.

Also note: the error message often includes a link to "Learn more about troubleshooting WordPress" that sends you to a recovery mode email. That recovery link can save you if you get locked out of the admin area entirely.

Common causes of the "There has been a critical error on this website" message

How to fix the critical error (9 methods, ordered from quickest to most advanced)

1. Increase the PHP memory limit

WordPress sets a default memory limit of 40 MB for single sites and 64 MB for multisite. Modern themes and plugins often require more. If the site crashes during a memory-intensive operation like image processing or importing data, raising the limit often resolves the error immediately.

To increase the limit, access your site via FTP or your hosting file manager and open the wp-config.php file in the root directory. Add the following line just before the / That's all, stop editing! Happy blogging. / line:

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

If you need even more for operations like media handling, you can also add:

define('WPMAXMEMORYLIMIT', '512M');

Save the file and reload your site. If the error disappears, the memory limit was the bottleneck.

2. Enable WordPress debug mode to see the real error

The "critical error" message hides the actual PHP error to avoid exposing sensitive information to visitors. By enabling debug mode, you can see the specific error message — usually a fatal error with a file path and line number.

Open wp-config.php and find the WPDEBUG constant. Replace it with these lines (or add them):

define('WPDEBUG', true);
define('WP
DEBUGDISPLAY', true);
define('WP
DEBUGLOG', true);

Now refresh the page. You should see a detailed PHP error message, something like "Fatal error: Uncaught Error: Call to undefined function…" followed by a file path. That path tells you exactly which plugin or theme file is causing the issue. Once you have fixed the root cause, set WPDEBUG back to false for production.

3. Deactivate all plugins via FTP or file manager

If you cannot access wp-admin, you can disable all plugins manually. Navigate to the /wp-content/ directory via FTP and rename the plugins folder to pluginsold. This forces WordPress to see no active plugins.

Refresh your site. If it loads normally, the conflict is plugin-related. To find the culprit, rename the folder back to plugins and then rename individual plugin folders one at a time, testing after each. When the error returns after a rename, that plugin is the issue. Delete or replace it.

4. Switch to a default WordPress theme

A faulty theme can trigger the critical error. If you are using a custom or third-party theme, temporarily switch to a default theme like Twenty Twenty-Four or Twenty Twenty-Three.

From wp-admin, go to Appearance → Themes and activate a default theme. If you cannot access the admin area, rename your current theme's folder via FTP (inside /wp-content/themes/). For example, rename my-custom-theme to my-custom-theme-old. WordPress will automatically fall back to a default theme.

If the error clears, your theme was the cause. Update the theme or contact its developer.

5. Check the .htaccess file

A corrupted or misconfigured .htaccess file can produce the critical error. Rename .htaccess to .htaccessold via FTP. This will reset your permalinks and remove any custom rewrite rules.

Reload the site. If it works, the .htaccess file was the problem. To regenerate a clean version, go to Settings → Permalinks in wp-admin and click Save Changes (no other changes needed). WordPress writes a fresh, working .htaccess file.

6. Reinstall WordPress core files

Core file corruption can cause the error. From the wp-admin dashboard, go to Dashboard → Updates and click the Reinstall WordPress button. This downloads fresh copies of all core files while leaving your content, plugins, and themes untouched.

If you cannot reach the dashboard, download a fresh copy of WordPress from wordpress.org. Extract the zip file locally, then upload the /wp-admin/ and /wp-includes/ folders to your server via FTP, overwriting the existing ones. Do not upload the /wp-content/ folder — that contains your custom content.

7. Update the PHP version (via hosting control panel)

An outdated PHP version can cause fatal errors when a plugin or theme uses modern PHP features. Most hosting providers allow you to change the PHP version from the control panel.

Log in to your hosting account (e.g., cPanel or Plesk) and look for Select PHP Version or PHP Settings. Choose PHP 8.0, 8.1, or 8.2 — the highest version that still supports your theme and plugins. Test your site after each change. If the error persists, revert to the previous version and investigate plugin compatibility.

8. Check for a corrupted database table

A corrupted table in the WordPress database can trigger the critical error. Use a plugin like WP-Optimize or a built-in repair tool. First, add the following line to wp-config.php:

define('WPALLOWREPAIR', true);

Visit https://yoursite.com/wp-admin/maint/repair.php. You will see a screen to repair or optimize the database. Click Repair Database. After the repair, remove the line from wp-config.php immediately — leaving it exposed is a security risk.

9. Restore from a recent backup (last resort)

If none of the above fixes work, restore your site from the backup you made at the start. Use your backup plugin (e.g., UpdraftPlus, BackupBuddy) or a manual restore via phpMyAdmin for the database and FTP for the files. This should return your site to a fully working state, after which you can investigate the cause more methodically.

How to prevent this error in the future

Prevention is better than recovery. Keep your WordPress core, themes, and plugins updated. Before updates, test on a staging environment if possible. Monitor your site's PHP memory usage and increase the limit proactively when adding resource-heavy features.

Regular backups — automated weekly — ensure you can always roll back. Finally, use a maintenance mode plugin to show a friendly message during updates, so visitors never see the stark error screen.

Frequently asked questions

What does "There has been a critical error on this website" mean in WordPress?

This error indicates that WordPress has encountered a fatal PHP error that stopped the page from loading. It is a generic catch-all message designed to prevent exposing sensitive server information to visitors. The underlying cause is almost always a plugin conflict, a theme issue, a low memory limit, or a corrupted file.

Can I fix the critical error without losing my data?

Yes. All fixes listed above — from increasing the memory limit to deactivating plugins — preserve your content and settings. Only a full file-by-file restore from backup could potentially overwrite content, and even that is avoidable by restoring selectively.

How do I access recovery mode when I get this error?

When the error appears, WordPress may send a recovery link to the site admin email address. Check your inbox (and spam folder) for an email from your site with a link that looks like https://yoursite.com/wp-login.php?action=enterrecoverymode&.... Click it to enter recovery mode, where you can deactivate plugins or switch themes temporarily.

Will increasing the PHP memory limit slow down my site?

No. Increasing the memory limit does not slow performance; it simply allows WordPress to use more RAM when needed. If your server has sufficient total memory (typically 512 MB or more for a shared plan), allocating 256 MB to WordPress is safe and common.

What should I do if I cannot access wp-admin or FTP?

If both are inaccessible, contact your hosting provider's support team. They can log in to the server directly, check error logs, temporarily disable plugins, or restore from a backup. Provide them with the exact error message and any error log snippets you retrieved earlier.

Key takeaways

A working site gives you the freedom to focus on what matters: growing your content and your audience. Once your site is stable, tools like nativeWP can help you publish high-quality, SEO-optimized articles on autopilot, so you never have to choose between maintenance and growth.