How to Fix Common WordPress Errors
Most common WordPress errors look alarming but have a small number of well-understood causes. A blank screen, a database connection message or an endless redirect usually points to a specific
7 minute read
Most common WordPress errors look alarming but have a small number of well-understood causes. A blank screen, a database connection message or an endless redirect usually points to a specific problem: a plugin conflict, a configuration mismatch, a server limit or a file left behind by an interrupted update. Knowing what each message means turns panic into a short, methodical fix.
This guide explains the errors we see most often on business sites, what causes them and how to resolve them safely. It reflects the practical side of our web design work, and the troubleshooting our website maintenance team handles for clients. If you are not comfortable editing server files, share this with your developer or host.
First steps before fixing anything
- Take a backup of files and database if the site allows it, or confirm your host has a recent one.
- Note what changed: an update, a new plugin, a hosting change, an edit to theme files. The most recent change is the most likely cause.
- Get access outside WordPress: make sure you can reach the hosting control panel, file manager or SFTP, and the database tool, because many errors lock you out of the dashboard.
- Turn on logging: setting WP_DEBUG and WP_DEBUG_LOG to true in wp-config.php writes errors to a debug.log file in wp-content. Keep WP_DEBUG_DISPLAY off on live sites so visitors do not see error messages.
Errors that take the whole site down
There has been a critical error on this website
This message, or a white screen on older setups, means PHP hit a fatal error, usually caused by a plugin, a theme or custom code. WordPress normally emails the admin address a recovery mode link that lets you log in and deactivate the faulty extension. If the email does not arrive, rename the suspected plugin’s folder in wp-content/plugins using the file manager, which deactivates it. The debug log will usually name the file responsible.
Error establishing a database connection
WordPress cannot reach its database. Check that DB_NAME, DB_USER, DB_PASSWORD and DB_HOST in wp-config.php match the details in your hosting panel, particularly after a migration or password change. If they are correct, the database server may be down or overloaded, which is a question for your host. Corrupted tables can be repaired through the host’s database tool or WordPress’s built-in repair page, enabled temporarily with WP_ALLOW_REPAIR.
Briefly unavailable for scheduled maintenance
During updates, WordPress creates a .maintenance file in the site’s root folder. If an update is interrupted, the file stays and the site remains in maintenance mode. Delete the .maintenance file, then check the update that was running and complete it properly.
Server errors
500 Internal Server Error
A general message that something failed on the server. Common causes are a corrupted .htaccess file, a plugin conflict or PHP limits. Rename .htaccess to test it, then regenerate a clean one by saving Settings, Permalinks in the dashboard. If that does not help, check the server error log and deactivate plugins to isolate the cause.
Allowed memory size exhausted
A process needed more memory than PHP allows. You can raise WordPress’s limit with WP_MEMORY_LIMIT in wp-config.php, but only up to what your hosting plan permits. If the error returns, find the plugin or process using excessive memory rather than raising limits indefinitely.
502 Bad Gateway and 504 Gateway Timeout
The web server did not get a timely response from PHP or an upstream service. These often appear during traffic spikes, heavy imports, large backups or slow external API calls. Check with your host whether PHP workers or resources are being exhausted, and move heavy tasks to off-peak times.
403 Forbidden
Access to a page or file is being refused. Typical causes are incorrect file permissions, a security plugin or firewall rule blocking a legitimate request, or rules in .htaccess. Standard permissions are 755 for folders and 644 for files. Check firewall logs if the error affects specific users or countries.
URL, redirect and display errors
Too many redirects
The browser is being sent in a loop. Frequent causes include a mismatch between the WordPress Address and Site Address settings, conflicting HTTP to HTTPS redirects in the server and a plugin, or a CDN such as Cloudflare set to Flexible SSL while the site also forces HTTPS. Align the settings so only one layer handles the redirect.
404 errors on posts and pages
If the homepage works but inner pages return 404, the rewrite rules are usually broken. Going to Settings, Permalinks and clicking save regenerates them. After a migration, check that the server supports the rewrite rules WordPress needs.
Mixed content warnings
The page loads over HTTPS but some images, scripts or styles still load over HTTP, so browsers show a warning or block them. Update the site URLs to HTTPS and run a careful search and replace on the database for old HTTP links, using a tool that handles serialized data correctly.
Styles missing or layout broken
Often caused by caching or minification after an update. Clear the caching plugin, server cache, CDN and browser cache, and regenerate page builder CSS where applicable. Arabic pages that suddenly lose their right-to-left layout usually point to a theme or translation plugin conflict.
Admin, upload and email problems
- Uploaded file exceeds upload_max_filesize: the PHP upload limit is too low for the file. Raise upload_max_filesize and post_max_size through your hosting panel, or compress the file.
- Parse error or syntax error: usually follows a direct edit to functions.php or another theme file. Restore the previous version of that file through the file manager, and make future code changes in a child theme or snippets plugin after testing on staging.
- Login loop: you log in and return to the login screen. Clear browser cookies, check the site URL settings, and temporarily deactivate security or caching plugins.
- Form emails not arriving: WordPress’s default mail function is often filtered as spam. Send through an authenticated SMTP or email API service, and set up SPF, DKIM and DMARC for your domain.
- Missed schedule on posts: WP-Cron relies on site visits to run scheduled tasks. On low-traffic or heavily cached sites, disable the built-in trigger with DISABLE_WP_CRON and set up a real server cron job.
Quick reference to common WordPress errors
| Error | Most likely cause | First fix to try |
|---|---|---|
| Critical error or white screen | Plugin or theme fatal error | Recovery mode link or rename plugin folder |
| Database connection error | Wrong credentials or database server issue | Check wp-config.php, then contact host |
| Stuck in maintenance mode | Interrupted update | Delete the .maintenance file |
| 500 Internal Server Error | .htaccess, plugin or PHP limits | Regenerate .htaccess, check logs |
| Too many redirects | URL or SSL setting conflict | Align site URLs and SSL settings |
| 404 on inner pages | Rewrite rules | Resave permalinks |
| Emails not delivered | Unauthenticated sending | SMTP service and DNS records |
Preventing errors in the first place
Most of these problems become rare with a few habits: test updates on staging, keep the plugin list lean, avoid editing theme files directly, keep PHP current, monitor uptime and error logs, and hold regular off-site backups. When errors do occur, a recent backup and a record of recent changes shorten the fix considerably.
Frequently asked questions
Can I fix common WordPress errors without a developer?
Many can be fixed by a confident site owner with hosting access: resaving permalinks, clearing caches, deleting a leftover .maintenance file or deactivating a plugin through the file manager. Errors involving the database, server configuration or custom code carry more risk. If you are unsure, take a backup first and ask your host or developer.
Will fixing an error delete my content?
Most fixes, such as deactivating a plugin, resaving permalinks or clearing caches, do not touch your content. Restoring a backup can remove content created after that backup was taken, and database repairs carry some risk. Always take a fresh backup before making changes, so you can return to the current state if needed.
Why does the same WordPress error keep coming back?
Recurring errors usually mean the underlying cause has not been fixed. Raising a memory limit hides a plugin using too much memory, and clearing caches hides a configuration conflict. Check the error logs, identify the specific plugin, process or setting involved, and resolve that. Repeated server errors may also indicate your hosting plan no longer fits your traffic.
Calm, methodical fixes
Common WordPress errors are rarely as serious as they first appear. With a backup, access to your hosting tools and a clear understanding of what each message means, most can be resolved quickly and safely, and prevented from returning.
If your site is showing an error you cannot resolve, or the same problems keep recurring, we would be glad to take a look and talk it through.