40 Common WordPress Errors and How to Fix Them
Despite appearances, WordPress is a complicated application that has more than a few requirements to run smoothly. Add the dozens of themes and plugins that some websites use, and you suddenly end up with an extremely complex environment.
Many components must work in unison for your website to stay online, which is a top priority for you. That’s especially true when you run a commercial project – every minute of downtime equals lost revenue.
That’s why trying to fix a crashed website can be so frustrating. You’re usually in a hurry to get it back up as quickly as possible, but the troubleshooting process sometimes takes too long, and although you see an error message, you’re often not sure what it’s meant to tell you. Today, we’ll have a look at 40 of the most common errors WordPress users encounter, and we’ll give you a rundown of what each of them means and how it can be fixed.
Table of Contents:
1. 500 Internal Server Error
It’s one of the most common errors you can encounter and, coincidentally, also one of the most frustrating ones to troubleshoot. The server displays a 500 error when it knows something is wrong but unsure what the exact problem is. The potential causes range from stale browser cache to hardware failure.
Nevertheless, if your website returns an Internal Server Error message, and you’re sure the problem doesn’t lie within your browser or your host, you could try raising the memory limit by editing the wp-config.php file or modifying the php.ini configuration.
You might also be dealing with a corrupt .htaccess file, so restoring it could also be the way out. Try deactivating your plugins to see if any of them is causing the issues. If they aren’t – refresh the files in the wp-admin and wp-includes folders by copying them from a fresh WordPress installation.
2. 502 Bad Gateway
This is another relatively common error that is a bit tricky to troubleshoot. Typically, it indicates the server is taking too long to respond to a user request. The reasons could be several. You could be looking at a temporary traffic spike or a malicious attack that puts too much pressure on the server. If that’s the case, the error should disappear after a while. If the issue is coming from the server, your host’s support team should be aware of it.
If it’s not, the reason could be a poorly coded plugin or theme, so you might want to take a look at them as well. Those of you who use a CDN (Content Delivery Network) service might want to check with their provider and ensure everything is working on their end.
3. 503 Service Unavailable
The 503 error indicates an unresponsive script. As with Bad Gateway errors, this one is triggered when a server is experiencing unusual levels of traffic and increased load. If the error doesn’t disappear after a while and your host’s support team confirmed everything is fine on their end, you need to check on your plugins. Switching back to the default theme is another way to fix the issue.
4. 504 Gateway Timeout
The 504 Gateway Timeout error appears when a request is processed through a proxy and fails to reach the hosting server. It could be caused by a temporary server glitch, but could also be due to other problems, both on your home network and outside it.
First, you need to determine whether you are the only one seeing the error message or the site is inaccessible for everyone. If the site is live, but you can’t load it, you can try disabling any proxy or firewall you have active.
If the site is inaccessible for everyone, your first task should be to check the installed application and server firewall configuration. Try to disable them to see if this will fix the issue. If it doesn’t – you might want to clean up the website database and have a closer look at the installed plugins and themes.
5. Cloudflare 521 Error
You can encounter the 521 error only on websites that have activated the Cloudflare CDN service. In such cases, every single request made to the website passes through Cloudflare. So, if the CDN fails to connect to the hosting server, it displays a 521 error.
A technical problem with the server is the most obvious culprit, but sometimes, fixing the issue is a matter of whitelisting all Cloudflare IPs in the server firewall.
6. 403 Forbidden
403 is a standard HTTP status code. When displayed, it’s often followed by a message informing the user they are denied access to the page they’re trying to reach. If you haven’t set the restriction yourself, this could be caused by incorrect file permissions. The problem can be rectified quickly, either via an FTP client or through the host’s control panel.
Occasionally, the culprit is a corrupted .htaccess file or a security WordPress plugin that has blocked your IP (or IP range).
7. 404 File Not Found
It’s undoubtedly the most common error. We have all seen it at least once while browsing the web. In most cases, it’s caused by a broken link, but could also be triggered by a corrupted .htaccess file.
To fix it, use an FTP client or a file manager to navigate to your .htaccess file and rename it. Then, log into your WordPress dashboard, go to your Permalinks settings, and click Save Changes without making any changes.
This will create a brand new .htaccess file and should fix the 404 error. Bear in mind, however, the new file won’t include any of your own rewrite rules, so you’ll either want to copy them from the old .htaccess, or you’ll need to reconfigure some of your plugins.
8. 429 Too Many Requests
The 429 HTTP status code is designed to protect your server against DDoS attacks. The server uses it when it identifies a large number of simultaneous requests coming from a single place. Instead of processing them, it simply responds with an error message while keeping the load at bay.
A 429 error could also appear if your WordPress website uses a poorly coded plugin that fires a large number of requests to the server. If you suspect this may be the case, try identifying the problematic plugin and check if additional configuration or an update might solve the issue.
If the server isn’t configured correctly, you might also be seeing 429 errors in the Google Search Console. In such cases, get in touch with your host and see if they can make changes to the configuration to avoid these error messages.
9. 413 Request Entry Too Large
You are most likely to see this error message when you’re trying to upload a file that exceeds the size limits imposed by your hosting provider. Usually, this happens when you’re trying to install a plugin or a theme. However, you can see a similar error while uploading large images or videos to the media library.
You can modify the upload size limits through .htaccess, php.ini, or via the functions.php fil to eliminate the error. However, an easier option is to upload the file or install the plugin via your FTP client.
10. 400 Bad Requests
The server responds with a 400 Bad Request error message when it believes there’s a client problem but can’t pinpoint the exact issue. The good news is that in all likelihood, the problem is only on your end and the website is accessible for the rest of the world.
The first thing you can try is to double-check the URL for invalid characters and delete the browser’s cache and cookies. Flushing the local DNS cache might also help. Occasionally, the error might also appear while you’re trying to upload a file that exceeds the server’s maximum upload file limits. In such case, you can either raise the limits on the server (on VPS and Dedicated hosting) or upload the file via FTP.
11. White Screen of Death
This is not so much an error as the way WordPress behaves when a PHP script exceeds the memory usage limit set by your hosting provider. When that happens, WP usually kills the script, and, instead of displaying an error message, it simply puts up a blank page.
The script that exceeds the memory usage most likely belongs to a plugin or theme. If you want to continue using the add-on, you’ll need to either edit the wp-config.php or php.ini and raise the memory usage limit to either 256MB or 512MB. If that doesn’t work, you’ll need to identify the plugin that is causing the error and consider potential alternatives.
12. Memory Exhausted
Occasionally, WordPress displays an error when it’s processing a script that consumes too much memory. It can even tell you which file is causing the issue, so you can easily identify the problematic plugin or theme.
Your options are pretty much the same. You can try and increase the memory limit, and, if that doesn’t work, deactivate the plugin to bring your website back up while you look for an alternative.
13. WordPress Email Issues
Quite a few users complain about problems with WordPress and emails. Contact forms don’t always work as expected, notifications sent to the admin address are not delivered reliably, the issues are more than a few.
Several things could help you prevent such problems. You should first make sure you are not using an email address associated with your domain as the WordPress admin email. If you are and there’s a problem with your hosting account – the email service will likely be affected as well. Using an email address from a public email provider is your best bet here.
As for the contact forms, you are probably utilizing a plugin, so that’s the first place to check. If you’re sure the plugin is working properly, the issue may lie with the server configuration. Note that some hosting providers don’t configure their hardware to work with the PHP mail() function, which breaks the functionality of contact form plugins.
14. The Site Is Experiencing Technical Difficulties
With WordPress 5.2 onward, the developers introduced a feature that can notify you when there’s a problem with your website. Usually, the site’s front-end shows an error that says: “The site is experiencing technical difficulties.” When you try to access the WordPress dashboard, you’ll see a message urging you to check the admin email address of your account, which once again shows how important it is to have access to it.
Usually, the issues that trigger such error revolve around conflicting plugins or scripts that exceed the memory usage limit. In most cases, the email notification pinpoints the issue and gives you clear instructions on what you need to do to resolve it.
15. Error Establishing a Database Connection
As the name suggests, WordPress displays this error when it’s unable to connect to its database. The reasons for this could be several, and you should start ruling out the possibilities. Contact your hosting provider first and confirm if everything runs smoothly on their end.
If the issue wasn’t caused by an outage, you’ll need to open the wp-config.php file and take a closer look at the database credentials inside. Check the username, password, and hostname. If they are correct, you can attempt to fix the issue by activating and running WordPress’s own database repair tool. Make sure you have a backup of your database before you do, though.
16. Maximum Execution Time Exceeded
To prevent the abuse of server resources, most hosting providers impose a limit on the period during which a PHP script can run. Typically, the limit is set between 30 and 60 seconds, and if a script doesn’t complete the task within that timeframe, it gets terminated.
You can increase this limit either through the .htaccess file or through the max_execution_time directive in the php.ini file. Bear in mind that having scripts that take too long to execute can affect the overall speed of your website.
17. Are You Sure You Want to Do This
When you first see a message saying, “Are you sure you want to do this?” you might not think that something is wrong with your website. But when you realize you have no other option than clicking the “Please try again” link, you’ll quickly figure out this is actually an error.
Unfortunately, finding out what has caused that might not be particularly easy. In the best-case scenario, the culprit is a poorly coded plugin or theme that is failing to go through the nonce verification process – a security mechanism that protects key WordPress functions.
By deactivating your plugins and themes one by one and checking whether this has any effect on the error, you should be able to identify the damaging add-on. If the problem isn’t there, you might need to replace all WordPress core files with fresh ones, which is a pretty major job and should only be tackled if you’re experienced enough with the software.
18. Briefly Unavailable for Scheduled Maintenance
If you try to access your website and see a message that you didn’t put there, you might be worried that someone has hacked into your account. This is not the case with the “Briefly unavailable for scheduled maintenance” warning. It’s automatically generated and placed on your website during an update of the WordPress core or a certain plugin. The message is stored in a temporary file called .maintenance that is placed in the document root folder of your website.
Usually, WordPress automatically removes the .maintenance file once the installation of the new version is over. Occasionally, the script timeouts, so the update remains unfinished. Manually deleting the .maintenance file will remove the message, but beware of further breaking your WP website.
You first need to determine which update failed. If it was a plugin – you should be able to restart the process from the WordPress dashboard. If the update of the CMS core failed, however, you might need to re-do the update manually.
19. Syntax Error
Those who don’t spend too much time experimenting with their website are unlikely to see this message. It usually appears when you’ve edited a PHP file and have added additional code. The internet is full of resources and tips on how to improve the functionality of WordPress and its themes and plugins.
Developers share lines of code that can be added to certain files and change the website’s behavior or functionalities. You can usually just copy-paste this code and everything works well. But if you fail to select even a bracket – the whole website could break.
That’s when syntax errors appear. Thankfully, WordPress helpfully points out in which file and on which line it has encountered the issue. You can try to figure out what’s missing, and if you feel you can’t fix it – you can just remove the code you’ve added to let WordPress run in its default state.
20. Getting Locked Out of the WordPress Dashboard
If you’re unable to log into your WordPress dashboard, you have effectively lost control over your website. It can happen, if WordPress is unable to establish a connection to the database or a poorly coded plugin is triggering a White Screen of Death. Most of the times, however, it’s because your password credentials were lost or stolen.
If that’s the case, WordPress has a helpful password reset utility that will send a link to help you assign a new admin password. The link will arrive at the admin email address assigned in WordPress, which is why it’s always good to use a third-party mailbox here. If you are utilizing an email from, your only hope of regaining control over your website is to manually reset the password directly from the wp_users database table using phpMyAdmin.
21. WordPress Keeps Logging Me Out
Getting logged out of your WordPress dashboard can be rather annoying, but fortunately, it’s often associated with browser cookies, so clearing site data could be enough to resolve the problem. If that’s not the reason here, there is one more thing to check.
If you still have access to the WordPress dashboard, you need to go to Settings > General and ensure the address in the WordPress Address and Site Address fields match. Sometimes, people put www before the domain in one of the fields, but not in the other, which confuses WordPress and causes the logout.
If you have already been logged out and can’t log back in, you’ll need to open the wp-config.php file and add the following lines:
Don’t forget to replace “example.com” with your domain and omit the “www.” if you want to use the shorter version of the domain.
22. WordPress’s Login Page Keeps Refreshing
Even if you have the correct password, you still might find yourself locked out of the WordPress dashboard. Website owners occasionally enter the correct login details, but the page simply refreshes and asks them for their username and password again.
Thankfully, this usually happens because WordPress has failed to correctly set a cookie in the user’s browser. Clearing the cache and cookies from your browser often resolves the problem.
If it doesn’t, you need to open the wp-config.php file and see if the WP_HOME and WP_SITEURL lines are available and correctly set. If they are – your final choice would be to back up your .htaccess file locally, delete it from the server, and then try loggging in again. If that helps, all you need to do is create a new .htaccess file by logging into the WordPress dashboard, going to Settings > Permalinks, and clicking Save Changes.
23. Could Not Save Password Reset Key to Database
You have forgotten your WordPress admin password, but you’re probably not worried because you have access to the admin email to easily reset it. Instead of sending the link and letting you choose a new password, however, WordPress might tell you it’s unable to save the password reset key in the database.
Fortunately, the reason is usually pretty simple – the disk storage limit on your account has been reached, and WordPress can’t add the key to the database. All you need to do is free up some space.
Usually, the best place to start is looking for large old unwanted files that can be safely removed. Clearing the cache if you’re using a caching plugin, should also solve the problem, though the error itself should be a warning light that you may be outgrowing your hosting plan.
24. The Add Media Button Doesn’t Work
WordPress is renowned for its easy-to-use interface, and throughout the years, the Add Media button was a major part of the simplicity when publishing content. Although WordPress has now switched to a new editor, quite a few users continue to use the old interface. Strange thing is they sometimes see the Add Media button disappear, seemingly without any reason.
WP experts have investigated the issue and figured out it’s usually caused by a conflict between third-party plugin code and the core WordPress features. A simple modification of the wp-config.php file will ensure that the Add Media button will be available all the time.
You need to open the file and add the following line:
define(‘CONCATENATE_SCRIPTS’, false );
Bear in mind, however, that a buggy plugin is at the bottom of the whole problem, so it would probably continue causing issues. You should also ensure you always use the latest WordPress version.
25. HTTP Error While Uploading Images
WordPress sometimes returns a rather generic error while you’re trying to upload images to the media library. It simply says “HTTP error” without giving you any indication of what might be going on. This is because WordPress isn’t sure what is causing it, which means you have some troubleshooting to do.
Oftentimes, this is just a temporary glitch caused by a traffic spike, and all you need to do to continue is try again. If it doesn’t fix itself after a few attempts, you might want to try increasing the memory usage limit via the wp-config.php file or through the php.ini configuration. If the problem persists – you can change the PHP module that handles image files.
WordPress uses two modules, called GD Library and Imagick. The first one is reportedly less likely to run into memory usage issues. Bear in mind, though, that switching these modules requires a modification of the theme’s functions.php and should only be tackled if you have previous technical experience.
26. Failed to Write File to Disk
If WordPress tells you it can’t save the files you’re trying to upload, the file/folder permissions are most likely set incorrectly. Fixing the issue is fairly straightforward with the help of an FTP client or your host’s file manager.
The folder you need to pay attention to is wp-content, located in the website’s document root directory. You need to ensure that wp-content and all its subfolders are set with 755 permissions for Read/Write/Execute. The permissions for the files inside wp-content, on the other hand, must be set at 644. WordPress should have no problems storing the files you’re trying to upload after you save the correct permission settings.
27. Image Upload Problem
This is yet another problem that could be caused by incorrect file permissions. Changes to the file permissions could be triggered by a number of factors, including a reconfiguration of the server your site is hosted on and updates to some of the underlying software. If the file permissions are changed, you likely won’t be able to upload new files through the WordPress dashboard. You will see empty placeholder boxes in place of the images in your library
To fix the issue, you need to set the folder permissions for wp-content and all its subfolders to 755 and the file permissions for all the files inside them to 644. After you’ve done that, you can also contact your hosting support team to figure out what might have caused the change and whether anything could be done to prevent this from happening in the future.
28. Sorry, This File Type Is not Permitted for Security Reasons
The reason behind this error should be pretty clear. To prevent hackers from using WordPress-based websites for spreading malware, the content management system will only let you upload documents, images, and media files through the WordPress dashboard.
If you need to upload other types of files through the web-based interface, you can add the following line to the wp-config.php file:
An easier option, however, would be to use an FTP client like Filezilla and CuteFTP.
29. Installation Failed: Could Not Create Directory
After years of updates and optimizations, the process of installing themes and plugins is now pretty much completely automated. WordPress creates the necessary folders and directories by itself, and places all the necessary files inside.
This is only possible, however, if it has the required permissions. If the permissions are not set correctly – WordPress will display an error.
To ensure all plugin and theme updates and installations go without a hitch, you must ensure the permissions for wp-admin, wp-content, and wp-includes and all the subfolders are set to 755. For the files inside these directories, the correct permissions are 644.
30. Destination Folder Already Exists
This error occurs when you’re trying to install a theme or a plugin. It’s pretty self-explanatory. When it tries to create a new folder named after the theme or plugin you’re trying to install, WordPress sees a folder with the name already exists and stops the process.
This might mean you’ve already installed the plugin or theme but have forgotten about it. Double-check to see if it’s available in your WordPress dashboard. If it is not there, the folder may be a leftover from a previous installation or uninstallation process.
Use your FTP client to check what’s inside the folder, and if you find nothing of value – delete it. You can then restart the installation process.
31. The Link You Followed Has Expired
One of the frustrating things about this error is it’s a bit misleading. It’s usually triggered while you’re trying to upload a theme or plugin through the WordPress dashboard. It’s caused by the fact the ZIP archive you’re trying to upload is too big or is taking too long to install.
The best way to solve the problem is to increase the maximum upload size limit, the maximum size of the post data limit, and the execution time limit. You can do that by editing the upload_max_filesize, post_max_size, and max_execution_time directives in the php.ini configuration.
32. Missing a Temporary Folder
When you upload a file through the WordPress dashboard, the CMS first places it in a temporary folder before moving it to the intended location. Normally, the process is completely automated, but occasionally, WordPress might be unable to find the temporary folder.
Fixing the issue is a matter of editing the wp-config.php file.
The line you need to add is:
define(‘WP_TEMP_DIR’, dirname(__file__). ‘/wp-content/temp/’);
Having done that, you simply need to make sure the /wp-content/temp/ folder exists.
33. Stylesheet is Missing
Your WordPress theme is a collection of files that determine the look of your website. One of these files is called style.css, and it contains all sorts of important information regarding the way links, menus, buttons, and other components of your website appear. If this stylesheet is missing, WordPress won’t know how to render your website, and will alert you about it.
The error message might be displayed during your theme installation or at a later stage. The only way to resolve the issue is to double-check if the style.css file is in its proper place.
You can do that by downloading a fresh copy of your chosen theme, extracting the file from the ZIP archive, and uploading it to the theme’s folder in wp-content/themes. If you’re struggling with this, the theme developer or your host’s support team should be able to help you out.
34. Redirect Issues
The error messages here might differ, but they all suggest the same thing – the browser has found itself in a redirect loop while trying to access your website. This could be down to one of several things.
First, you need to check the configuration of your hosting account. Most hosts let you choose whether or not you want your site to load with the “www” prefix. If you decide to have it, you must configure the settings in the WordPress dashboard as well.
Go to Settings > General and ensure that you have the correct URLs in the WordPress Address and Site Address fields. This will stop the browser from going into a redirect loop every time it tries to access your website. If you have no access to the WordPress dashboard, you’ll need to make these changes via the wp-config.php file.
If the configuration is correct, try deactivating your plugins one by one to see if any of them is causing issues.
If that doesn’t work as well, restoring the .htaccess file might resolve the problem.
35. PHP Errors
There are two types of errors. The fatal ones prevent users from accessing your website completely. Some warnings and errors don’t bring the entire website down but indicate potential bugs and problems with the code.
You have most likely seen PHP errors on a website, and you know how they can ruin the entire user experience. That’s why you probably want to hide them.
In WordPress, you can do this with a small modification of the wp-config.php file. If you open it, you’ll see a line that says either “define(‘WP_DEBUG’, true);” or “define(‘WP_DEBUG’, false);“.
You need to replace this line with the following:
- ini_set (‘display_errors’,’Off’)
- ini_set (‘error_reporting’, E_ALL )
- define (‘WP_DEBUG’, false)
- define (‘WP_DEBUG_DISPLAY’, false)
After you save the wp-config.php file, your visitors won’t see any errors, but ideally, you’ll want to have a staging environment where you (or your developer) can see the PHP bugs and warnings. This way, you’ll be able to remove them and prevent further issues from appearing in the future.
36. Mixed Content Errors
If you don’t have an SSL certificate installed on your website, browsers will display “Not Secure” warnings in the address bar, which will make users reluctant to interact with your business. An SSL certificate that is installed but not configured properly could also cause problems.
Among them is the Mixed Content error that appears when some of your website components are delivered via HTTPS, but others go through a regular, unencrypted HTTP connection. In such cases, browsers will still display warnings despite the fact you have a valid SSL certificate.
The unencrypted components are listed in the console in your browser’s developer tools, and the easiest way to eliminate the issue is with a plugin specially designed for this sort of errors.
37. Failed to Open Stream
This is one of the relatively easy-to-troubleshoot errors, mostly because it usually points out the exact problem. The message is triggered when WordPress is unable to open a file or access a particular asset. It tells you the line and file where it encountered the issue, and also indicates the reason for the failure.
In many cases, the file WordPress tries to access is inaccessible due to wrong permissions, so the fix is usually pretty easy. The file could also be missing or inaccessible due to a corrupted .htaccess.
Alternatively, the issue might be caused by a plugin that can’t access a third-party API. If that’s the case – it’s best you contact the plugin’s author.
38. Missed Schedule
A “Missed Schedule” error appears when WordPress fails to publish a post that has been scheduled for a specific date and time. To understand why this might happen, you first need to know how the scheduling in WordPress works.
WordPress makes periodic checks for scheduled posts and brings up the ones that need to go live. These checks can be done at the server level, with the so-called cron jobs, a UNIX feature that automates periodic tasks.
Because WordPress doesn’t have access to crons in all hosting environments, its default checks rely on a visitor interacting with your website at a specific point in time. If there are no visitors at the required time or the website goes down, the checks won’t run, and the posts won’t be published.
You can fix this by disabling WordPress’s checks altogether through the wp-config.php file and configuring crons through your hosting provider’s control panel. Bear in mind, though, the task is not exactly novice-friendly and requires some knowledge in UNIX commands. If you don’t feel like tackling this particular job, you’re better off simply using a scheduling plugin that makes more reliable WordPress checks.
39. Update Errors
We all know how important installing all the latest updates is from a security standpoint. This statement is valid for any piece of software, but when it comes to WordPress, new versions can sometimes mean trouble.
In addition to new security patches, CMS updates sometimes introduce changes to the core that end up being incompatible with some of your plugins and themes. As a result, instead of ensuring a more stable performance, an update can break your website.
By default, WordPress automatically installs all minor updates the core development team releases. You can change this behavior through the wp-config.php file, but it’s best you leave it in the default state.
The majority of changes that end up breaking your website usually come out with new major releases. They are not automatically applied by default, and you might want to ensure that everything works fine before installing them on a live website.
Ideally, you’ll have a staging environment where you’ll be able to test the update before you apply it to your WordPress website. Even if you’ve tested it, creating a backup before you initiate the update is still advisable, as it will give you the chance to revert the changes if you find out that something’s wrong.
40. Site Ahead Contains Harmful Programs
This is perhaps the worst possible error to have on your website. It means that someone has hacked into your page and is now using it to distribute malware. Google’s Safe Browsing service has spotted the problem and is now trying to protect users by not giving them direct access to your website.
Rectifying this issue as quickly as possible is absolutely essential. You need to clean the website to not only stop the ongoing cyberattack but to also minimize the potential reputation and SEO damage.
Unfortunately, doing it is often easier said than done.
A complete scan of your entire website is needed to identify the malicious code and removing it. You also need to find the backdoor the hackers used to get in and ensure it won’t be exploitable in the future.
Only after that, you can ask Google to review your website again. If the search engine giant is happy with the state of your website, it will remove the warning.
The errors you see above are just a tiny portion of the challenges you may face while trying to keep your website on the road. WordPress has definitely eased the process to a large extent, but the fact remains that a modern website is a complex mechanism, and inevitably, things do go wrong sometimes. Thankfully, the internet is full of resources and helpful communities who can get you out of most situations.