Fixing Common WordPress Errors
Fixing Common WordPress Errors
WordPress errors can be frustrating, but most have well-known causes and straightforward fixes. Here are the most common issues and how to resolve them.
White Screen of Death (WSOD)
A blank white page with no error message, usually caused by a PHP fatal error or memory exhaustion.
Fixes:
- Enable debugging: Add to
wp-config.php:define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); - Increase memory limit: Add to
wp-config.php:define('WP_MEMORY_LIMIT', '256M'); - Disable plugins: Rename the
wp-content/pluginsfolder via FTP to deactivate all plugins. Rename it back and reactivate plugins one by one to find the culprit. - Switch theme: Rename your active theme’s folder to fall back to a default theme.
Error Establishing a Database Connection
WordPress can’t connect to the MySQL database.
Fixes:
- Verify database credentials in
wp-config.php(DB_NAME,DB_USER,DB_PASSWORD,DB_HOST). - Check if the database server is running — contact your hosting provider if needed.
- Repair the database: Add
define('WP_ALLOW_REPAIR', true);towp-config.php, then visityoursite.com/wp-admin/maint/repair.php.
500 Internal Server Error
A generic server-side error with multiple potential causes.
Fixes:
- Rename
.htaccessto.htaccess_backupand reload the site. If it works, go to Settings → Permalinks and click Save to regenerate.htaccess. - Increase PHP memory limit.
- Deactivate plugins to check for conflicts.
- Check the PHP version — upgrade if your host supports a newer version.
404 Errors on All Pages (Except Home)
Permalink settings are misconfigured or .htaccess is missing.
Fix: Go to Settings → Permalinks and click Save Changes without modifying anything. This regenerates the .htaccess file.
Stuck in Maintenance Mode
WordPress displays “Briefly unavailable for scheduled maintenance” and doesn’t recover.
Fix: Delete the .maintenance file from your WordPress root directory via FTP or File Manager.
Login Redirect Loop
You’re redirected back to the login page after entering correct credentials.
Fixes:
- Clear browser cookies and cache.
- Verify
WP_HOMEandWP_SITEURLinwp-config.phpmatch your actual domain. - Check for plugin conflicts (especially security or caching plugins).
Memory Exhausted Error
Fatal error: Allowed memory size of xxx bytes exhausted
Fix: Increase memory in wp-config.php:
define('WP_MEMORY_LIMIT', '256M');
Also check with your hosting provider for PHP memory limits set at the server level.
General Troubleshooting Steps
- Always back up before making changes.
- Check the error log in cPanel or
wp-content/debug.log. - Disable plugins and switch to a default theme to isolate the issue.
- Ensure PHP and WordPress are on supported versions.
- Contact your hosting provider’s support if server-side issues persist.