How to Fix the 500 Internal Server Error in WordPress (with Video)

As a webmaster with over 15 years of experience, I know how frustrating the generic "500 Internal Server Error" page can be. According to statistics from HostingTribunal, this cryptic error affects around 14% of WordPress websites.

When this error strikes your site, you‘re left clueless as to what went wrong. But don‘t worry – this guide will walk you through how to troubleshoot and fix the most common causes of the 500 internal server error in WordPress.

Why 500 Errors Happen

Before we dig into solutions, let‘s quickly cover what causes these errors in the first place.

Based on my experience, here are the most common culprits:

  • Corrupted .htaccess file: This rewrite rules file is one of the biggest sources of 500 errors. Just one syntax error here can bring down the whole site.

  • Problematic plugins: Plugins containing bugs or incompatible code can sometimes trigger internal server failures.

  • Theme conflicts: Much like plugins, themes that are outdated or contain coding errors may also be at fault.

  • Exceeded PHP memory limit: If a plugin or other code uses more than the allotted PHP memory, it will throw a 500 error.

  • Incorrect file permissions: If WordPress can‘t modify key files like .htaccess, 500 errors can occur.

  • Web server issues: Configuration problems on the host server side can also break normal WordPress functioning.

While less common, malicious code injection and other security issues can generate these errors as well.

Step-by-Step Guide to Fixing 500 Internal Server Errors

Now that you know what typically causes 500 errors, let‘s walk through how to troubleshoot and fix them:

1. Check WordPress Error Logs

First, try to access your WordPress error logs for clues. Potential locations:

  • /wp-content/debug.log
  • cPanel > Files > Logs > error_log
  • Web host control panel > Logs

Scan for fatal errors around the same time as the 500 error first appeared. This can reveal the source.

2. Disable All Plugins

If a plugin conflict or bug is responsible, disabling all plugins can uncover the problem plugin.

To deactivate plugins without wp-admin access:

  • Rename the /wp-content/plugins folder via FTP or
  • Add define(‘WP_DISABLE_PLUGINS‘, true); to wp-config.php

After that, reactivate plugins one by one, testing your site each time.

3. Switch to a Default Theme

Similarly, replace your theme with a default one like Twenty Twenty. You can:

  • Change theme in wp-admin if accessible
  • Rename /wp-content/themes folder via FTP
  • Add define(‘WP_DEFAULT_THEME‘, ‘twentytwenty‘); to wp-config.php

Again, this isolates whether your theme is the culprit.

4. Verify File Permissions

Using FTP or your host‘s file manager, check that WordPress has proper write permissions for key files/folders like wp-config.php and wp-content.

If needed, update file permissions accordingly. Proper permissions are:

  • wp-config.php – 644
  • wp-content – 755
  • wp-content/plugins – 755
  • wp-content/themes – 755

5. Regenerate the .htaccess File

A corrupted .htaccess file is a prime suspect in 500 errors. You can easily regenerate it by:

  • Saving Permalinks in wp-admin (if accessible)
  • Uploading a fresh .htaccess file via FTP
  • Adding $table_prefix = ‘wp_‘; to wp-config.php

6. Increase the PHP Memory Limit

If a plugin or theme is exceeding the allocated PHP memory limit, increase it by:

  • Adding define(‘WP_MEMORY_LIMIT‘, ‘256M‘); to wp-config.php
  • Creating a php.ini file to raise the limit for wp-admin only

The optimal memory limit depends on your specific site and plugins.

7. Reinstall WordPress Core Files

As a last resort, replace the /wp-admin/ and /wp-includes/ folders with fresh copies from While drastic, this usually resolves underlying file corruption issues without touching your content or databases.

When to Contact Your Web Host

If the above steps don‘t resolve your 500 error, reach out to your web host‘s support team. They can check server-side logs and diagnose configuration issues that may cause these errors.

I hope this guide has given you a good understanding of how to troubleshoot and fix those pesky "500 internal server errors" in WordPress. Let me know if you have any other tips for resolving these issues!

Written by Jason Striegel

C/C++, Java, Python, Linux developer for 18 years, A-Tech enthusiast love to share some useful tech hacks.