WordPress fatal errors can crash your site, but they’re fixable. This guide walks you through diagnosing and resolving the most common causes, including plugin conflicts, theme issues, and memory limits—so you can get back online quickly.
Key Takeaways
- Identify the error type: Look for messages like “White Screen of Death” or “Allowed memory size exhausted” to pinpoint the issue.
- Enable debugging: Turn on WP_DEBUG in wp-config.php to see detailed error logs and locate the source.
- Deactivate plugins: Rename the plugins folder via FTP to disable all plugins and isolate conflicts.
- Switch to a default theme: Use a core WordPress theme like Twenty Twenty-Four to rule out theme-related problems.
- Increase PHP memory limit: Edit wp-config.php or .htaccess to allocate more memory if needed.
- Restore from backup: If all else fails, revert to a recent backup to recover your site safely.
- Prevent future errors: Keep WordPress, themes, and plugins updated to avoid compatibility issues.
What Is a WordPress Fatal Error?
A WordPress fatal error occurs when something goes wrong during the execution of your site’s code, causing it to stop working entirely. You might see a blank white screen (often called the “White Screen of Death”), an error message like “Fatal error: Allowed memory size exhausted,” or even a complete site crash. These errors are usually triggered by incompatible plugins, broken themes, outdated PHP versions, or insufficient server resources.
The good news? Most fatal errors are temporary and reversible—if you know how to troubleshoot them properly. In this guide, we’ll walk you through proven, step-by-step methods to diagnose and fix WordPress fatal errors safely, without losing your content or breaking your site further.
Step 1: Enable WordPress Debug Mode

Visual guide about How to Fix WordPress Fatal Error
Image source: seahawkmedia.com
The first step in fixing any fatal error is understanding what’s causing it. By default, WordPress hides detailed error messages for security reasons. But during troubleshooting, you need those details.
Edit wp-config.php
Use an FTP client or your hosting file manager to locate the wp-config.php file in your WordPress root directory. Open it and look for this line:
define('WP_DEBUG', false);Change it to:
define('WP_DEBUG', true);Also add these two lines below it to log errors to a file:
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);This will save error details to /wp-content/debug.log instead of showing them on screen—keeping your site secure while you investigate.
Check the debug log
After refreshing your broken page, check the debug.log file. It will show exactly which file and line number caused the error—making the next steps much easier.
Step 2: Deactivate All Plugins

Visual guide about How to Fix WordPress Fatal Error
Image source: wpwebsitehelp.com
Plugins are the #1 cause of WordPress fatal errors. A single outdated or poorly coded plugin can crash your entire site.
Rename the plugins folder via FTP
Connect to your site using FTP (like FileZilla) or your hosting control panel’s file manager. Navigate to /wp-content/plugins/ and rename the folder to something like plugins_old. This instantly deactivates all plugins.
Test your site
Refresh your website. If it loads normally, the error was plugin-related. Now, rename the folder back to plugins and reactivate them one by one to find the culprit.
Delete or replace the problematic plugin
Once identified, either update the plugin, find an alternative, or remove it entirely. Always keep plugins updated to avoid future conflicts.
Step 3: Switch to a Default WordPress Theme

Visual guide about How to Fix WordPress Fatal Error
Image source: wpqanda.com
If deactivating plugins doesn’t fix the issue, your active theme might be the problem—especially if you recently installed or updated a custom theme.
Rename your current theme folder
Go to /wp-content/themes/ and rename your active theme folder (e.g., from my-custom-theme to my-custom-theme-old).
WordPress will auto-switch to a default theme
WordPress automatically falls back to a default theme like Twenty Twenty-Four if your active theme is missing. Refresh your site—if it loads, the error was theme-related.
Reinstall or update your theme
You can now safely reinstall your theme or switch to a stable one. For help managing themes, check out our guide on how to deactivate a theme in WordPress or learn how to update a theme on WordPress to avoid compatibility issues.
Step 4: Increase PHP Memory Limit
Some fatal errors occur because WordPress runs out of memory—especially on sites with many plugins or large media libraries.
Edit wp-config.php again
Add this line above the “That’s all, stop editing!” comment:
define('WP_MEMORY_LIMIT', '256M');This increases the memory limit to 256MB, which is sufficient for most sites.
Alternative: Use .htaccess or php.ini
If editing wp-config.php doesn’t work, try adding this to your .htaccess file:
php_value memory_limit 256M
Or create/edit a php.ini file in your root directory with:
memory_limit = 256M
Note: Not all hosts allow these methods—check with your provider if unsure.
Step 5: Check for Corrupted Core Files
Sometimes, WordPress core files get corrupted during updates or due to server issues.
Reinstall WordPress manually
Download the latest version of WordPress from wordpress.org. Extract the ZIP file and upload all files *except* wp-content and wp-config.php to your server, overwriting existing ones. This refreshes core files without affecting your content or settings.
Verify file permissions
Ensure your files have correct permissions (usually 644 for files, 755 for folders). Incorrect permissions can prevent WordPress from reading essential files.
Troubleshooting Common Fatal Error Messages
Different error messages point to different fixes:
- “Allowed memory size exhausted”: Increase PHP memory as shown above.
- “Call to undefined function”: Usually means a plugin or theme is trying to use a function that doesn’t exist—often due to missing dependencies or outdated code.
- “Parse error: syntax error”: Indicates a coding mistake in a plugin or theme file—check the file mentioned in the error log.
- “White Screen of Death”: Often caused by a fatal PHP error with no visible output—enable debugging to uncover the root cause.
When All Else Fails: Restore from Backup
If none of the above steps work, restoring from a recent backup is your safest option. Most hosting providers offer one-click restore points, or you can use a plugin like UpdraftPlus.
Always keep regular backups—both files and database—to minimize downtime during emergencies.
How to Prevent Future Fatal Errors
Prevention is better than cure. Follow these best practices:
- Update regularly: Keep WordPress, themes, and plugins up to date.
- Test updates on a staging site: Never update directly on your live site without testing first.
- Use trusted plugins and themes: Only install software from reputable sources.
- Monitor PHP version: Ensure your host supports a modern PHP version (7.4 or higher).
- Enable automatic backups: Set up daily or weekly backups automatically.
For extra peace of mind, consider using a tool like WP Reset to quickly restore your site to a clean state if something goes wrong.
Conclusion
WordPress fatal errors are stressful—but rarely permanent. By enabling debugging, deactivating plugins, switching themes, increasing memory, and checking core files, you can resolve most issues in under 30 minutes. Always keep backups and stay proactive with updates to keep your site running smoothly. With the right approach, even the scariest error messages become manageable.