Skip to main content

How to Troubleshoot a 500 Internal Server Error on a cPanel Website

A 500 Internal Server Error indicates that the server encountered an unexpected condition that prevented it from fulfilling a request. This article helps cPanel account users identify and resolve the most common causes of this error on their websites.

A 500 Internal Server Error indicates that the server encountered an unexpected condition that prevented it from fulfilling a request. This article helps cPanel account users identify and resolve the most common causes of this error on their websites.

Before you begin

You will need:

  • A cPanel account

  • Access to the website's administrative dashboard (such as the WordPress admin area, if applicable)

  • The specific URL where the 500 error is occurring

Check the site's error logs

The most accurate way to identify the cause of a 500 error is to review the server's error logs. These logs record the specific script errors or configuration issues causing the failure.

  1. Log in to your cPanel account.

  2. Locate the Metrics section and select Errors (or Errors Log).

  3. Review the most recent entries. Look for lines containing "Fatal error," "syntax error," or "permission denied" associated with your domain.

  4. Note the specific file path and line number mentioned in the error.

Check for a corrupted .htaccess file

A common cause of 500 errors is a syntax error or an unsupported command within the .htaccess file.

  1. Open the File Manager in cPanel.

  2. Navigate to the root directory of your website (usually public_html).

  3. Locate the .htaccess file. (If you do not see it, ensure "Show Hidden Files" is enabled in the File Manager settings).

  4. Rename the file to .htaccess_old.

  5. Refresh your website.

Note: If the site loads correctly after renaming the file, the issue is within the .htaccess file. You can then create a new .htaccess file with standard configurations.

Check for PHP configuration limits

If your website's scripts require more resources than the server allows, the process may be terminated, resulting in a 500 error.

  1. Log in to cPanel.

  2. Locate the Software section and select Select PHP Version.

  3. Click on the Options tab.

  4. Check the following values:

    • memory_limit

    • max_execution_time

    • post_max_size

  5. If your application requires higher limits, increase the values accordingly.

Check for plugin or theme conflicts

If you are using a CMS like WordPress, a faulty plugin or theme can trigger a 500 error.

  1. Log in to your website's administrative dashboard.

  2. If you can access the dashboard, navigate to the Plugins section.

  3. Deactivate all plugins.

  4. Check your website. If the error is gone, reactivate your plugins one by one until the error reappears to identify the faulty plugin.

  5. If you cannot access the dashboard, use the File Manager in cPanel to navigate to wp-content/plugins.

  6. Rename the folder of the suspected plugin (e.g., plugin-name to plugin-name_old) to deactivate it.

Check for file permission issues

Incorrect permissions on folders or files can prevent the server from executing scripts.

  1. Open the File Manager in cPanel.

  2. Navigate to your website's root directory.

  3. Ensure that folders are set to 0755 and files are set to 0644.

  4. You can change these by selecting the item and using the Change Permissions tool.

Contact Hostek support

If you have checked the error logs, verified your .htaccess file, and confirmed your PHP limits are sufficient, but the 500 error persists, the issue may involve a deeper server configuration or a specific module failure.

To help Hostek investigate, please provide:

  • The specific URL where the error occurs.

  • A copy of the latest entries from your Errors log in cPanel.

  • The name of the CMS or application you are running (e.g., WordPress, Magento).

Did this answer your question?