By Hridoy Ahmed | Last updated: November 2026 | 11 min read
Short answer: To fix a WordPress critical error or white screen, find out what changed last, then read the actual error. Check the recovery-mode email, turn on the debug log and look at the file path in the message: it names the plugin or theme at fault. If you cannot log in, rename the plugins folder through FTP to switch every plugin off. Back up first, and restore a backup if nothing works.
In this guide
- Which error do you have?
- Before you touch anything
- Step 1: Use recovery mode
- Step 2: Read the error
- Step 3: Fix it without admin access
- Step 4: Check PHP, memory and .htaccess
- Step 5: Repair core files or restore a backup
- How to prevent the next one
- FAQ
Which error do you have?
| What you see | What it usually means | First move |
|---|---|---|
| “There has been a critical error on this website” | A PHP fatal error, often from a plugin, a theme or a PHP version mismatch | Check the admin email for the recovery link |
| Blank white page | The same type of fatal error, with error display switched off | Turn on the debug log |
| 500 Internal Server Error | The server failed. Common causes are .htaccess rules, PHP limits, permissions or a PHP error | Check the server error log and .htaccess |
| “Error establishing a database connection” | Wrong database details or a database server problem | Check wp-config.php and ask your host |
| “Briefly unavailable for scheduled maintenance” | An update stopped halfway and left a maintenance file | Delete the .maintenance file in the site root |
This guide focuses on the first three, which are the most common.
Before you touch anything
- Ask what changed. Did you update a plugin, install a theme, edit code, change PHP or move hosts just before the error? The last change causes the problem in many cases. Write it down.
- Take a backup. Copy your files and export your database, even when the site is broken. Your host’s backup tool is fine.
- Work on one change at a time. Change one thing, test, then change the next. That keeps cause and effect clear.
Step 1: Use recovery mode
When WordPress detects a fatal error, it can send an email to the site’s admin address. The email names the plugin or theme that caused the error and includes a special link. That link lets you log in to the dashboard in recovery mode, where the faulty plugin or theme is paused. From there you can deactivate or update it.
Check your spam folder. If the admin email is old or wrong, skip to step 2.
Step 2: Read the error
Guessing wastes time. Make WordPress write the error to a log file. Open wp-config.php and add these lines above the line that says “That’s all, stop editing”:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Reload the broken page, then open /wp-content/debug.log with FTP or your file manager. The newest lines are at the bottom. Do not leave debug mode on. Remove the lines and delete the log when you finish, because the log shows file paths.
Read the file path first
The message ends with a path and a line number. The path tells you who is responsible.
| Path contains | Culprit | Action |
|---|---|---|
/wp-content/plugins/plugin-name/ |
That plugin | Deactivate it, update it or replace it |
/wp-content/themes/theme-name/ |
That theme or its functions file | Switch theme, undo the last code edit |
/wp-content/mu-plugins/ |
A must-use plugin | Ask who added it. Unknown files here deserve a security check |
/wp-includes/ or /wp-admin/ |
Core files, an incomplete update or a PHP incompatibility | Reinstall core files, check the PHP version |
Messages to know:
- “Allowed memory size exhausted”: the script ran out of PHP memory. Look at step 4.
- “Call to undefined function”: a plugin or theme needs code that is missing, often after a partial update or a missing dependency.
- “Uncaught Error” or “Parse error”: broken or incompatible code. This often follows a manual edit or a PHP upgrade.
Step 3: Fix it without admin access
Use FTP or your host’s file manager.
- Switch off all plugins. Rename
/wp-content/pluginstoplugins-off. Reload the site. If it works, a plugin is the cause. - Find the plugin. Rename the folder back to
plugins. Then rename each plugin folder one at a time (add-off) and reload after each one. Start with the plugin the log named, or the one you updated last. - Test the theme. Rename your active theme folder in
/wp-content/themes. WordPress falls back to a default theme if one is installed. If the site loads, the theme is the cause. - Update or replace the culprit. Install a fixed version, roll back to the last working version or find an alternative. Do not reactivate it until you know why it failed.
If renaming plugins changes nothing and you see unfamiliar files or admin users, check for a hack. Read how to know if your WordPress site is hacked.
Step 4: Check PHP, memory and .htaccess
- PHP version. A new PHP version can break old plugins, and an old version can break new ones. In your hosting panel, switch to the previous version and test. Then update the plugin or theme before you move up again.
- PHP memory. If the error mentions memory, raise the limit. Add
define( 'WP_MEMORY_LIMIT', '256M' );to wp-config.php or ask your host. Some hosts cap the limit, so a higher value may not apply. A plugin that keeps using more memory needs a fix, not only a bigger limit. - .htaccess (500 errors). Rename
.htaccessto.htaccess-old, then reload. If the site works, log in and go to Settings, Permalinks, and click Save to create a fresh file. - File permissions. Wrong permissions can cause 500 errors. See recommended WordPress file permissions.
- Disk space and server logs. A full disk breaks many things. Your host’s error log often shows the exact cause of a 500 error.
Step 5: Repair core files or restore a backup
If the log points to /wp-includes/ or /wp-admin/, a core file may be damaged. Download WordPress from wordpress.org. Upload fresh copies of the wp-admin and wp-includes folders and the root files, but keep your wp-content folder and wp-config.php. If you have WP-CLI, wp core verify-checksums lists core files that differ from the official ones.
If you still cannot find the cause, restore the last working backup and repeat the update on a staging copy. See my guide on the WordPress staging site.
Stuck, or running a live shop where every hour costs money? My WordPress maintenance and migration service includes safe updates and backups so errors like this get caught early.
How to prevent the next one
- Back up before every update. See how often to back up WordPress.
- Update plugins one at a time and check key pages after each. Read how to update WordPress plugins safely.
- Test major changes on a staging site.
- Check plugin compatibility before you change the PHP version.
- Remove plugins and themes that you do not use.
- Use a monthly routine. See my WordPress maintenance checklist.
FAQ
What causes the WordPress critical error?
A fatal PHP error stops the page from loading. It usually comes from a plugin, a theme, custom code or a PHP version mismatch.
Is the white screen of death the same as a critical error?
They share the same kind of cause. The critical error message appears when WordPress can show it, and a blank page appears when it cannot.
Will I lose my content?
Usually no. Your posts live in the database, and these errors affect code. Still, take a backup before you fix anything.
Can I fix it without FTP?
Sometimes. Use the recovery-mode link if you have it, or the file manager in your hosting panel.
Could a hack cause the error?
Yes, but it is less common than a plugin conflict. Unknown files, new admin users or spam content point to a hack.
Want someone to keep updates and backups under control? I handle updates, backups and checks so your site stays online. See my WordPress maintenance service.
About the author: Hridoy Ahmed is an SEO specialist and WordPress security expert based in Dhaka, Bangladesh. He has 8+ years of experience and works with clients worldwide.
