Are you having problems with the 500 Internal Server Error on your WordPress website? It is one of the most common errors WordPress users face, and can be somewhat difficult to diagnose and fix. In this post, we’ll show you a few ways to fix the 500 Internal Server Error quickly and easily.
If you’re looking for quality shared hosting for your WordPress website, we highly recommend A2 Hosting. They offer unlimited SSD space, free automatic site backups, hosting optimized for speed and 24/7/365 guru technical support.
Table of Contents
- Ensuring your .htaccess file is not corrupted
- Editing your .htaccess file
- Increasing PHP memory limit
- Deactivating all plugins
- Re-uploading core WordPress files
- Downloading newest WordPress version
- Uploading fresh WordPress core files
- Consult with your hosting provider
What causes the 500 Internal Server Error?
This is a generic error, which can happen to any site on a web server. Most of the time with WordPress websites, the error is caused by certain plugin or theme functions. It can also be caused by a PHP memory limit or corrupt .htaccess file.
In some cases, people only see the error when trying to access the WordPress dashboard, but everything works and looks fine on the front end.
Troubleshooting the 500 Internal Server Error in WordPress
Ensuring your .htaccess file is not corrupted
The first place to check is your .htaccess file. If it is corrupted, it can cause all kinds of fun errors in WordPress. You can access your site’s .htaccess file using FTP or within File Manager in your hosting cPanel.
The .htaccess file will be located in the same root directory as WordPress (you’ll see the wp-content, wp-admin and wp-includes folders in there, as well as a bunch of individual WordPress files).
Editing your .htaccess file
The first step is to simply rename the file by adding some text to the end of the filename (e.g. .htaccesstest or .htaccess-old). You can do this by double-clicking on the file name in FTP or in File Manager.
After renaming your .htaccess file, go and see if the error persists on your site. Remember to clear your browser cache and history before you check.
If this solved the internal server error, hooray! Now, all you need to do is log in to your WordPress dashboard and go to Settings > Permalinks, where you will click the Save button.
If you still have the error on your site, proceed to the next steps in this tutorial.
Increasing PHP memory limit
The 500 Internal Server Error can be caused by a PHP memory limit which is too small.
(reference PHP memory limit tutorial that I’m going to write).
Create a new file (in Notepad or some other text editor) and add the following code to it:
Then, save the file as php.ini and upload it to your wp-admin folder via FTP. If this fixed the error, you still need to find out what is using up the PHP memory limit.
It could be a wide range of things, including a theme function or poorly-coded plugin. If you’re using a quality hosting company, you should reach out to their technical support and see if they can give you an exact cause by viewing your server log files.
Hopefully, increasing the PHP memory limit fixed the internal server error for you. If not, we have some more troubleshooting tips for you below.
Deactivating all plugins
If you’ve tried all fixes above without success, then this error is most likely due to a plugin conflict. It could also be caused by a combination of activated plugins not working well together.
Unfortunately, there is no simple way to figure out if it’s a plugin conflict. You should start troubleshooting by deactivating all of your WordPress plugins via FTP.
To do this, simply navigate to your plugins directory within /wp-content/ and change the name of it (e.g. from plugins to plugins1 or something similar).
If you were able to re-gain access after deactivating all plugins, then you know one of your plugins was causing the error.
Now, you should log in to your WordPress dashboard. Then, you can go back to ftp and set the name of your plugins folder back to “plugins.”
Next, reactivate each plugin one at a time until you find the one that caused the error. Deactivate and delete the problematic plugin. You can also report the problem to the plugin developer.
Re-uploading core WordPress files
If deactivating all plugins didn’t solve the internal server error, then you can try re-installing the wp-admin and wp-includes directories from a fresh WordPress install.
Please Note: This will NOT delete any of your site data, but may help fix the error if it was due to a corrupt WordPress core file.
Downloading newest WordPress version
Go to the WordPress.org website and click the download button. Then, extract the downloaded zip file and locate the WordPress folder.
Open your ftp client and go to the root folder of your site (the one that contains wp-admin, wp-includes, and wp-content).
Uploading fresh WordPress core files
With the root folder open, you can re-upload the fresh WordPres wp-admin and wp-includes folders by either locating the folders in the left column, right-clicking on them and selecting Upload or dragging the folders from a finder window on your computer to the target directory in your ftp client.
When asked whether you want to overwrite the files, choose Overwrite and check the Apply to current queue only box. Then, click the OK button.
Consult with your hosting provider
If you’ve exhausted all the methods in this tutorial, it is time for you to reach out to your web hosting provider for extra help. Contact technical support and ask them to check the server logs to give you the cause of the error.
Seeing errors on your website can be super frustrating, especially when you’re not sure what is causing them. Hopefully, this tutorial helped you successfully fix the 500 Internal Server Error on your WordPress website.
Do you have anything you’d like to add? We aim to make our WordPress tutorials as thorough as possible, and always welcome additional information. Feel free to leave a comment with your questions or comments below.
If you found this post helpful, please share it and spread the word!
Want more like this? Sign up for my newsletter to receive helpful WordPress Tutorials, Tips and Tricks.