A WordPress error looks alarming, but almost every one has a known cause and a known fix. This guide explains the errors beginners meet most often, what each one means in plain language, and the exact steps to fix it, starting with the safest and simplest.
Sooner or later every WordPress site shows an error. A white screen where your homepage used to be. A message about a database connection. A login page that keeps sending you back to itself.
The good news is that these problems are rarely as serious as they look. Your posts are almost never lost. In most cases the cause is one of four things: a plugin, a theme, a setting or a limit on your hosting account.
This guide gives you a method that works for nearly any error, followed by the specific fixes for the ones you are most likely to see.
Key takeaways
- Take a backup before you change anything, and change one thing at a time.
- Most errors come from a plugin or theme conflict. Deactivating plugins is the fastest test.
- The real cause is usually written in an error log. Learn where to find it and you stop guessing.
- Many problems are fixed by simple steps: clearing caches, saving permalinks again or raising the memory limit.
- If you cannot reach your dashboard, you can still manage plugins through your host’s file manager.
- Your host’s support team can see server logs that you cannot. Ask them early.
Before you fix anything: three safety rules
A rushed fix can turn a small problem into a big one. Follow these rules every time.
- Take a backup first. Use your backup plugin or your host’s backup tool. If the dashboard is not reachable, your hosting control panel can usually create one.
- Change one thing at a time. After each change, reload the site. If you change five things at once and the error goes away, you will not know which one fixed it.
- Write down what you changed. A short note makes it easy to undo a step, and to explain the situation to support if you need help.
Where possible, test fixes on a staging copy of your site. Many hosts provide one-click staging for exactly this.
A method that solves most errors
Before the specific fixes, here is the general routine. It finds the cause of most WordPress problems.
Clear every cache
Sometimes the problem is already fixed and you are looking at an old copy of the page. Clear your browser cache, or open the site in a private window. Then clear your caching plugin’s cache, and any cache provided by your host or CDN.
Check whether a plugin is the cause
Deactivate all your plugins. If the error disappears, a plugin was responsible. Switch them back on one at a time, reloading the site after each, until the error returns. The last plugin you activated is the cause.
If you cannot reach the dashboard, open your host’s file manager, or connect by FTP, and go to the wp-content folder. Rename the plugins folder to something like plugins-off. WordPress will deactivate every plugin. Rename the folder back to plugins afterwards, and then rename the individual plugin folders inside it one by one to find the culprit.
Check whether the theme is the cause
Switch to a default WordPress theme, such as one of the Twenty Twenty themes. If the error goes away, the problem is in your theme. Without dashboard access, rename your active theme’s folder inside wp-content/themes. WordPress will fall back to a default theme if one is installed.
Read the error log
Guessing is slow. The log tells you which file caused the problem. You have three places to look:
- The recovery email. When WordPress catches a fatal error, it emails the site administrator with the name of the plugin or theme responsible and a link to a special recovery mode.
- The WordPress debug log. Adding two lines to your wp-config.php file switches on logging and writes errors to a file named debug.log inside wp-content. WordPress explains the exact lines in its official documentation on debugging. Switch debugging off again when you have finished.
- Your host’s error log. Most hosting control panels have an “Errors” or “Logs” section.
A log line usually names a file path. If that path contains /plugins/some-plugin-name/, you have found your culprit.
Pro tip
The free Health Check and Troubleshooting plugin, made by the WordPress community, has a troubleshooting mode. It switches off all plugins and uses a default theme only for you, while visitors continue to see the normal site. It is the safest way to test for conflicts on a live blog.
The most common errors and how to fix them
Use this table to jump to the likely cause, then read the matching section.
| What you see | Most likely cause | First thing to try |
|---|---|---|
| A blank white page | Plugin or theme error, or memory limit | Deactivate plugins |
| “There has been a critical error on this website” | Fatal PHP error in a plugin or theme | Check the recovery email |
| “Error establishing a database connection” | Wrong database details, or the database server is down | Check wp-config.php, contact your host |
| 500 Internal Server Error | Corrupt .htaccess file, plugin or memory limit | Regenerate .htaccess |
| Posts show “404 Not Found” | Broken permalink rules | Save permalinks again |
| “Briefly unavailable for scheduled maintenance” | An update was interrupted | Delete the .maintenance file |
| “Allowed memory size exhausted” | PHP memory limit too low | Raise the memory limit |
| “Too many redirects” | Wrong site address or HTTPS settings | Check the site URLs |
| Kept at the login screen | Cookies, plugin conflict or wrong site address | Clear cookies, deactivate plugins |
| Image upload fails | File too large, memory or permissions | Resize the image, check limits |
The white screen of death
You open your site and see a completely blank page, with no message at all. This usually means PHP hit a fatal error, or ran out of memory, and error display is switched off.
- Check whether only the front of the site or also the dashboard is affected. That tells you how far the problem reaches.
- Look for the recovery email from WordPress and use its link to log in.
- Deactivate all plugins, using the folder-rename method if needed.
- Switch to a default theme.
- Raise the PHP memory limit, as described further down.
- Switch on the debug log to see the exact error.
“There has been a critical error on this website”
This is the modern, friendlier version of the white screen. WordPress has caught a fatal error and paused the code that caused it.
Check the inbox of your admin email address for a message with the subject “Your Site is Experiencing a Technical Issue”. It names the plugin or theme at fault and gives you a recovery mode link. In recovery mode you can log in and deactivate or update the broken item. If no email arrives, use the general method above.
This error commonly appears straight after an update, or after pasting a code snippet into your theme’s functions.php file. If you had just added a snippet, remove it using your host’s file manager.
“Error establishing a database connection”
WordPress stores your posts and settings in a database. This message means it could not connect to it.
- Check your database details. Open wp-config.php and confirm that the database name, username, password and host match what your hosting control panel shows. This is the usual cause after moving a site.
- Ask your host whether the database server is up. On shared hosting, the server can be overloaded or briefly offline. If both the front of the site and the dashboard show the same error, this is likely.
- Repair the database. If the dashboard shows a different message about tables being unavailable, the database may need repairing. WordPress has a built-in repair tool, and your host can run it for you.
Your content is almost certainly still there. The site simply cannot reach it at the moment.
500 Internal Server Error
This is a general message from the server that something went wrong, without saying what. In WordPress, three causes are most common.
- A corrupt .htaccess file. Using your file manager, rename .htaccess in your site’s main folder to .htaccess-old. Reload the site. If it works, go to Settings and then Permalinks, and click Save Changes to create a fresh file.
- A plugin or theme. Run the deactivate and reactivate test.
- The PHP memory limit. Raise it and try again.
If none of these help, ask your host to check the server error log. It will contain the specific reason.
404 errors on posts and pages
Your homepage loads, but every post shows “Page not found”. The posts have not been deleted. The rules that turn your tidy addresses into the right pages have been lost.
Go to Settings and then Permalinks, and click Save Changes without changing anything. This rewrites the rules and fixes the problem in most cases. If it does not, your .htaccess file may not be writable, and your host can correct the permissions.
A 404 on a single page is different. It usually means the address has changed or the page was deleted. Set up a redirect from the old address to the new one.
Stuck in maintenance mode
During updates, WordPress shows visitors the message “Briefly unavailable for scheduled maintenance. Check back in a minute.” If an update is interrupted, for example because you closed the tab, the message can stay.
Open your site’s main folder in the file manager and delete the file named .maintenance. It is a hidden file, so you may need to switch on “show hidden files”. Then run the update again, one item at a time.
Memory exhausted
The message looks like “Fatal error: Allowed memory size of … bytes exhausted”. WordPress asked for more memory than PHP allows.
You can raise the limit by adding a line that defines WP_MEMORY_LIMIT to wp-config.php, above the line that says “That’s all, stop editing”. Many hosts also let you change the PHP memory limit in the control panel. If the error keeps coming back, a plugin is probably using far more memory than it should, and raising the limit only hides that. Find out which plugin it is.
Too many redirects
Your browser shows “ERR_TOO_MANY_REDIRECTS”, or says the page is not redirecting properly. The site is sending the browser round in a circle.
- Clear your browser cookies for the site and try again.
- Check your site addresses. Under Settings and then General, the WordPress Address and Site Address must match, including https and whether “www” is used.
- Check your SSL settings. A common cause is a clash between your host, a CDN and a plugin that are all trying to force HTTPS in different ways. If you use a CDN with an SSL mode setting, make sure it suits how your server is set up.
- Deactivate redirect and caching plugins temporarily to see whether one of them is responsible.
The login page keeps reloading
You enter the correct password, and WordPress returns you to the login screen without an error.
- Clear your browser’s cookies and cache, or try another browser.
- Deactivate plugins using the folder-rename method. Security and caching plugins are the usual suspects.
- Switch to a default theme by renaming your theme’s folder.
- Check that the site addresses are correct. If you cannot reach the dashboard, they can be set in wp-config.php.
- Rename the .htaccess file and try again.
Image upload errors
Uploading a picture fails with a vague “HTTP error”, or a message that the file exceeds the maximum upload size.
- Make the image smaller. A photo straight from a phone is far larger than a blog needs. Resize and compress it first.
- Rename the file. Remove apostrophes, accents and other special characters from the file name.
- Try again after a minute. The error is sometimes a brief shortage of server resources.
- Check the limits. The maximum upload size is shown on the Media upload screen. Your host can raise it.
- Check folder permissions. If WordPress says it cannot create a directory, the uploads folder is not writable. Ask your host to correct its permissions.
403, 502, 503 and 504 errors
These come from the server, not from WordPress itself.
| Code | Meaning | What to do |
|---|---|---|
| 403 Forbidden | The server is refusing access | Deactivate security plugins, regenerate .htaccess, ask your host about file permissions and firewall rules |
| 502 Bad Gateway | One server received a bad response from another | Wait a minute and reload, clear caches, pause your CDN, contact your host |
| 503 Service Unavailable | The server is overloaded or under maintenance | Deactivate plugins, check for traffic spikes, contact your host |
| 504 Gateway Timeout | The server took too long to respond | Reload later, check for slow plugins, contact your host |
If these happen often, your hosting plan may be too small for your site, or the server may be poorly configured. My comparison of the best hosting for a new blog explains what to look for in a host.
“Sorry, you are not allowed to access this page”
Your account has lost the permissions it needs, or a plugin is blocking the screen. Check that your user still has the Administrator role, deactivate plugins, and make sure you are running a supported PHP version. If your role has been changed and you cannot change it back, your host can help you restore it through the database.
Mixed content warnings
After moving to HTTPS, the padlock is missing, or the browser says parts of the page are not secure. Some images, scripts or styles are still loaded from addresses starting with http.
Make sure both site addresses under Settings, then General, use https. Then update the old links in your content. A search and replace plugin can change every old http address of your own domain to https in one go. Take a backup before you run it.
How to prevent most errors
Fixing errors is useful. Avoiding them is better. A few habits remove most of the risk.
- Keep automatic, off-site backups, and know how to restore one.
- Update plugins one at a time, not all at once, so you know which one caused a problem.
- Test big updates and new plugins on a staging site first.
- Install only the plugins you need, from trusted sources, and delete the ones you do not use.
- Never paste code into your site that you do not understand. If you must add a snippet, use a code snippets plugin, not the theme files.
- Stay on a supported PHP version.
- Look at Tools, then Site Health, once a month. It flags problems before they become errors.
A lean site is also a more stable one. If yours has grown heavy over time, my guide to speeding up WordPress shows you how to trim it.
When to ask for help
Contact your host’s support team when:
- The error mentions the server, the database or permissions.
- You see 500, 502, 503 or 504 errors that you cannot trace to a plugin.
- You cannot reach either the dashboard or the file manager.
- You suspect the site has been hacked.
Give them the exact error message, the time it started, what you changed just before, and the steps you have already tried. Good information gets you a fast answer.
Watch out
Never give your WordPress password to someone who contacts you offering to fix your site, and do not paste commands or code from strangers. Real support staff work through your hosting account and will not ask for your admin password by email or chat.
Setting up a new WordPress site?
Starting with the right foundations avoids many of these errors later.
Frequently asked questions
Will I lose my posts when I see a WordPress error?
Almost never. Your posts are stored in the database, and most errors are caused by code in a plugin or theme, or by a setting. Fixing the cause brings the site back with the content intact. Keeping regular backups protects you in the rare cases where data is damaged.
Why does my site break after an update?
An update can introduce a conflict between a plugin, your theme and your version of WordPress or PHP. Deactivate the item you just updated to confirm it is the cause, then look for a newer version, contact the developer or restore your backup.
How do I fix WordPress if I cannot log in to the dashboard?
Use your hosting control panel’s file manager or an FTP program. From there you can rename the plugins folder to deactivate all plugins, rename your theme’s folder to fall back to a default theme, and rename the .htaccess file. One of these steps usually restores access.
Where can I find the WordPress error log?
There are three places: the recovery email WordPress sends to the admin address, the debug.log file in the wp-content folder once debugging is switched on, and the error log in your hosting control panel.
Is it safe to deactivate all my plugins?
Yes. Deactivating a plugin does not delete its settings or data. When you activate it again, it carries on as before. Some features of your site will be missing while the plugins are off, so do the test quickly or on a staging copy.
When should I restore a backup?
When you cannot find the cause, when the site was working recently and you have a backup from that time, or when the site has been hacked. Remember that anything added after the backup, such as new posts or comments, will need to be added again.

Nayan Dhumal