How to fix 500 internal server error ?

There is no clear-cut solution to solve the 500 internal server error. You have to try various tips and tricks to solve this issue. So let’s see some of the probable solutions one by one-

     1. Enable Error logs
Enable the debugging feature of WordPress by editing the wp-config.php file of your website. Find the code that says

define( "WP_DEBUG", false );

Then change the value from false to true in the code

define( "WP_DEBUG", true );


Next, click on the save button and try refreshing your site. After this step, the server error will be gone and a new error will appear. This error will tell you about the location where the issue is taking place. After finding the location of the problem-causing folder, disable or delete that folder. Then the error will be gone.

Once the problem is resolved, turn off the debugging.

    2. Deactivate Plugins

Using your WordPress admin account, log in to the WordPress dashboard. Then disable all the plugins that are installed on your site. After that, check if your site's problem is solved or not. If it is solved then there is a problem with one of the plugins.

Try activating each plugin one at a time and see if the issue is coming again. If while activating one of the plugins the issue is coming then disable that plugin. After that, the site will load correctly.

     If you are unable to login to the WordPress dashboard through the WP-Admin, then go to the plugins folder via cPanel or FTP and perform the above tasks.   

   3. Change the WordPress theme

If the problem is not resolved by uninstalling the plugins then the problem is with the Theme. Use the default theme of WordPress instead of the theme that you are currently using. Then refresh your site. If the problem is resolved then the problem was with your theme. 
      If you are unable to log in to the WordPress dashboard through the WP-Admin, then go to the themes folder via cPanel or FTP and perform the above tasks.

   4. Try reassessing the .htaccess file.

The .htaccess files tell the server which actions to take under different circumstances.

This issue can be solved by editing the .htaccess file. First, create a backup of the file. Then remove all the contents inside it. Some of your crucial files may be deleted, but don’t worry you have saved your backup. After this step, if the site works properly then, you will come to know that the problem was with the .htaccess file.

Next, restore the complete backup file. Restore each of the blocks one after another and refresh every time you add one block. By using this method you can find the block that is causing the 500 error and you can remove that block or line. In this way, you can solve the 500 internal error of your website by reassessing the .htaccess file.

    5.  Try increasing your memory limit

In some cases, you get the 500 internal server error because the memory limit is exceeded. So try increasing the memory limit to solve the issue. Increase the memory limit of WordPress via cPanel. By doing so your problem will be resolved.
    6. Try reinstalling WordPress

It’s not the most effective way to resolve the problem but sometimes it can solve the issue. 

    7. Contact the Service provider

Sometimes the 500 internal server error is caused because of some issue from the server’s end. So you can contact the hosting provider to discuss the issue with them.

   8. Change or upgrade the hosting service

If you are facing the 500 internal server error more often, then change your hosting services and see if the problem resolves or not. 

      You cannot tell which component of your website is causing the 500 internal server error. So you have to try the above steps and see which method works for you.


Did you find this article useful?