WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Errors & downtime Intermediate 3 min read

How to Fix a 500 Internal Server Error in WordPress

A 500 is a category, not a cause. The server log turns it into something specific in about thirty seconds.

Updated 29 August 2026

"500 Internal Server Error" means the web server hit a problem it will not describe to visitors. It is not one bug — it is any of a dozen, all reported identically. So do not start changing things; start reading logs.

Read the server error log first

This is the step that turns a guessing game into a fix. Look in:

  • Your hosting panel's "Error log" section — most panels expose it directly.
  • /var/log/nginx/error.log or /var/log/apache2/error.log on a server you control.
  • wp-content/debug.log after enabling WP_DEBUG_LOG in wp-config.php.

You are looking for the last entry timestamped when you reproduced the error. It will usually name a file and a line, and everything below becomes unnecessary.

Cause 1: A broken .htaccess

An invalid directive makes Apache refuse the whole request. Rename .htaccess to .htaccess-old and reload. If the site returns, that file was the problem — regenerate a clean one by visiting Settings → Permalinks and clicking Save.

Note this only applies to Apache and LiteSpeed. On nginx, .htaccess is inert.

Cause 2: PHP memory exhausted

Add to wp-config.php:

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

If the site recovers, something is consuming a lot of memory per request. Raising the limit is a stopgap; find the plugin doing it. Common offenders are backup plugins running mid-request, image processing without limits, and query-heavy statistics plugins.

Cause 3: A plugin or theme fatal error

Rename wp-content/plugins to wp-content/plugins-off. If the 500 clears, rename it back and disable plugins one at a time until it returns. Then do the same for the active theme.

This is crude but decisive, and on a broken site it is faster than reasoning about which plugin "should" be responsible.

Cause 4: File permissions

Wrong permissions make PHP refuse to execute files. The correct baseline is:

  • Directories: 755
  • Files: 644
  • wp-config.php: 600 or 640

Never set anything to 777. Many hosts refuse to execute world-writable PHP outright, so the "fix" people reach for in a panic is itself a cause of 500 errors — as well as a security problem.

Cause 5: PHP version mismatch

If the 500 started right after a PHP upgrade, an extension is using removed syntax. Switch PHP back one version in your hosting panel. If the site returns, you have confirmed the cause — now find the outdated plugin and update or replace it rather than staying on an unsupported PHP version indefinitely.

Cause 6: Corrupted core files

Rare, but real after a failed update. Go to Dashboard → Updates → Re-install version x.x, or upload a fresh copy of wp-admin and wp-includes from WordPress.org over the top. Never overwrite wp-content — that is your themes, plugins and uploads.

Cause 7: It is not WordPress at all

If static files also 500, or the error appears on every site on the server, the problem is the server: a crashed PHP-FPM pool, a full disk, or a misconfigured virtual host. Check systemctl status php8.3-fpm and df -h before touching WordPress.

Work in this order

  1. Read the error log.
  2. Rename .htaccess.
  3. Disable all plugins.
  4. Switch to a default theme.
  5. Raise the memory limit.
  6. Check permissions and disk space.
  7. Re-install core.

Change one thing at a time and retest after each. Changing three things at once means that even when it works you will not know why, and you will not be able to stop it recurring.

Common questions

Is a 500 error bad for SEO?

It is if it persists. Google retries for a while, but sustained 5xx responses lead to pages being dropped from the index. Fix it the same day, and check Search Console afterwards for crawl errors it recorded.

Why does the 500 come and go?

Intermittent 500s point at resource limits rather than broken code — memory, PHP workers, or database connections running out under load. Consistent 500s point at configuration or a fatal error.