The 500 internal server error is a frustrating issue to have with a website. It can block access to your site for all users, and it can even block your access to the backend of WordPress (wp-admin). What’s even more frustrating is the sheer number of causes that could be producing this error, but what exactly is it? Well, in short, it’s a generic HTTP status code.
HTTP status codes are generated when an issue is occurring on a website, and the exact code your site produces lets you know what error is occurring. The reason I used the adjective “generic” to describe the 500 internal server error status code is because this code simply tells you that there’s an internal issue with the server that must be rectified, but it doesn’t tell you what that issue is or even where it’s occurring on the server. Thus, let the troubleshooting commence!
What causes the 500 Internal Server Error in WordPress?
Tracking down the cause and administering the solution for this issue can be tricky, but you can usually narrow 500 internal server error issues down to a few specific causes. They are:
- Faulty or poorly-coded WordPress plugins
- A problem with your server or hosting environment
- Corrupted .htaccess file on your server
- Issues with your site’s PHP memory limit
- Corrupted core files within your WordPress installation
We’re going to go over how to fix each of these issues, but let’s go over something important first.
Considerations before you begin with troubleshooting
There are a couple things I recommend doing before you try to fix the 500 internal server error on your site. The solutions we’re about to implement include deleting files on your site and replacing them with fresh copies. This is dangerous and can be detrimental if you accidentally delete an essential file. This is why I recommend backing up your site before trying to fix it.
Unfortunately, the 500 internal server error is notorious for blocking access to the backend of WordPress, so I can’t recommend a simple backup plugin for you to use to create a quick copy. Start by consulting your host and asking them if they have an up-to-date copy of your site. Some hosts even allow you to access a log for the backups they’ve created for your site.
If your host doesn’t have a backup, use the backups app in cPanel to backup your account. You should also open your site in an FTP client and download a copy of your entire root directory for WordPress, which is typically a folder named public_html or else. You should also backup your database via phpMyAdmin. Better safe than sorry!
Speaking of FTP, the second thing you may need to do is learn how to use an FTP client, such as FileZilla. You may be able to complete these steps using the File Manager in cPanel alone, but definitely learn how to use this tool if you run into trouble. Now that that’s said, let’s get started.
- Deactivate all plugins
- Consult your hosting company
- Create a new .htaccess file
- Fix corrupted WordPress core files
Solution #1: Deactivate all plugins
This is the simplest solution to this common problem in WordPress. At least if the 500 internal server error is being caused by a faulty plugin. Deactivating every plugin on your site at once can help you determine whether a plugin is the cause of the issue.
Access your site’s root directory via FTP or the File Manager app in cPanel. Open the wp-content folder, and rename the plugins folder to anything else, such as pluginsz. Renaming this folder disrupts WordPress’ access to it, which causes every plugin in that folder to become deactivated.
Refresh your site now that all of your plugins are deactivated. If the 500 internal server error disappears, it was being caused by a faulty plugin. Log into the backend of your site, and head to the Plugins page. Activate the first plugin in your list, and re-open your site in a new tab. If you don’t see the error again, activate the next plugin. Do this until you find the plugin that produces the error message. After you’ve found the plugin that is causing the issue, just get rid of it.
Solution #2: Consult your hosting company
There may be an issue going on with your server only your host can correct. Nothing you do will fix the issue if this is the case. Consult your host, and ask if there are any issues going on with the server that could be producing the 500 internal server error on your site.
Solution #3: Create a new .htaccess file
Access your site’s root directory through File Manager or an FTP client. Look for a file called .htaccess. If you don’t see it, make sure File Manager or the FTP client you’re using is set to make hidden files viewable. FileZilla, for example, has a setting called “Force Showing Hidden Files” under the Server menu. After you’ve enabled this, you should be able to see the .htaccess file.
Once you can see the .htaccess file, rename it to .htaccess.bak to intercept WordPress’ access to it. Refresh your site in your browser to see if the 500 internal server error goes away. If it does, it was being caused by a corrupted .htaccess file.
You still need this file, however, so head to the Permalinks settings page in your WordPress dashboard. Scroll down to the bottom of the page, and click “Save Changes” to generate a new .htaccess file for your site. You can delete the one we renamed before.
Solution #4: Fix corrupted WordPress core files
Sometimes files in your wp-admin and wp-includes folders can become corrupted for a number of different reasons. Whatever the cause may be, all you know is that corrupted file is now generating a 500 internal server error on your site.
A quick and easy fix is to upload new wp-admin and wp-includes folders to your site and overwrite the originals. Just download a fresh version of WordPress by clicking the download button here. There’s a “Release Archive” link in the menu on the left-hand side of the page if you don’t have the latest version of WordPress installed.
Extract the folder once it’s finished downloading, and open the inner folder named wordpress. Copy the wp-admin and wp-includes folders from the wordpress folder over to your site’s root directory, and overwrite the original folders when File Manager or your FTP client asks you if you’d like to. Don’t forget to enter the correct data in the file wp-config.php to connect WordPress to your database.
Once that is done, refresh your site to see if it’s still generating a 500 internal server error. If it’s not, the error was being caused by a corrupted WordPress core file.
Final thoughts & other solutions for this common WordPress issue
The 500 internal server error issue can be a tricky issue to solve, but we hope these solutions have helped you narrow down the problem. There are a few other solutions you can try. For example, your server may generate this error if you exceed the PHP memory limit of your site. If that’s the case, you’ll want to increase your limit by using:
at the top of your wp-config.php file and changing the 64M unit to a number that’s higher than your current PHP memory limit. You can also ask your host to do this for you.
You can also debug your site to look for PHP error logs that may be generating the 500 internal server error, deactivate your WordPress theme, check your file permissions and check your PHP version to see if plugins you’re using require a newer version of PHP. Do you have any questions or other suggestions to solve this error? Just let us know in the comments below.
- FTP Clients: Clker-Free-Vector-Images / Pixabay.com
- Pull the Plug: Clker-Free-Vector-Images / Pixabay.com
- Hosting Server: ColossusCloud / Pixabay.com
- Working with notebook: StartupStockPhotos / Pixabay.com
- Laptop + Notebook: fancycrave1 / Pixabay.com