Skip to main content

How to Troubleshoot a WordPress 500 Internal Server Error

A 500 Internal Server Error is a generic "catch-all" error indicating that the server encountered an unexpected condition that prevented it from fulfilling a request. For a WordPress site, this usually indicates a conflict between plugins, a faulty...

A 500 Internal Server Error is a generic "catch-all" error indicating that the server encountered an unexpected condition that prevented it from fulfilling a request. For a WordPress site, this usually indicates a conflict between plugins, a faulty theme, or a misconfiguration in the .htaccess file or PHP settings.

Before you begin

You will need:

  • Administrator access to your WordPress site.

  • Access to your site's files via an FTP client or a File Manager.

  • Access to your hosting control panel (such as cPanel or Windows Control Panel) to check server resources.

Check for a faulty .htaccess file

A corrupted .htaccess file is a common cause of 500 errors.

  1. Connect to your server using an FTP client or your hosting control panel's File Manager.

  2. Navigate to the root directory of your WordPress installation (usually public_html or www).

  3. Locate the .htaccess file.

  4. Rename the file to .htaccess_old.

  5. Refresh your website in a browser.

Note: If the site loads, the .htaccess file was the cause. You can then go to Settings > Permalinks in your WordPress dashboard and click Save Changes to generate a new, clean .htaccess file.

Identify a plugin or theme conflict

If the .htaccess file is not the cause, a specific plugin or theme is likely causing the crash.

  1. Connect to your server via FTP or File Manager.

  2. Navigate to wp-content/plugins.

  3. Rename the folder of the plugin you suspect is causing the issue (e.g., rename akismet to akismet_old).

  4. Refresh your website.

  5. If the site loads, that specific plugin is the source of the conflict.

  6. Repeat this process for other plugins until you identify the culprit.

Note: If the site loads after you rename the theme folder (e.g., wp-content/themes/twentytwentyfour), the theme is causing the error.

Enable WordPress Debug Mode

If the site remains inaccessible after the steps above, you can enable internal logging to see the specific error message.

  1. Connect to your server via FTP or File Manager.

  2. Locate the wp-config.php file in your root directory.

  3. Open the file and find the line: define( 'WP_DEBUG', false );

  4. Change false to true: define( 'WP_DEBUG', true );

  5. Save the file and refresh your website.

Instead of a generic 500 error, WordPress will now display a specific error message or a stack trace.

Check server resource limits

Sometimes a 500 error occurs because the script exceeded the server's allocated resources, such as memory or execution time.

  1. Log in to your hosting control panel.

  2. Locate your PHP Settings or Select PHP Version tool.

  3. Check the values for memory_limit and max_execution_time.

  4. If these values are low, increase them (e.g., set memory_limit to 256M and max_execution_time to 300).

  5. Save the changes and test your site.

Confirm the result

  • The 500 Internal Server Error message is replaced by your website's homepage.

  • If you enabled Debug Mode, the specific error message identifies the file and line number causing the failure.

If the error persists after these steps

If you have ruled out the .htaccess file, plugins, themes, and resource limits, the issue may be related to a specific server-side configuration or a corrupted core file.

  1. Collect the specific error message displayed when Debug Mode is enabled.

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

  3. Contact Hostek support and provide the error message and the details of the steps you have already performed.

Did this answer your question?