Cold sweats, screams, and even urges to kill: WordPress errors drive us crazywhile giving us even more trouble than Jack Nicholson in The Shining.
“White Screen of Death (yes, it exists, and it’s not a remake of Jaws), “Database connection error “, or “Error 500 » : they are the nightmare of any webmaster. And believe me, there are still plenty of others ready to give you the nausea.
These mistakes, we pray they never happen. But one fine day, they always end up falling on us.
And there, panic on board. Especially when it’s the first time. If you have ever experienced this great moment of loneliness, you have surely wondered how to solve this pesky problem that has just fallen on your head.
And don’t tell me that you called the fire department or the Samu, that doesn’t count.
To save you sleepless nights, outbursts of violence and other behaviors that are reprehensible by law, WPMarmite presents the most common errors in this article. And, above all, how to fix them thanks to step-by-step tutorials.
We are not going to leave you in the panade!
Originally written in October 2018, this article was last updated in September 2022.
What are the main WordPress errors?
Let’s start with HTTP errors, which mean that a web server failed to send information to a browser.
The HTTP errors are the ones you will encounter most often. They have a number the HTTP codewhich contains 3 digits (ex: 301, 404, 500, etc.).
They are classified into 5 large families:
- Information Codesfor those starting with 1 (ex: 100 and 101);
- Success Codesfor those starting with 2 (ex: 200);
- Redirect codesfor those starting with 3. Among them, you must know the code 301, which designates a permanent redirection (it indicates to Internet users and search engines that content has been moved or permanently deleted);
- Web client error codes (your browser), for those starting with 4. Here, we can for example cite the 404 error, which designates a page not found;
- Server error codes, for those starting with 5. For example, the famous 500 error designates an internal server error. We will come back to this a little later.
Second, we find the PHP errorsthe programming language with which WordPress is written.
PHP errors can occur when you tweak in the code, or during an update made by the developer of a theme or an extension (it’s rather rare, but it can happen).
For example, you may have made syntax errors in your code (omission of parentheses, addition of spaces or characters).
Third, WordPress can also generate database errors. We then speak ofmysql errors (the name of the database management system that WordPress uses).
Now that you have an overview of the types of errors you may encounter, I suggest you discover how to avoid them.
Update and backup your site
It goes without saying, but it is always good to repeat it: update your site regularly. This will not prevent possible errors from occurring, but you will minimize the risks.
Then, before making any adjustments and getting your hands dirty, always remember to back up your site (WordPress files + database).
I repeat: SAU-VE-GAR-DEZ your site.
At least, if a technical problem arises, you can turn around. And it will save you from wanting to throw yourself out the window, or smash your computer screen.
For backup, there are several options, such as:
- UpdraftMore ;
ManageWP (the latter allows you to manage several sites at the same time from a single Dashboard, but it also offers options for backing up your sites).
Discover our test of the 7 best backup plugins.
Choose your extensions and theme carefully
For the rest, only install “safe” plugins and themes. For plugins, give maximum priority to those present in the official directory (which counts 59,638 in total).
To make the right choice, take into account the number of active installations, the rating (number of stars), and reviews. If an extension has very low ratings, has a steady stream of reviews, and hardly gets downloaded, you’ll know there’s something wrong.
If you want to use a plugin that is not in the official directory, be careful. Find out about its quality, for example, based on the history and reputation of its developers.
For themes, the reasoning is much the same. If you want free, there is 9,826 in the official directory. For premium, make sure the seriousness of the goods. Is the theme frequently updated? What about support? Is it bought a lot?
To do your shopping, you can head to ThemeForest (aff link), the largest template sales platform in the world. Or bet directly on the Pro version of a popular theme from the official directory, like the excellent Astra.
Use a test environment
Finally, you can also limit the damage by doing your tests (adding new plugins, a theme, etc.) on a test site.
I am thinking for example of a site of staging (a simulation environment), or a local installation (on your computer). For a local installation, you can use Local or MAMP, for example.
Regarding Local, Alex explains how to configure it in this video:
What Tools Should I Use to Fix WordPress Errors?
Despite all these precautions, it is possible (and probable) that you will one day encounter an error on your site. In this case, do not panic. It happens to everyone.
And then you will see that solving the problem is often not that insurmountable, provided you understand what it is. 😉
But this article is there for that!
To proceed with the repair, you will therefore need a few tools (even if you may not use them all every time, and at the same time):
- a ftp-client (File Transfer Protocol), that is to say a software that allows you to communicate with your server. Personally, I’m used to using FileZilla. But you can also turn to Cyberduck or Transmit.
To connect, you will need the identifiers that are in the welcome email sent to you by your host.
At o2switch (aff link), it looks like this:
- a text editor. Sorry if this scares you, but you’ll probably have to tweak a bit in the code to solve the problem. But you’ll see, no need to know about it to get by.
Are you looking for a text editor? I suggest you Sublime Text, Brackets or Notepad++ ;
- a cPanel, an online manager that administers the entire server. It is available from most hosts: this is the case with o2switch, but not with OVH, which has its own interface. You can access it using the identifiers provided by your host in his welcome email.
Now that you have an overview of WordPress errors, it’s time to tackle the heart of the problem: what are they and, above all, how to solve them.
I will detail 18 of them and explain to you through a detailed tutorial how to deal with them.
1. Error 500 (Internal Server Error): the classic WordPress error
We start with a great classic: WordPress 500 erroralso called Internal Server Error. As the name suggests, this is an internal server error.
It can be caused by several factors, but the most likely is that the file
.htaccess of WordPress has been corrupted.
To know everything about this very important file, I recommend reading this article by Alex.
An HTTP 500 error can, among other things, be encountered when connecting to WordPress, on your page
Find out now how to fix a 500 error in 5 different ways.
Check the .htaccess file
To see if the file
.htaccess is the culprit, just disable it. To do this, connect to your FTP and go to the root directory of your website, where your main domain name is configured.
This location may vary from one host to another. At o2switch, it’s called
public_html. At OVH, you will find it under the name
www. For others it will be
Locate the file
.htaccess and change its name (for example, call it
Try going to your site and if it works, remember to save your permalink structure to your Dashboard, in Settings > Permalinks.
This will generate a new file
.htaccess and everything should be fine.
If that’s not the problem, go to the option below.
Increase the memory allocated to WordPress
An internal server error can also be caused by the fact that the memory allocated by your host is insufficient.
To increase it, it happens in the file
wp-config.php. Open it via your FTP and add the following line of code:
This piece of code increases the RAM allocated to WordPress by the server.
Note that you cannot allocate the memory capacity of your choice, because your host may set a limit (for example, if you put 512M and your host caps it at 256M, you will not have more). In this case, contact him to see what comes out of it.
Disable all your plugins
If the previous solution didn’t work, you can try disabling all your plugins. An incompatibility may be the cause of the failure.
If you have access to the administration of your site, start by disabling the extensions, especially the most suspicious ones (the ones you just installed, configured, or updated).
Meet in Extensions > Installed Extensions.
Then turn them back on one by one and see what happens. If the error reappears as soon as you re-enable a specific extension, you have found the culprit!
If your dashboard is inaccessible, use your FTP and rename the folder
plugins (call it for example
plugins_test). This is in the folder
The path is as follows: wp-content > plugins.
But be careful, don’t stop there. Once the folder is renamed, try viewing your site again.
Like the folder
plugins has changed its name, WordPress will automatically deactivate all plugins.
Then rename it correctly (
plugins therefore), and return to the “Extensions” page of the administration.
Everything will be deactivated, you will even have notifications that will tell you about it.
You can now re-enable your extensions one by one to find the problem one.
Change your theme
It still does not work ? Try changing your theme to the default native theme on every new WordPress install, which starts with “Twenty” (the latest at the time of this writing was Twenty Twenty-Two).
On your Dashboard, go to Appearance > Themes. Activate the theme.
If you can’t find it because you deleted it, click “Add theme”.
You should find it at the top of the next page, under the Featured Themes tab.
Replace the wp-admin and wp-includes folders
Is the error still and always there?
If you answered “yes”, some Core files (Core) of WordPress, i.e. all those present in the installation folder when you download WP, may have been corrupted.
Try replacing folders
wp-includes. For it, download the latest version of WordPress and unzip the archive.
On your FTP, rename the folders
wp-includes_old (it’s faster than deleting them), and send the new ones.
Download the SAME version of WP as the one you already have.
If all of these solutions don’t work, you’re really out of luck. I advise you as a last resort to contact your host to explain your problem.
2. The White Screen of Death (White Screen of Death)
The White Screen of Death. Is this the last horror film at the top of the box office? It could, but it’s mostly the name of a famous WordPress error.
If it chooses to knock on your door, you will quickly understand: as its name suggests, WordPress will display a blank page (yes, all blank, with nothing inside).
Main problem with this error? You have no indication of what is no longer working because no message is displayed.
But you will see, we can treat the evil without sweating too much. Discover some solutions right away.
Test your plugins
This damn White Screen of Death (WSOD, we say like that, in English) may be due to an incompatibility problem between your plugins. To do this, you will have to deactivate them and reactivate them one by one by following the procedure that I gave you just before.
Check that your theme is not guilty
The WSOD can also be caused by your theme, especially if the problem occurred after it was activated.
Disable it on your Dashboard in Appearance > Themes. Then activate a default WordPress theme, Twenty Twenty-Two for example.
If you don’t have access to your Dashboard, go to FTP. Change your theme’s folder name. This forces WordPress to use one of its default themes (those starting with “Twenty”).
The path is as follows: wp-content > themes.
Of course, these themes will have to be present in the file
themes. If you have not previously deleted them on your Dashboard, this will normally be the case.
Is your site back with us? Good game. Otherwise, read on.
Increase the memory allocated to WordPress
If you are still at the bottom of the hole, try increasing the memory allocated to WordPress by following the instructions given above.
Enable WP_DEBUG mode
This solution is much more technical but if you have not found the source of the problem before, you will have to get started.
WordPress debug mode (debug) will list you all WordPress errors, PHP warnings and notifications that occur when your site is loading. As a security measure, it’s better to use it on a test environment (but hey, if your site is broken, you’re no longer around).
To activate it, it happens in the file
Locate the following line:
and replace the value false by true.
The WordPress error(s) will then appear on your page.
Very often, you will see the path of the file(s) causing the problem with the name of the theme or plugin. Then check for updates, disable the culprit, and possibly contact the plugin developer, if needed.
Finally, consider changing the WP_DEBUG constant back to false when you have resolved the error(s).
What if the problem persists?
After all of this, your site should be back to normal. If this is still not the case, check that your host’s server is not down, and remember to empty your cache if you are using a dedicated solution (the WP Rocket plugin, for example).
If your site is down, you can clear your cache by deleting the ftp cache folder (wp-content > cache).
It may also be useful to clear your browser’s cachewhich often causes problems after modifications, and to try to access the site in private browsing to have no cache or cookies.
Finally, ask your host for advice if you are still facing this annoying blank page.
3. Database connection error (Error Establishing Database Connection)
This error occurs when your site is unable to connect to its database.
First of all, it can happen when it gets a lot of traffic. The server can no longer keep up and returns the error to you.
But most of the time, it fixes itself as soon as you refresh the site. If the problem persists, you will have to activate plan B: follow the procedure below.
Quite often, you will encounter a database connection error because you made a mistake when entering or modifying your credentials.
But it could also be that the database has been corrupted, or that the server hosting your database is down.
For information, WordPress consists of two main elements:
- The Heart Files ;
- The database.
The database is very important. It stores all your site information (posts, pages, site settings, theme and extensions, etc.).
Check the wp-config.php file
Normally the database connection error comes from the file
wp-config.php. This is where your login credentials are located:
- Name of the data base ;
- username ;
- password ;
If you’ve recently changed them, or if you’ve changed hosts without updating your file
wp-config.phpyou are on a track.
When you open the file
wp-config.php on your FTP (it is at the root of your site), you will find the following lines:
To check if your credentials are correct, you can check your MySQL database on your hosting account. If you forgot their password, regenerate a new one.
If you are at o2switch, connect to your cPanel with your identifiers (provided during your registration), and click on “MySQL databases”.
Then check that the identifiers of your current database correspond to those present in your file
wp-config.php. If not, replace them.
b. Repair your database
If your database is simply corrupted, it will have to be repaired. To do this, you will use a line of code to automatically optimize your database :
Add it at the end of your file
Then go to the following URL:
votresite.fr by the name of your site, and follow the instructions presented on the screen.
When the repair is complete, remember to remove the line of code previously added to your file
If the problem persists, contact your host as the server hosting your database may be down.
Come on, let’s go straight to error #4.
4. Connection time expired (Connection Timed Out)
This error occurs when your site has tried to load but fails. Why ? Because it requires too many server resources, especially on sites hosted on shared servers (several sites use the same bandwidth from the same server).
Here are some possible solutions (for their application, see previous WordPress errors):
- deactivate all your plugins, because some can cause slowdowns if they are badly coded or too heavy; re-enable them one at a time to see which is causing the problem;
- use a default WordPress theme (ex: Twenty Twenty-Two) because your theme may be the cause of an expired connection time;
increase the memory allocated to WordPress in your file
- optimize the performance of your site using a caching plugin like WP Rocket;
- upgrade to a higher hosting solution (but you will have very little chance of having to do this if you are hosted at o2switch).
5. Automatic update failed (Failed Auto-Upgrade)
According to a 2021 Sucuri report, 50% of hacked WordPress sites were not up to date.
You understand where I’m coming from: update your sites. And this, even if you are afraid that the process will crash your WordPress.
Frankly, it can happen, but it’s not that common. And if that happens, you just have to follow the recommendations of WPMarmite to get out of the impasse. 😉
Let’s see how right away.
By default, since the release of its version 5.6 (December 2020), WordPress automatically applies major updates (major updates), in addition to minor updates (minor updates) and security updates.
Auto-updates save time, but when a hiccup occurs (in English, we speak of failed auto update), you can’t prevent it… You will easily recognize it: a blank page (the famous White Screen of Death) will appear, or you will see a message indicating that the update failed, for example.
WordPress indicates that this may be due to a problem with your Internet connection during the update, or a connection bug between the main WP files.
Good news: you can fix this error by trying your luck again. If this measure is not enough, you will have to perform the update manually.
6. Service Mode (Maintenance Mode Following Upgrade) activates after an update
When WordPress activates updates, it will automatically make your site unavailable and install a file
Most of the time everything will be fine, but sometimes the process doesn’t work to completion and your site gets stuck in maintenance mode (maintenance mode following upgradein English).
To make this mode disappear, connect to your FTP and delete the file
.maintenance which is at the root of your site (in the folder
public_html if you are at o2switch).
If you do not see this file, its display may be hidden by your FTP. Here’s how to make it visible on FileZilla. Click Server tab > Force Show Hidden Files.
7. WordPress Syntax Error (parse error)
I see the situation well. You have discovered the Snippets section of WPMarmite, which allows you to tweak WordPress without a plugin.
You add the proposed piece of code to redirect to the homepage after a logout. And suddenly, the drama: your site crashes.
Rest easy: you have probably made a syntax error (parse error) by forgetting or doubling a semicolon, a chevron, or a parenthesis.
Normally, the error message that appears tells you on which line (or on the two-three lines before and after) of your file
functions.php lies the error.
For more information, you will need to activate the WP_DEBUG mode as explained above.
Once the problem is identified, fix it and your site should be available again.
To avoid this problem in the future, plan to do tests beforehand on a test environment (locally, for example), and not directly in production.
8. You can’t log in to the administration
Case n°1: You forgot your password
But what is this damn password? Is this the name of your pet? No, it doesn’t. Your middle name? Missed. Septemberbe your mother-in-law’s name? Uh, neither.
One thing is certain: impossible to get hold of the password that allows you to connect to your Dashboard.
To solve this case, the first solution is to click on the “Forgot password” link.
By entering your username or your email address, a new password should be sent to you by email.
I said “should” because that is not always the case. If this solution does not work, you can reset your password via phpMyAdmin.
To do this, log in to your cPanel as explained above.
In the “Databases” section, select “phpMyAdmin”.
Then choose the database associated with your site in the left part of the window.
Among the many tables that will be displayed, select the one called
wp_users (the prefix
wp may be different if you gave it another name during installation, in particular).
Click on “Edit” and modify the password present on the line
user_pass by the one of your choice, taking care to select “MD5” in the drop-down menu in the “Function” column.
Save your changes and you will normally be able to log in with your new password.
To put an end to this WordPress error, I will give you 2 tips:
Case 2: A WordPress error is preventing you from logging into your Dashboard
Perhaps more annoying than forgetting your password, I present to you the impossibility of connecting to your Dashboard. You enter your username and password, but WordPress still redirects you to its login page.
Again, the reasons can be multiple. I advise you to try the following solutions, one after the other:
- deactivate your plugins (see error 1);
- clear your browser cache (see error 9);
- activate the default WordPress theme (see error 2);
.htaccess(see error 1).
9. Your changes made to a theme remain invisible
For the past few hours, you have been carrying out some maintenance work on your site by modifying its appearance, in particular using CSS code.
That’s it, you’ve just finished. And there, surprise: when viewing your new pages, no changes have been taken into account.
To put an end to this display “error”, simply close the corresponding tab and open it again, or empty your browser’s cache.
If you’re using Chrome, select More tools > Clear browsing data > Cached images and files. Click “Clear data” and the problem should be gone.
If your changes still aren’t showing up, maybe you’re using a caching plugin. In this case, delete all cache files generated by the plugin.
10. Your Images Are Causing WordPress Errors
So far your site has been running like clockwork. But now your images are giving you trouble.
They are no longer displayed on your site? An error prevents you from downloading them to your Media Library?
You don’t understand the how and why. You haven’t touched any settings, though.
The cause of this embarrassing situation most likely lies in incorrect file permissions. Basically, WordPress doesn’t know (or anymore) that you have permission to submit files to it.
This can be caused by an update to your hosting provider, or a hacking of your site.
As the WordPress documentation states, “In computer file systems, files and directories have different permissions that specify who can access them as well as the type of access to be able to read, write, modify and access the files. »
If everything works except your images, changing your file permissions should fix the problem.
To do this, connect to your FTP, and go to the folder
The path to follow is as follows: wp-content > uploads.
uploads by clicking on it, but do not enter inside the folder. Right-click and choose “File Access Rights”.
Then enter the numeric value
755check the box “Recursion” in subfolders and “Apply to all files and folders” (see screenshot below).
Then do the same for the files inside the folder.
Right click on uploads > File permissionsenter the numerical value 644 and check “Recursion in subfolders”, then “Apply only to files”.
11. Problem with allocated memory (Allowed memory size exhausted)
For a server to run efficiently, it needs sufficient memory set by your host. It is this memory that your WordPress site will use to make its code work..
If it is not sufficient, you will see the following message: “Allowed memory size of xxxxxx bytes exhausted”.
To solve this problem, you can increase the memory capacity in your file
wp-config.php by adding the following line of code:
As indicated in error #1, contact your host if your server is restricted.
Hey, hey: all of a sudden, your sidebar has just gotten a makeover and no longer appears next to your content, but below it.
It challenges your whole design and it’s not pretty pretty.
Most of the time, this problem comes from either the HTML code or the CSS code.especially if you recently changed themes and/or made code changes.
First, some tags may
div are missing or too many. To find out, you can use the code validation service offered by the W3Cthe organization responsible for promoting the compatibility of web technologies.
For information, a ” HTML
If that doesn’t solve the problem, you should look at your file side
style.css. Setting your margins (margin) might be too large (their values are too large).
13. 404 errors
A 404 error means that a page does not exist or no longer exists.
It can happen :
- when hypertext links are broken;
- if the structure of your permalinks has changed;
- when you delete or rename content or categories/tags.
This is neither good for your SEO nor for the user experience.
To manage 404 errors present on your site, install and activate the redirect plugin.
In this video, Alex explains how to set it all up.
14. You cannot post scheduled posts
Here is a handy feature of WordPress: make possible the delayed publication of an article by planning it in advance.
When you have finished writing an article, you can schedule it for a later date by clicking on its date, next to “Publish”.
If I tell you about it here, it’s because sometimes it doesn’t work because no one visits the site. As a result, CRON tasks (scheduled tasks) cannot be started. One solution is to connect your site to a service like UptimeRobot.
Another possibility: manually validate the publication of the article in question.
Finally, you can use the Scheduled Post Trigger plugin. It will check that your scheduled publications have been published. If not, she will do it for you.
15. Maximum Execution Time Exceeded
If one day you see on your screen the following messages “Maximum execution time of 30 seconds exceeded ” Where “Maximum execution time of 60 seconds exceeded », this means that an action cannot be carried out.
You can start to see with your host if they have an answer to this problem.
Otherwise, the WordPress documentation specifies that there are 2 ways to solve it:
.htaccessby adding the following line of code:
On the other hand, I can only advise you to save and duplicate your file
.htaccess in a safe place (on your desk, for example) before starting any manipulation. In the event of a problem, you will only have to restore the old version;
php.iniby inserting this snippet:
First, you need to create a file
php.ini (at the root of your site but not all hosts take it into account). It’s quite technical, so if you’re not sure, don’t. If you are hosted at o2switch, you can check out this resource.
16. You can’t delete a WordPress plugin
An extension is often great. This allows you to add functionality to your site without having to code.
But it often happens that you no longer need to use it. In this case, it must be deactivated and deleted for it to be considered uninstalled.
For this, you know the procedure to follow. It’s happening on your dashboard in Extensions > Installed Extensions.
You just have to click on “Disable”, then on “Delete”. Easy as pie.
Except when the plugin refuses to delete itself. Yes, it does happen, and it’s often due to poor quality code.
In this case, what do you do? You leave the plugin inactive? Anyway, it does not prevent the proper functioning of your site, you say to yourself…
I do not recommend it to you. Until it is deleted (and even sometimes when it is), a plugin stores information in your database.
And the bigger your database, the slower your site will tend to load. Not good.
To avoid this, the solution is to go through your FTP client and manually remove the faulty plugin.
Once at the root of your site, follow the following path: wp-content > plugins > plugin name.
Then right-click and select “Delete” to completely erase it.
17. The wp-config.php file already exists
wp-config.php is one of the most important files in your WordPress installation. It allows to make the link between the Heart of WordPress and the database.
In particular, it contains the database connection identifiers, the prefix of its tables, and even security settings.
Sometimes, this file does its little quirk by indicating the following message: “The wp-config.php file already exists “.
To resolve this problem, you can try clearing your browser’s cache (refer to error 9 for the procedure).
18. Your site has become slow
Finally, I propose to raise a very important point. This is not an error strictly speaking, but it can affect the proper functioning of your site, and upset your visitors, by degrading the user experience.
What if your site suffers a severe slowdown overnight?
How can I find the cause of this problem and solve it?
To find out which file or script is causing you harm, you can use one of the following services:
Take the example of PageSpeed Insights, a free analysis tool offered by Google. I did a test with the WooCommerce website.
Once the web page has been analyzed, the tool offers you a series of diagnostics and recommendations to optimize your page.
PageSpeed Insights tells you which ones, so you can easily locate them to act on them.
To go further on the subject of performance, I invite you to consult our article which shows you how to optimize a WordPress site without breaking the bank.
The Google Chrome browser console also allows you to see which requests are hurting the loading time of a page, as detailed in this resource.
Final recap on WordPress errors
As no site is infallible, you will be faced with WordPress errors one day or another. Solving them often requires time, energy and reflection.
Throughout this article, you have surely noticed that a lot of problems often have the same cause:
- one or more faulty plugins ;
- a poorly coded theme ;
- a problem with your host’s server.
To overcome these errors, the main thing is not to panic and to keep a cool head. Remember, if possible, to save your site before proceeding with any manipulation.
Also, don’t hesitate to ask your host for help, and try to find a solution step by step.
From now on, I leave the floor to you. What error is giving you trouble? Are there any that we haven’t mentioned?
Let us know in the comments by offering us your solutions. This will also help other readers who might be stuck!