Before You Start — Enable Debug Mode
Before diagnosing any WordPress error, enable debug logging so you can see the actual error message rather than a generic failure screen. Add these three lines to wp-config.php above the line that says "That's all, stop editing!":
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
This writes errors to wp-content/debug.log without displaying them to site visitors. Check this file after reproducing the error — the specific PHP error or function name it references will tell you exactly which plugin, theme, or core file is the source.
Remember to remove or disable these lines once you've resolved the issue.
White Screen of Death (WSOD)
A completely blank white page — no error message, no content — is almost always a PHP fatal error that exhausted memory or hit a fatal exception before WordPress could render anything.
Most common causes: a plugin or theme with a PHP fatal error, WordPress memory limit too low, or a corrupted plugin file from a failed update.
Fix it:
- Enable WP_DEBUG as above and check debug.log for the specific error
- If the error names a plugin, deactivate it via FTP by renaming its folder in
wp-content/plugins/ - If no specific plugin is named, deactivate all plugins by renaming the entire
wp-content/plugins/folder toplugins-disabled/ - If the site loads after deactivating plugins, reactivate one at a time to find the culprit
- If deactivating plugins doesn't help (see our full plugin conflict guide for detailed steps), switch to a default WordPress theme by renaming your theme folder in
wp-content/themes/ - If the WSOD only appears on the admin side, try increasing memory: add
define('WP_MEMORY_LIMIT', '256M');to wp-config.php
500 Internal Server Error
A 500 error means the server encountered an unexpected condition. Unlike the WSOD, this error comes from the web server (Apache or Nginx) rather than PHP itself.
Most common causes: a corrupted .htaccess file, exhausted PHP memory, a PHP version incompatibility, or a plugin causing a server-level error.
Fix it:
- Reset your
.htaccessfile — rename it to.htaccess-oldvia FTP, then go to Settings → Permalinks in WordPress and click Save to regenerate a clean one - Check your server's error log (not WordPress's debug log) — your host's control panel usually provides access to this
- Deactivate all plugins via FTP as described above
- Check if your PHP version is compatible with your plugins and theme
- Ask your host to check server-level error logs if the above doesn't surface the cause
Error Establishing a Database Connection
This error means WordPress cannot connect to its MySQL database. The site is completely inaccessible — both front-end and admin.
Most common causes: incorrect database credentials in wp-config.php, the database server is down or overloaded (common on shared hosting), or the database itself is corrupted.
Fix it:
- Verify your database credentials in
wp-config.php— DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST must all be correct. These are set when WordPress is installed and can become mismatched after a hosting migration - Log into your host's database management tool (phpMyAdmin or similar) using the same credentials to confirm they work
- If credentials are correct but you still can't connect, the database server may be down — contact your host
- If you can connect but WordPress still shows the error, the database may be corrupted. Visit
yoursite.com/wp-admin/maint/repair.php— WordPress has a built-in repair tool that you can enable by addingdefine('WP_ALLOW_REPAIR', true);to wp-config.php
WordPress Login Redirect Loop
You enter your credentials, WordPress appears to log you in, then redirects back to the login page repeatedly without actually granting access.
Most common causes: a cookie issue, incorrect WordPress URL settings, or a caching plugin serving a cached version of the login page.
Fix it:
- Clear your browser cookies for your site's domain, then try logging in again
- Clear your site's cache completely if you have a caching plugin
- Check that
siteurlandhomein your database (wp_options table) match your actual site URL exactly — a mismatch after a migration is a common cause - Add these lines to wp-config.php to force the correct URLs:
define('WP_HOME','https://yoursite.com');anddefine('WP_SITEURL','https://yoursite.com');
Fatal Error: Maximum Execution Time Exceeded
PHP has a time limit for script execution. When a plugin or process exceeds it, WordPress throws a fatal error. This is common during large imports, theme builds, or plugin operations that process a lot of data.
Fix it:
- Add
set_time_limit(300);to wp-config.php to temporarily increase the limit to 5 minutes - Ask your host to increase the PHP max_execution_time in your server configuration
- If the error is triggered by a specific plugin operation, check that plugin's settings for batch size — reducing the number of items processed per batch reduces execution time per run
Briefly Unavailable for Scheduled Maintenance
WordPress creates a .maintenance file in the root directory during updates. If an update fails or the file isn't removed, the site stays in maintenance mode indefinitely.
Fix it: Connect via FTP and delete the .maintenance file from your WordPress root directory. The site returns immediately.
404 on All Pages Except the Homepage
If your homepage loads but every other page throws a 404, your permalink structure is broken — usually caused by a corrupted .htaccess file or a server that doesn't support mod_rewrite.
Fix it:
- Go to Settings → Permalinks and click Save Changes without changing anything — this regenerates the .htaccess rewrite rules
- If that doesn't work, check that mod_rewrite is enabled on your server (ask your host)
- Verify your .htaccess file contains the standard WordPress rewrite block — if it's missing or corrupted, replace it with the default WordPress .htaccess content
Mixed Content Warnings (HTTP/HTTPS)
After migrating to HTTPS, some resources (images, scripts, stylesheets) may still be referenced with HTTP URLs, causing browser security warnings and breaking page display.
Fix it:
- Run a search-replace in your database using a plugin like Better Search Replace — replace
http://yoursite.comwithhttps://yoursite.com - Update your WordPress URL settings in Settings → General to use HTTPS
- Add HTTPS enforcement to your .htaccess or ask your host/CDN to handle it at the server level
When to Stop Troubleshooting and Get Professional Help
If you've worked through the relevant steps and the error persists, or if the error is on a site handling payments, memberships, or other critical functionality where downtime has real business impact — stop experimenting and get help. Further troubleshooting without deep WordPress and server knowledge can compound the problem.
CriticalWP's emergency support covers all of the errors above — systematic diagnosis, root cause identification, and a proper fix. On a CriticalWP managed plan, most of these issues are prevented entirely through managed updates and proactive monitoring.