Loading...

Knowledge Base

How to Fix the Internal Server Error in WordPress

The 500 Internal Server error is not always due to WordPress. It can also be caused by other issues on the server. This article addresses the common causes of 500 Internal Server errors in WordPress.

Before making any of the following changes to your website, it is recommended that you back up your site so you can revert to a previous version if something goes wrong.

Is your WordPress site showing a Critical Error? Check out this article for the troubleshooting steps: How to Fix the Critical Error on Your WordPress Website.

Corrupted .htaccess File

To address the issue with a corrupted .htaccess file, you can create a new one. Here are the instructions for addressing this issue.

  1. Log in to cPanel.
  2. Look for the Files section, and click on the File Manager icon.

    cPanel - File Manager

  3. Click on the Settings box on the upper-right side. 

    cPanel - File Manager Settings

  4. Check the box for Document Root and select the domain name you wish to access from the drop down menu.

    cPanel Document Root

  5. Make sure Show Hidden Files (dotfiles) is checked.

    cPanel show hidden files

  6. Click Save. The File Manager will open in a new tab or window.
  7. Look for the .htaccess file in the list of files. You may need to scroll to find it.
  8. Right-click on the .htaccess file, then select Rename. Rename the file as .htaccess.bak. Alternatively, click the .htaccess file icon, then click the Rename icon at the top of the page.

    Rename .htaccess File

From the left-hand navigation menu of the WordPress Dashboard:

  1. Navigate to Settings, then click on Permalinks.

    Wordpress Permalink

  2. Review the settings to ensure they are properly configured.

    Permalinks Settings

  3. Click the Save Settings button.
  4. Try reloading the site to see if the 500 Internal Server error has been resolved.

Still, Getting a 500 Internal Server Error?

Increase PHP Memory Limit

If the error persists, try increasing the PHP memory limit. Please refer to this article for more information on resolving the PHP Memory Limit Error.

Deactivate/Reactivate All Plugins

If increasing the PHP memory limit does not resolve the 500 Internal Server error, it may be caused by one or more plugins installed on WordPress.  Often, when a new theme is installed, a previously installed plugin becomes incompatible, resulting in a 500 Internal Server error.

  1. Log in to cPanel.
  2. In the Files section, click on the File Manager icon.

    cPanel - File Manager

  3. Select the Web Root (public_html/www), and the Document Root for the domain using the WordPress install, then click save.

    cPanel settings

  4. Click to expand the public_html folder, then navigate to the /wp-content folder.
  5. Right-click on the /wp-content/plugins folder, then rename it as plugins.old. This will most likely deactivate all plugins and lock the WordPress admin area. You can still perform these steps from within the File Manager.

    Renaming Plugin

  6. Reactivate the plugins folder by following the instructions above and renaming it back to plugins. This will allow you to reactivate each plugin individually, isolate the offending one, and resolve the 500 Internal Server Error. This should also allow access to the WordPress Dashboard again.

From the WordPress Dashboard:

  1. Reactivate each plugin (one at a time) and refresh the website to see if the issue has been resolved.

    WordPress reactivate plugin

Need additional assistance? HostGator's Support is here to help. Please contact us via phone or chat so we can assist!

Loading...