Capricious, it strikes at any moment. A bit impolite, it never asks permission before appearing on your screen.
Annoying, it poisons your daily life as a webmaster. And, to top it all off, it perpetuates the mystery: It is impossible to know precisely what causes it..
This is the 500 error on WordPress. An error you probably never want to see happen… but it doesn't just happen to other people.
Are you already facing this issue? By the end of this article, you will be able to fix it with 9 concrete, practical and detailed solutions.
And if that doesn't solve your problem, don't hesitate to contact our WordPress agency.
What is a 500 error?
A 500 error is an internal error of the server on which a website is hosted. The server is experiencing an unexpected problem. and is unable to display the request sent by the web browser.
The latter then displays an error message on your screen. As a result, the page remains unavailable and does not load.
The Mozilla web browser documentation refers to this error as a "generic 'catch-all' answer" because the reason for it is unidentifiable.
More specifically, a 500 error is an HTTP error, which falls under the category of server errors. Among these, you may also have heard of:
- error 502 (Bad Gateway ou Proxy Error)According to Mozilla, this "indicates that the server, acting as a gateway or proxy, received an invalid response from the upstream server".
- error 503 (Service Unavailable), which notably refers to the state of a server that is temporarily unavailable or undergoing maintenance.
Besides that, you also find HTTP client errors (your web browser), such as the famous 404 error (page unavailable).
Or there are redirection errors, such as the equally well-known 301 redirect, which means that a page has been permanently moved.
In what forms can a temporary error 500 appear?
Error 500 is a generic error: It can work on WordPress, as well as on any other CMS. (Content Management SystemContent Management System).
The error message it displays on your screen can take different forms, with one constant: the presence of English terms, most of the time.
You may encounter the following variations:
- 500 Internal server error;
- Internal server error;
- Error 500 Internal server error;
- 500 Internal server error;
- This page isn't working: HTTP error 500;
- Temporary Error (500);
- 500 Error;
- HTTP status 500: The server encountered an internal error () which prevented it from fulfilling the request.
To put a picture behind the words, here's what she might look like when she decides to make an appearance:
What are the common causes of an HTTP 500 error?
This 500 error, whether on WordPress or elsewhere, never appears randomly. Several reasons can explain its sudden appearance on your screen. Here are the main ones:
- an internal error in your .htaccess fileThis file is a configuration file for the Apache server, the most widely used by web hosting providers. It can sometimes become corrupted, for example after installing a new plugin, or due to a syntax error in the code. In this case, a 500 error will be displayed on your WordPress site.
- an error in your file permissionsIt is no longer possible to access and modify them, for example;
- insufficient server memoryEach web host allocates PHP memory to WordPress. If this memory is insufficient, your web hosting server will not have enough resources to perform certain actions. Consequently, a 500 error will be displayed for the domain name you are trying to access.
- an incompatibility between plugins or themes after a recent installation or an update ;
- An incompatible or outdated version of PHPPHP is the server-side language that WordPress uses. For your information, at the time of writing, WordPress was requesting that your hosting server use PHP version 7.4 or higher.
- A recent WordPress core update that went wrong.
What are the consequences of a 500 error on WordPress?
No webmaster likes encountering a 500 error on WordPress. Even more so when you consider the negative impact it can have on your business and operations.
The longer a 500 error remains unresolved, the more you expose yourself to the following consequences:
- a degradation of the user experience (UX, User Experience). If your visitors cannot access your content, they will not find a solution to the problem they are experiencing. Frustrated, they will likely look to your competitors for what they couldn't find on your domain's pages;
- a decrease in traffic, with a potentially negative impact on your organic search engine optimization (SEO)When Google's robots repeatedly encounter 500 errors, They will tend to slow down the crawling of your pages. (crawl).
And if these 500 errors do not disappear, Google may remove the affected URLs (web addresses of your pages) from its index.
In this case, your pages will no longer be visible on Google's search results page (SERP) until the error is resolved. - a drop in your conversion rateIf potential visitors can no longer access your pages, you will no longer be able to have them perform specific actions such as purchasing a product, filling out a contact form, or subscribing to your newsletter.
To avoid these unpleasant inconveniences, see now how to get rid of a 500 error on WordPress with practical and illustrated tutorials to address different scenarios.
9 solutions to fix a 500 error on WordPress
Are you about to try and fix a 500 error on WordPress? Tackle the root of the problem by applying the solutions below in order, if possible.
The steps to take are simpler and less technical at first. They can sometimes be enough to resolve an HTTP 500 error.
This can therefore prevent you from having to handle sensitive and delicate files that didn't need to be touched. And thus, from performing support for your WordPress site for nothing.
Reload the page
To begin, start with the most obvious solution: refresh your page. Sometimes, a 500 error is fleeting and disappears on its own, in the blink of an eye.
To reload a page on your browser, you have two main options:
- Press the F5 key on your keyboard, regardless of the system used (Windows, MacOS etc);
- Click on the icon to refresh the current page.
If that does not solve the problem, wait a few minutes and try again.
In parallel, also check how your page displays on different devices (computer, smartphone, tablet) and browsers (Chrome, Mozilla, Safari, Opera, etc.).
You can also use this service to check if the 500 HTTP error applies to everyone, or just to yourself.
Is the error still occurring? Clear your web browser's cache.
Here's how to do it on the Google Chrome browser (the operating system used – Windows, MacOS, etc. – doesn't matter), the most used by internet users in France:
- Click on the 3 small dots at the top right of the toolbar.
- Choose More tools > Clear browsing data.
- Check the "Cached images and files" box and click "Clear data".
So, what does it look like on your screen? If error 500 remains fixed in front of your eyes, move on to the next solution.
Contact your hosting provider
As you now know, a 500 error is a server error. Therefore, your web hosting provider may have information about a potential problem with its services.
Contact him to try and separate fact from fiction. And while you're at it, explain your problem to him. Even if the issue isn't caused by his services, you might be able to get some help, who knows.
In any case, if you are frequently encountering 500 errors, the quality of your hosting provider's servers may be the cause.
Consider upgrading your hosting plan, for example by switching to a dedicated server if you're currently on shared hosting (where you share server resources with other websites). Alternatively, consider switching to a high-performance hosting provider like Kinsta.
Your hosting provider couldn't save the day? You're going to have to take a much closer look at this 500 error on WordPress. However, don't rush into anything!
Before making any technical changes, protect yourself by backing up your site (files + database).
The simplest way to proceed, for the inexperienced webmaster, remains the use of a backup plugin. Use one of the following: UpdraftPlus ou BackWPup.
For your information, you can also back up WordPress manually by downloading the desired files from your FTP (File Transfer Protocol) client. This is software that allows you to connect to your hosting server in order to manipulate the files and folders that make up your WordPress site.
Another option: use the backup function offered on your cPanel interface, if your hosting provider offers it.
Control the plugins and the theme
Let's get to the technical part. A first step is to check your plugins and your theme.
These two can cause a 500 error on WordPress, especially after you have updated them.
To be absolutely sure, the first procedure is to disable each extension one by one to find the possible culprit (via the Extensions > Installed Extensions menu).
Each time, refresh the page in your browser to see if the error disappears.Once you have identified the plugin causing the error, remove it before reinstalling it, or replace it with an alternative extension.
This first method has a limitation: your WordPress administration interface (back office) will almost certainly be inaccessible. Login will be impossible… so you won't be able to perform your actions with any peace of mind.
To disable your plugins, you will then have two options:
- Use an FTP client as Filezilla (free and open-source). This is the solution we will detail right after;
- Access the admin login interface of your hosting provider..
Using FileZilla, follow these steps after connecting to it:
- In the root folder (root) of your website, double-click on the "wp-content" folder, then Rename the "plugins" folder which is located inside, for example by calling it "plugins-error".
2. Create a new folder called "plugins" (like the old one). After this action, WordPress will automatically deactivate all your WordPress plugins.
3. Log in to your WordPress dashboard, if you can, then Reactivate your extensions one by one, until the culprit is identified.
The process is exactly the same for your theme. If your dashboard is accessible, activate another theme (e.g., a native theme starting with Twenty) to see if the error persists. If you cannot access your back office, download your active theme's folder to your FileZilla interface, then delete it.
WordPress will automatically use one of its native themes by default.
If the error has not disappeared, tackle the .htaccess file.
Check the .htaccess file to fix the 500 error on WordPress
If your plugins and theme are not the problem, your .htaccess file may be corrupted. To be sure, recreate it.
First, you should know that this file is automatically regenerated when you update your permalinks (the URLs of your site's pages). In the WordPress admin panel, this is done under Settings > Permalinks.
- In the root directory of your WordPress site (usually called public_html, htdocs or www depending on your hosting provider), change the name of your .htaccess file. For example, call it .htaccess_old.
2. If this allows you to access your WordPress admin panel, save your permalinks and you're all set. If not, proceed to the next step.
3. Create a new file called .htaccess on your FTP client. To do this, right-click and select "Create a new file".
4. Add its default code, provided on The WordPress documentation.
If this new .htaccess file still doesn't allow you to access your site's pages, proceed to the next solution.
Increase the amount of memory allocated to the server
A temporary error code 500 can also be caused by a limitation of the PHP memory allocated by your hosting provider.
The lower it is, the more difficulty WordPress will have loading your site's resources (images, plugin code, etc.).
Fortunately, you can manually increase the PHP memory limit by adding this line of code to your "wp-config.php" file, located in the root directory of your website:
define('WP_MEMORY_LIMIT', '128M');
Note that if your hosting provider imposes a memory limit equal to that which WordPress offers by default (64 MB), you will not be able to go beyond that, regardless of the value entered in the line of code above (128 MB, in this example).
Beyond the wp-config.php file, it's also possible to increase the PHP memory limit by adding a line of code to the .htaccess file or the php.ini file, but this process is a bit more technical and risky. The php.ini file isn't always visible to your FTP client, which makes the task more difficult.
Change PHP version
As you read earlier in this article: WordPress is written with the PHP scripting language, which allows it to function.
PHP is a regularly updated languageFor security and performance reasons, it is recommended to use one of its latest versions.
An outdated version of PHP can indeed cause a 500 error on WordPress., because some scripts or plugins require a specific version of PHP to run correctly.
Changing your PHP version is very simple via your hosting provider's cPanel interface (again, if they offer this hosting interface).
To do this, click on "Select a PHP version" in the "Software" section.
Choose the PHP version you're interested in, and that's it. As a reminder, WordPress recommends a PHP version of at least 7.4.
Updating the PHP version in cPanel can make your site unavailable, especially if some plugins are incompatible. This isn't very common and is more likely to occur with newer PHP versions.
To ensure your safety, use a test environment, for example using the extension WP Staging.
Control file and directory access rights
Have all your efforts not yet been rewarded? It is possible that file and directory access rights on your WordPress site(s) have caused a 500 error.
This occurs when access rights are incorrect due to an error or malicious manipulation..
Regarding file and folder access rights (permissions), The WordPress documentation recommends the following: :
- All directories must have permissions set to 755 or 750.
- All files must have permissions of 644 or 640. One exception: wp-config.php which should have permissions of 440 or 400 to prevent other users on the server from reading it.
- No 777 permissions should ever be given to a directory.
To find out if your files and directories have the correct permissions, check them by connecting to your FTP client, then take a look at the "Access Rights" column.
If something is wrong, right-click on the file or directory in question, then change its permissions by choosing "File access rights":
Check your server logs to fix the HTTP 500 error.
Has checking your file permissions made no difference? Move on to an even more technical solution: checking your hosting server logs.
A log is a text file that records the history of events that have occurred on your server. Therefore, you can find evidence of a 500 error on WordPress there.
Some hosting providers offer a log file in their interface, which makes things easier. If yours doesn't fall into this category, your FTP client can still provide the answer.
If a log file is present, it will appear for example in this form: error.log.
Can't see it? Use WordPress's debug mode to display it, if possible on a test site (locally or in a staging environment).
Use debug mode by enabling a PHP constant called WP_DEBUGYou will find it in the "wp-config.php" file, which is located in the root directory of the site (in the "public_html" folder for our example) on your FTP client.
In this file, Manually replace the value "false" with "true" on the line below:
define( 'WP_DEBUG', true );define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Any errors related to PHP will appear in a log file named debug.log, accessible on your FTP via the following path: wp-content > debug.log.
If you want your errors to be displayed on the screen, simply adjust the constant 'WP_DEBUG_DISPLAY’ based on the value true.
And when you have finished debugging your site, remember to pass the constant 'WP_DEBUG' set to false (no need to delete code snippets).
Reinstall the WordPress Core
The last resort to get rid of persistent 500 error codes? Reinstalling the WordPress Core files, that is, the original files that were present when you downloaded WordPress.
To do this, follow the steps below:
- Download the same version of WordPress that is currently running on your site.They are all available on this pageUnzip the archive.
- Send the wp-admin and wp-includes directories to the root of your site.on your FTP client. These two directories will automatically overwrite the existing wp-admin and wp-includes folders.
3. Refresh the page displaying error 500In principle, this should have worked.
You will notice that we have not touched the wp-content directory, which contains your theme and plugins.
That's normal: in principle, they're not the cause. And besides, this way you don't touch the features already installed on your site or its visual structure, controlled in particular by your theme.
If you've made a habit of backing up your site frequently, you can also restore it using your most recent backup. It's an effective temporary fix, but be careful..
This will not permanently solve your 500 error problem..
If your last save dates back several days or even several weeks, you will lose the benefit of all additions made in the meantime, whether in terms of content or design.
What to do if a 500 error persists on WordPress?
Because it gives no warning and no indication of the source of the problem, a 500 error on WordPress is often baffling for the webmaster.
Throughout these lines, you have discovered how to fix the 500 error using several solutions such as checking your plugins and theme, or creating a new .htaccess file.
One thing is sure: It's best to fix this error quickly, otherwise you risk negatively impacting your site's user experience, SEO, and conversions..
Would you like assistance in implementing our various solutions to resolve a 500 error? Contact the WP Maintenance team, specialists in WordPress technical support..
Available 7 days a week, we will offer you a tailor-made solution that will meet your needs with speed, professionalism and efficiency.