WordPress Troubleshooting

How to Fix a WordPress 500 Internal Server Error

Seven checks, in the right order, to find what is breaking your site and get it back online.

6 min readTroubleshooting
In this guide
  1. Causes
  2. 1. Error logs
  3. 2. .htaccess
  4. 3. Memory limit
  5. 4. Plugins
  6. 5. Theme
  7. 6. PHP version
  8. 7. Core files
  9. When to get help
  10. FAQ

A 500 Internal Server Error means the server hit a problem and couldn’t say what it was. That vagueness is why it’s frustrating: the message tells you nothing, but the cause is almost always one of a short list of things. Work through them in order and you’ll usually find it quickly.

Short answer: to fix a WordPress 500 error, check the server error log, rename .htaccess to regenerate it, raise the PHP memory limit, deactivate all plugins to find a conflict, switch to a default theme, confirm your PHP version is supported, and if needed replace core files with a fresh copy.

Back up first.You’ll be editing files. Take a backup through your host’s control panel, or copy the site files and export the database, before changing anything.
Guide to fixing a WordPress 500 internal server error step by step
Work through the checks in order: logs, .htaccess, memory, plugins, theme, PHP version, core files.

What causes a 500 error in WordPress?

The error is a generic server response, not a WordPress-specific message. In WordPress the usual causes are:

CauseTypical trigger
Corrupted .htaccessPlugin or permalink changes, a bad manual edit
PHP memory exhaustedHeavy plugin, large import, low host limit
Plugin conflict or fatal errorRecent install or update
Theme errorTheme update or custom code in functions.php
Incompatible PHP versionHost upgrade or an old plugin
Damaged core files or permissionsFailed update, interrupted upload

Step 1: Read the error log first

Guessing wastes time when the server often records the real error. Check your host’s control panel for an error log (in cPanel it’s under Metrics → Errors), or look for an error_log file in your site directory.

You can also have WordPress write its own log. Add these lines to wp-config.php, above the line that says to stop editing:

define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false);

Errors are then saved to wp-content/debug.log. The file path in a fatal error usually names the plugin or theme at fault. Turn debugging off again when you’re done.

Step 2: Regenerate your .htaccess file

Using FTP or your host’s file manager, rename .htaccess in the site root to .htaccess_old, then reload the site. If it comes back, log in to the dashboard and go to Settings → Permalinks and click Save Changes to generate a fresh file.

This applies to Apache and LiteSpeed servers. Nginx doesn’t use .htaccess, so skip this step there.

Step 3: Increase the PHP memory limit

If the log mentions “allowed memory size exhausted”, add this to wp-config.php:

define('WP_MEMORY_LIMIT', '256M');

Your host can cap this regardless of what you set. If the error persists or the limit won’t change, ask the host to raise it.

Step 4: Deactivate plugins to find a conflict

If you can’t reach the dashboard, use FTP to rename wp-content/plugins to plugins_old. If the site loads, a plugin is responsible.

  1. Rename the folder backRestore the name plugins. All plugins will show as deactivated.
  2. Reactivate one at a timeStart with the plugins you updated most recently.
  3. Reload after each oneWhen the error returns, you’ve found the culprit.
  4. Replace or remove itUpdate it, contact its developer, or switch to an alternative.

With WP-CLI installed, wp plugin deactivate --all does the same in one command.

Step 5: Switch to a default theme temporarily

Rename your active theme’s folder inside wp-content/themes. WordPress will fall back to a default theme such as Twenty Twenty-Four, provided one is installed. If the error disappears, the problem lies in your theme or its custom code.

Step 6: Confirm the PHP version is supported

Check which PHP version your host runs and which versions your plugins and theme support. A newly upgraded PHP version can break older code, while very old versions can fail with current plugins. Most hosts let you switch versions in the control panel, so you can roll back to confirm.

Step 7: Replace core files if nothing else works

Download a fresh copy of WordPress from wordpress.org and upload the wp-admin and wp-includes folders over your existing ones. Don’t touch wp-content or wp-config.php, because those hold your content and settings.

While you’re there, check permissions. Folders are typically 755 and files 644.

When to ask your host or a developer

Contact your host if the log shows server-level errors, resource limits or a ModSecurity block you can’t edit. Involve a developer if the log points to custom code, if you don’t have a recent backup, or if the site is revenue-critical.

Frequently asked questions

Does a 500 error mean my site data is lost?

Normally no. Your content lives in the database and uploads folder, which the error doesn’t touch. Still, back up before making fixes.

Why doesn’t the error say what’s wrong?

The server returns a generic status code when it can’t identify or doesn’t reveal the cause. The error log is where the details usually appear.

Can a caching plugin cause a 500 error?

Yes. Caching plugins edit .htaccess and can conflict with server settings, so include them when you test plugins.

Is a 500 error the same as the White Screen of Death?

Not exactly. A 500 is an HTTP server error. The White Screen of Death is a blank page, often caused by a PHP fatal error, though the fixes overlap.

How do I prevent 500 errors?

Keep regular backups, test updates on a staging copy, keep PHP and plugins current and compatible, and remove plugins you don’t use.

Site still down?

If the steps above haven’t fixed it, our WordPress development services include troubleshooting and recovery.

Get urgent help

Leave a Comment