If you are a regular visitor and surfer of the web, then you mostly have seen the HTTP 500 Internal Server Error at few times. Internal Server Error is one of the most common issue that arises in WordPress, that can put a WordPress developer (beginner) in panic mode. It never has a straightforward solution, requiring a lot of troubleshooting that can eat up your time and patience. But there is no need to panic. Take a deep breath and know that others before you have had this issue as well.And, here’s everything you need to know about this error and also how to fix it!!
What is a 500 Internal Server Error?
The 500 internal server error appears on every page of your website when there’s a problem with the internal server or file system as it is powering your site. The cause most likely persist in the root directory, where your WordPress files are, but it can also be caused by a problem on your host’s server.
Internal server error is not specific to WordPress, and it can happen with anything that is running on your server and inside your server as well. This error has the most generic nature, that it does not tell the developer anything. Fixing an internal server error is like asking your doctor to relieve your pain without telling them where the pain is. Commonly, internal server error in WordPress is often caused by plugin and/or theme functions. Other possible causes of internal server error in WordPress that we know of are: corrupted .htaccess file and PHP MEMORY LIMIT or having improper file permissions, but there could also be other conflicting causes, such as outgrowing your hosting plan or an issue with your hosting provider.. We have also heard internal server error only showing up when you are trying to access the administrator area while the rest of the site works fine.
No matter what the cause, there are many ways to troubleshoot and fix this error,that may include restoring your site from a backup to simply turning on WordPress debugging mode.
Backing Up Your Site
First-of-all, the most important precaution is to BACKUP YOUR SITE, in case anything goes wrong.The solutions for fixing this problem require making a lot of changes in your site’s root directory.So, It’s highly recommended that you backup your site prior to trying any of these solutions.
1. Checking for Corrupt or Renaming .htaccess File
The first thing that is recommended to do for troubleshooting the internal server error in WordPress is to check for the corrupted .htaccess file.
To do this, open your WordPress root directory in FileZilla,cPanel or your preferred FTP client. This is mostly called public_html. Here you can see folders having names wp-admin and wp-content. If you don’t see your .htaccess file or any dotfiles, make hidden files viewable by clicking Server and selecting Force Showing Hidden Files.
Now, rename the .htaccess file to something like .htaccess_new or .htaccess_test
Navigate to Settings > Permalinks
This will generate a new copy of .htaccess
Once you have renamed the .htaccess file, try checking and loading your site to see if the problem has solved. If it did, then give yourself a pat on the back and if it did not work for you, then you need to continue reading this article..
2. Increasing the PHP Memory Limit
Sometimes, the cause for the error can be Exhausted PHP Memory Limit.
If you are seeing the internal server error only when you try to login to your wp-admin or uploading an image in your wp-admin, then you should try increasing the memory limit by following these steps:
i) Create a blank text file called php.ini
ii) Paste this code in there: memory = 64 MB
iii) Save the file.
iv) Upload it into your /wp-admin/ folder using FTP.
If this worked, then consider it just a patch. A temporary patch. Because there’s something in your WordPress Account that is jamming memory, and it will probably after some time will reach the new limit that you’ve set for now.So. You’ll need to identify the underlying problem before you run out of space again.
3. Deactivate all Themes Plugins
If none of the above solutions worked, then most likable reason for this error can be a specific plugin or a theme. It is also possible that it is a combination of plugins that are not compatible with each other and are conflicting internally. But, there is not an easy way to find this out. You have to deactivate all WordPress plugins at once. (Or if you have time then deactivate the plugin or theme one by one and check until the problem goes.)
Once you find that conflicting plugin make sure to report the error to the plugin author after getting rid of that plugin.
And if you are not lucky enough to fix error then keep trying below solutions..
4. Replacing Core Files
If the plugin option didn’t solve the internal server error, then it is worth trying re-uploading the wp-admin and wp-includes folder from a fresh WordPress install. The process will not change or remove any of your information, but it can solve the problem in case any file was corrupted.
5. Consult your Hosting Provider
If you’ve gone through all of these steps and still cannot find a solution,then perhaps your host may have it. By looking at the server file logs, they might be able to get to the bottom of things.
We hope that you’re not reading this because neither of the above solutions worked for you!
Finding the cause and fixing 500 error can be one of the most frustrating thing that you can experience. It’s such a general yet widespread error that it can drive you insane for fixing it down. These are just solutions for the most probable problems. So, don’t give up if this hasn’t worked for you. contact your host and, if you have a good one, you can be able to work with them to identify the problem quickly. Good luck and hope this has helped!