Common WordPress Errors and How to Fix Them

Key Takeaways
- ✓Turn on WP_DEBUG_LOG first so you see the real error.
- ✓Most WordPress errors come from plugins, the database, PHP limits or the site URL.
- ✓Re-saving permalinks fixes 404s on every post.
- ✓Delete the .maintenance file if the site is stuck after an update.
Table of Contents
- •Common WordPress Errors and How to Fix Them
- •WordPress Errors at a Glance
- •White Screen of Death or “Critical Error”
- •Error Establishing a Database Connection
- •500 Internal Server Error
- •502 Bad Gateway and 504 Gateway Timeout
- •Allowed Memory Size Exhausted
- •Too Many Redirects (ERR_TOO_MANY_REDIRECTS)
- •404 Errors on Posts and Pages
- •“Briefly Unavailable for Scheduled Maintenance”
- •Mixed Content After Moving to HTTPS
- •Upload and Permission Errors
- •Connection Timed Out or a Slow Admin
- •How to Avoid Most WordPress Errors
- •Frequently Asked Questions
- •Fewer Errors, Faster Fixes
Common WordPress Errors and How to Fix Them
Most WordPress errors fall into a small number of patterns, and each one points to a specific cause: a plugin or theme, the database, the server’s PHP settings, file permissions or the site URL. This guide lists the errors you’re most likely to see, what each one means, and the fix that works most often, with links to our full step-by-step guides.
Before you fix anything: take a backup if the site still responds, and turn on WordPress’s debug log so you can see the real error instead of guessing. Add these lines to wp-config.php, reproduce the error, then read wp-content/debug.log:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );WordPress Errors at a Glance
| Error | Usual cause | First fix |
|---|---|---|
| White screen / “There has been a critical error” | PHP fatal error in a plugin or theme | Recovery-mode email, or rename the plugins folder |
| Error establishing a database connection | Wrong DB credentials or MySQL down | Check wp-config.php and the database server |
| 500 Internal Server Error | Plugin, .htaccess or PHP limit | Rename .htaccess, then test plugins |
| 502 / 504 Bad Gateway | PHP-FPM down, overloaded or too slow | Check PHP-FPM status and logs |
| Allowed memory size exhausted | PHP memory limit reached | Raise WP_MEMORY_LIMIT and PHP memory_limit |
| Too many redirects | Wrong site URL or HTTPS settings | Check WordPress Address and Site Address |
| 404 on every page except the home page | Permalink rewrite rules | Re-save permalinks |
| Briefly unavailable for scheduled maintenance | Interrupted update | Delete the .maintenance file |
| Mixed content warnings | HTTP links on an HTTPS site | Update URLs to https |
| Upload: missing a temporary folder / failed to write | Permissions or disk space | Check wp-content/uploads permissions and disk |
White Screen of Death or “Critical Error”
A blank page or “There has been a critical error on this website” is a PHP fatal error. WordPress usually emails the admin a recovery-mode link that names the plugin or theme at fault. If not, renaming wp-content/plugins deactivates all plugins at once. Full guide: WordPress white screen of death.
Error Establishing a Database Connection
WordPress can’t reach MySQL. Check DB_NAME, DB_USER, DB_PASSWORD and DB_HOST in wp-config.php, then whether the database server is running and has free RAM and disk. Full guide: fix “Error establishing a database connection”.
500 Internal Server Error
A generic server error. The most common causes, in order:
A corrupted .htaccess file (on Apache): rename it to
.htaccess-old, load the site, then regenerate it by saving Settings → Permalinks.A plugin or theme: test as for the white screen.
A PHP limit: memory or execution time; the debug log and the server error log show which.
502 Bad Gateway and 504 Gateway Timeout
The web server (often Nginx) couldn’t get a response from PHP: PHP-FPM is stopped, all its workers are busy, or a request ran too long. Check systemctl status php*-fpm and the PHP-FPM log. Our guide to 502 Bad Gateway in Nginx covers every cause.
Allowed Memory Size Exhausted
“Fatal error: Allowed memory size of … bytes exhausted” means PHP hit its memory limit. Raise WordPress’s limit with define( 'WP_MEMORY_LIMIT', '256M' ); in wp-config.php, and if needed the server’s PHP memory_limit. If it keeps happening, find the plugin using the memory rather than raising the limit forever.
Too Many Redirects (ERR_TOO_MANY_REDIRECTS)
The browser is bounced in a loop, almost always between HTTP and HTTPS or www and non-www. Check that WordPress Address and Site Address in Settings → General match exactly how the site should load (for example https://www.example.com), and that a CDN or proxy isn’t also forcing a conflicting redirect. If you can’t log in, set the URLs in wp-config.php:
define( 'WP_HOME', 'https://www.example.com' );
define( 'WP_SITEURL', 'https://www.example.com' );404 Errors on Posts and Pages
If the home page works but every post returns 404, the rewrite rules are broken, often after a migration. Go to Settings → Permalinks and click Save without changing anything. On Nginx, make sure the server block passes requests to index.php: try_files $uri $uri/ /index.php?$args;
“Briefly Unavailable for Scheduled Maintenance”
WordPress creates a .maintenance file during updates and removes it when they finish. If an update was interrupted, the message stays. Delete .maintenance from the site root, then re-run the update that failed.
Mixed Content After Moving to HTTPS
The padlock is missing or the browser warns about insecure content because some images, scripts or styles still load over http://. Update the site URLs to https and replace old links in the database. Our guide to installing an SSL certificate on WordPress shows how.
Upload and Permission Errors
“Unable to create directory”, “Missing a temporary folder” or “Failed to write file to disk” point to file permissions, ownership or a full disk. Directories are normally 755 and files 644, owned by the user PHP runs as. Check free space with df -h on a VPS.
Connection Timed Out or a Slow Admin
Timeouts usually mean the server is overloaded: too little RAM or CPU for the plugins and traffic. Remove plugins you don’t use, add page caching, and check whether a backup or import job is running. If it keeps happening, the site has outgrown its plan.
How to Avoid Most WordPress Errors
Update plugins, themes and PHP on a staging copy first.
Keep daily backups you can restore with one click.
Remove plugins and themes you don’t use.
Watch disk space and memory; many “random” errors are a server running out of one.
Frequently Asked Questions
How do I find the cause of a WordPress error?
Turn on WP_DEBUG_LOG in wp-config.php, reproduce the error, and read wp-content/debug.log. Your host’s PHP and web server error logs show the rest.
What is the most common WordPress error?
Errors caused by plugins are the most common: a plugin update that conflicts with another plugin, the theme or the PHP version. That’s why disabling plugins is the first test for most errors.
Can a WordPress error delete my content?
Rarely. Content lives in the database, and most errors only stop WordPress from displaying it. Database corruption or deleted files are the exceptions, which is why backups matter.
Why do errors appear after an update?
An updated plugin, theme or WordPress core can conflict with other code or need a newer PHP version. Testing updates on staging first catches most of these.
Should I leave WP_DEBUG on?
No. Turn it off after troubleshooting; debug output and logs can reveal file paths and other details.
Fewer Errors, Faster Fixes
RackUp Cloud WordPress hosting gives every site its own container with reserved RAM, 1-click staging with push/pull sync to test updates, and automated daily offsite backups with one-click rollback. PHP 8.2 to 8.5 is a dashboard setting, and plans start at $2.49 a month. See plans.
Unsure Which Cloud Hosting Plan Fits Your Site?
Answer 4 quick diagnostic questions to estimate the server CPU, RAM and storage you need with transparent pricing.
Cloud Infrastructure Engineer.
Related Posts
WordPress HostingHow to Increase the WordPress Memory Limit (and When You Shouldn’t)
Raise the WordPress memory limit the right way: WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT and PHP memory_limit, how to check them, and when a higher limit hides a problem.
WordPress HostingHosting for Agencies: How to Host Client Websites Without the Headaches
Reseller hosting, one big VPS, premium agency plans or one container per client: how each agency hosting setup affects your margin, support time and risk.
WordPress HostingSiteGround Alternatives (2026): Managed WordPress Hosting Without the Renewal Jump
SiteGround's intro prices jump at renewal. Here are its 2026 prices and the managed WordPress alternatives worth comparing, with an honest look at the trade-offs.