It can happen that your WordPress site displays a 500 error. In most cases, this kind of error is quite simple to solve although it requires technical intervention. To learn how to fix WordPress errors, WebHostingAdvices offers to check 5 parameters and explains how to fix the 500 wordpress error.
Contact your web host
A 500 Server Error WordPress on a web server is an HTTP status code which means that something is not working properly on the website server. This is a general error, and potentially it comes from a problem in the code executed by your WordPress application on the server.
We advise you to start by asking your host to watch what is going on. This will allow you to rule out any problems with the hosting itself. Some hosts could even help you find the solution to your problem, but don’t count on it too much if you haven’t subscribed to a premium offer.
In addition, we invite you to consult the list of HTTP codes, which are not limited to errors elsewhere, on the following Wikipedia page: Here
Among the most well-known codes are:
- 200: success of the request
- 301 and 302: redirection, permanent and temporary respectively
- 401: unauthenticated user
- 403: access denied
- 404: page not found
- 500 and 503: server error
- 504: server did not respond
Make sure your hosting works
If your host assures you that everything is fine, so be it. But we invite you to check it all the same and suggest that you do a simple test to find out if the problem is with hosting or WordPress.
It is a question of uploading a file on the website, independent of WordPress, in order to verify that the web server is working properly. Indeed, WordPress works with the PHP programming language and loading a file makes it possible to verify that this language is running well on the server.
You can use an info.php file. Then upload it to the root of the folder once on your website using your FTP access.
How do I create this file?
Open the notepad and create a new file. Insert the following text:
Save as “info.php”
Then go to the address of your site: yourdomainname.com/info.php
If the server is working as it should, the address should load and display information from the server. If the error 500 continues to appear in WordPress, the server is not functioning properly and you can contact your host and communicate this address.
In general, the problem lies elsewhere, but it is always good to check. Let’s continue to find out where your error 500 came from.
Check the .htaccess file
This file is the basis of your server configuration and a single erroneous character in this file can crash your site and cause a 500 server error WordPress.
A quick and easy way to see if the problem is there is to connect to your site file using FTP and rename the file. If the site works again, bingo! The error comes from the .htaccess file.
Now just re-generate it with WordPress. To do this, log into the back office, click on settings> permalink then save.
This should re-create a new clean .htaccess file and your site should work again.
Please note that your .htaccess file may have had specific settings and should be checked.
What if the problem is with WordPress?
It can happen that the problem comes from the heart of your WordPress installation. For example, a missing or damaged file.
It should then be verified that the heart is intact and that this is not the cause of your 500 error.
Let’s see how to manually remove this damaged file and reinstall it.
How to reinstall WordPress?
- Download the latest version of WordPress: https://wordpress.org/download/
- Unzip the file you just downloaded.
- Delete the wp-admin and wp-includes folders from your web host (via your FTP access).
- Using your FTP access, load the new wp-admin and wp-includes folders from your web host, instead of those previously deleted.
Be careful not to delete the “wp-config.php” or other files in the main folder. If it works again, the incident came from WordPress itself.
Check your active plugins and themes
If none of the previous steps allow you to identify the problem, we invite you to check that the error 500 does not come from your theme or one of your plugins.
For this, you will need your FTP access from your web host as for the previous steps.
Then navigate between the plugin folders: WP-CONTENT> PLUGINS.
Then rename the plugin folders with a name such as plugins_off. Then try to relaunch your website.
If your site reloads without error, then error 500 comes from a plugin.
Go back: change the directory name to its original Plugins name.
Reload the plugins page inside the back office and deactivate the first plugin. Check if your site is working. If this is not the case, repeat the deactivation step plugin by plugin until you find the one that is missing and causes the error 500. If one of your plugins is at fault, you can either replace it with an equivalent to asking a developer to fix it so that it works with your site.
If the WordPress error 500 is still present, it can be caused by your active theme, navigate between the different theme directories of WP-CONTENT> THEMES.
Rename the themes directory with a name such as themes_off. Reload the site and if it works, you have found the source of the problem, your theme. As for plugins you can either replace it with another theme or ask a developer to find the cause of this failure.
In any case, if you cannot find the source of your problem, we advise you to call on experts in WordPress technology or feel free to leave us a comment and we might be able to help you on that regard 🙂 Also, some of the manipulations described above are quite technical. So if you are not sure of what you are doing, then you might want to consider leaving the technical work to a WordPress developer.