Disclosure: As Bitgog editors, we write about products that we independently select because we love them and believe that you will like them too. Our site often has affiliate partnerships, so we may receive a small compensation, that we spend on making this site faster and better so that your experience is great.
One of the most common errors in WordPress is the 500 internal server error. The worst and the most annoying part is that the internal error does not provide any error information. Here is how it looks:
If you are facing this error, please do not worry at all. I am here to help you. In this post, I will tell multiple ways on how to fix this error.
Internal server error in WordPress does not have a quick fix or solution. Imagine if a sick person visits a Doctor to get fit. But he is not able to tell his problem to the doctor.
Fixing this error is like trying to fix a sick fellow who is unable to tell the nature of his pain or sickness to the doctor.
Here are some of the possible causes of the internal server error in WordPress, and what you can do to fix it. The most common cause of the internal error is either a plugin or a theme malfunction. A corrupt .htaccess file also causes this error.
To start with the troubleshooting, please follow these methods.
Before you make any modifications to your WordPress files or before trying any of the solutions below, make sure you take back up of your website including files and database of your WordPress site. This is very important because if you do not take a backup and if something goes wrong, you might not be able to restore the website back to its current state. Therefore, do take a backup before making any changes. In fact, make it a rule that whether you are running an upgrade or installation, or making any changes to wordpress backend, take a backup before doing so.
How to Fix Internal Server Error in WordPress
1. Turn on debugging.
It is always a good practice to turn on the debugging when you are facing an internal server error in WordPress. Even if it does not solve the problem, it will give you a better idea of what the real problem is. To turn it on, you would need to edit wp-Config.php file. You can access it via FTP by using free FTP prgram such as Filezilla. Look for WP_DEBUG and configure it to ‘true.’
You can create it manually if you don’t find it. It should look like this when you are done – define(‘WP_DEBUG’, true);
Save it and try reloading the site. If the error page is replaced by another error page, it should tell you where the problem is. Once you have identified the problem and fixed it, make sure that you reconfigure the value of WP_DEBUG to false in wp_config.php file.
2. Check the .htaccess file.
Most of the time, an internal server error in WordPress is caused by this. The .htaccess file can become corrupt while installing a plugin, during an incorrect configuration, or when the internet connection is lost while files are being uploaded to the server.
Access the .htaccess file with an FTP program. This file is in the root directory where you will see wordpress folders. Make sure the ‘show hidden files’ option is enabled. Once you have found this file, you can do two things here. You can either delete the file or rename it as .htaccess old.
Next, go to your WordPress site, click Settings followed by Permalinks, and hit the Save button.
Do not make any changes, however. Doing this will automatically generate a new .htaccess file. Visit your website again and see if this resolved the issue.
3. Increase PHP memory unit.
This is not a very common cause, but it can happen sometimes if the PHP memory limit is running too low. This error occurs in isolated cases when you attempt to access your WordPress admin area or try to upload an image. If you are experiencing this, you should try increasing the PHP memory limit. Follow these simple steps to increase the php memory limit:
• Go to WordPress root directory and open wp-config.php.
• Then, Look for WP_MEMORY_ LIMIT and change the value to ’64 MB.’
• If this step does not work, Create this ‘WP_MEMORY_LIMIT,’ ’64 MB’; and paste it into your wp-admin directory.
If you are successful in fixing the internal server error with these steps, you should go ahead and find the real problem. This fix is temporary, and there may be some other code related issues that are exhausting the PHP memory limit.
4. Disable all plugins.
If you have tried any of the above solutions, but the problem still persists, the problem may be caused by a faulty plugin. You might have installed a plugin lately that might be conflicting with your website and would be giving this error. It might also be possible that there might be some plugin which has not been updated and its causing the internal server error.
Try reloading your website after deactivating all plugins; if the error disappears, the problem is with one of the plugins. You can now enable each plugin one after the other. As soon as you enable one plugin, try reloading the site to see if it causes the internal server error again. When you activate the plugins one by one and keep checking if the error occurs again, you would be able to find the plugin that is causing issues. Once you find such a plugin, just deactivate it.
5. Switch the theme.
WordPress themes may also cause internal server errors. If you have recently switched your theme, that might be causing the error. It is important to download WordPress themes either from official WordPress themes directory or reputed theme providers such as:
Try switching your theme, preferably try switching to the default WordPress theme. If your site loads without an error on default WordPress theme, that means the previous theme was faulty. You may want to check out this article on 17 things to do before changing WordPress themes.
6. Re-upload the core files.
You may need to do this so that you can check if some of the core WordPress files are corrupt or not. This means you have to re-upload the files in the wp-admin and wp-includes folder. To do this, you can download the latest version of WordPress from its official website wordpress.org.
Once you have downloaded it, you would see that it is a zip file. Open the zip file, there you would see WordPress folder. Now, you would need to connect to an FTP client. You will need to upload these two folders (Wp-admin and Wp-includes) to the root directory on your website. If your ftp client asks to overwrite these files, click Ok to overwrite. Now, the older wordpress files will get replaced with new ones. So, the error should stop appearing now.
You may encounter this issue even though there are no actual problems with the server. By applying these methods, you can fix internal server error on WordPress. If none of these helped, you should seek the help of your hosting provider. If you want to know more about using a good host, you can see our detailed guide on web hosting by clicking here.