WordPress · Guide

Fix the 15 Most Common WordPress Errors

The 15 WordPress errors that break sites in production — white screen, 500, 503, database errors — and how to fix each.

1. White Screen of Death

Cause: fatal PHP error, usually plugin/theme conflict.

Fix: enable WP_DEBUG to see the error. Deactivate plugins via FTP (rename /plugins folder). Switch to a default theme.

2. HTTP 500 Internal Server Error

Cause: .htaccess issue, PHP memory exhausted, or plugin fatal.

Fix: rename .htaccess and regenerate via Settings → Permalinks. Increase memory_limit. Check server error log.

3. HTTP 503 Service Unavailable

Cause: WP maintenance mode stuck, or origin server down.

Fix: delete .maintenance file in WP root. Check host status.

4. Error Establishing a Database Connection

Cause: wrong DB credentials, DB server down, DB corrupt.

Fix: verify wp-config.php DB constants. Test DB via host tools. Repair via define('WP_ALLOW_REPAIR', true); + /wp-admin/maint/repair.php.

5. Allowed memory size exhausted

Fix: define('WP_MEMORY_LIMIT', '512M'); in wp-config.php. Also set memory_limit in php.ini or .htaccess.

6. Upload_max_filesize / Media upload errors

Fix: increase upload_max_filesize + post_max_size in php.ini. Or via host control panel.

7. Mixed content warnings after HTTPS

Fix: use Better Search Replace to update all http:// URLs to https:// in DB. Check hard-coded URLs in theme.

Diagnostic ladder

StepCommand / ActionFixes
Enable WP_DEBUGwp-config.phpReveals real error
Deactivate all pluginsRename /pluginsPlugin conflicts
Switch to default themeWP-CLI or FTPTheme conflicts
Increase memory_limitwp-config or php.iniMemory errors
Regenerate .htaccessSave permalinksRewrite issues
Restore from backupHost or pluginNuclear option

8. Too many redirects

Cause: WordPress Address vs Site Address mismatch, or SSL/CDN redirect loop.

Fix: verify WP_HOME and WP_SITEURL. Set Cloudflare SSL to 'Full (strict)'.

9. Briefly unavailable for scheduled maintenance

Fix: delete .maintenance file left by an interrupted update.

11. Failed automatic update

Fix: manual update via FTP — download WP zip, replace wp-admin + wp-includes, keep wp-content + wp-config.

12. Fatal error on plugin activation

Fix: activate via WP-CLI (wp plugin activate) to see the error, or check server error log.

13. Locked out of admin

Fix: reset password via WP-CLI (wp user update) or phpMyAdmin. Or add a user via functions.php temporarily.

14. WordPress not sending email

Fix: install WP Mail SMTP and configure a real SMTP provider (SendGrid, Mailgun, Postmark). PHP mail() is unreliable.

15. Session cookies error / can't log in

Fix: clear browser cookies for the site. Check that WP_HOME and WP_SITEURL match. Verify cookie domain settings.

Frequently Asked Questions

Where do I find the real WordPress error?+

Enable WP_DEBUG in wp-config.php and check /wp-content/debug.log or your server's error log.

What should I do before troubleshooting?+

Take a fresh backup. Every fix has a chance of making things worse.

How do I access files when locked out?+

FTP (Filezilla), SFTP, or your host's file manager. WP-CLI via SSH is fastest if available.

Should I edit core files?+

No — never. Any core modification is overwritten on update and often introduces security issues.

When to call a WordPress developer?+

If you've tried the diagnostic ladder + restored from backup and still can't identify the issue, or if it involves database corruption or malware.

Written by Haseeb Malik, a full-stack developer in Dubai helping startups ship AI-first products.
HomeWorkServicesGuidesToolsAboutChat