A WordPress 500 internal server error or a 503 "service unavailable" page tells you something has gone wrong on the server, but not what. The good news is that the causes are fairly predictable, and the server's error log usually points straight at the problem.

This guide explains how 500, 502 and 503 differ, where to find the logs, and how to work through .htaccess problems, PHP limits, plugin and theme errors, and traffic spikes. Take a backup of any file before you change it.

500 vs 502 vs 503: What's the Difference?

Comparison of 500 Internal Server Error, 502 Bad Gateway and 503 Service Unavailable, with what each usually points to
The status code is your first clue to where the problem sits.

WordPress itself shows a 503 with "Briefly unavailable for scheduled maintenance" while updates run. If that message sticks, WordPress's common errors guide says to delete the .maintenance file from your site root.

If the whole site is down and you need a calm starting point, see my WordPress site down emergency checklist.

WordPress 500 Internal Server Error? Check the Error Log First

Guessing wastes time. The error log usually names the file and line that failed.

Concept illustration of a holographic log panel with one line glowing red under a magnifying lens
One line in the error log often explains the whole outage.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Turn debugging off again when you've finished, and delete the log file, as it can contain information about your site.

Look for phrases such as "Allowed memory size exhausted", "Maximum execution time exceeded", or a fatal error naming a plugin or theme folder. Each points to a section below.

Six-step fix order for a WordPress 500 error: error log, .htaccess, plugins and theme, memory limits, traffic, call your host
Work from the cheapest checks to the most involved.

A Corrupt .htaccess File

WordPress's common errors guide says a corrupted .htaccess file is the most likely cause of a 500 error on Apache-based hosting. To test it:

  1. Connect by SFTP or your host's file manager and find .htaccess in the site root.
  2. Rename it to .htaccess_old.
  3. Load your site. If it works, go to Settings → Permalinks and click Save to generate a fresh file.
  4. Compare the old file with the new one and only re-add rules you understand and need.

Bad rules often come from security or caching plugins, manual edits, or occasionally a hack. Sites on Nginx don't use .htaccess, so skip this step there.

PHP Memory and Execution Limits

If the log mentions memory or execution time, a process is asking for more than the server allows. WordPress's guide notes this is particularly common on shared hosting.

Plugin or Theme Fatal Errors

A plugin or theme update that conflicts with your PHP version or another plugin can cause a 500 error. Modern WordPress often shows "There has been a critical error on this website" instead, which my guide to fixing the WordPress critical error covers. A blank page is covered in the WordPress white screen of death.

If you can't reach the admin area:

  1. Rename wp-content/plugins to plugins_off. This deactivates every plugin.
  2. If the site loads, rename it back, then rename individual plugin folders one at a time to find the culprit.
  3. If plugins aren't the cause, switch to a default theme by renaming your active theme's folder.
  4. As a last step, WordPress's guide suggests re-uploading the wp-admin and wp-includes folders from a fresh copy of WordPress.

Don't delete plugin folders while troubleshooting. Renaming is reversible; deleting can lose settings and custom files.

Traffic Spikes, Bots and Resource Limits

MDN notes that some servers return a 503 when they hit resource limits such as memory, CPU or connection pools. On WordPress hosting this often happens when:

Concept illustration of a server rack overwhelmed by streams of teal traffic with its status lights glowing red
Too many uncached requests can exhaust a hosting plan's limits.

Page caching, a CDN, blocking abusive bots at the firewall and faster page generation all help. My guide to reducing TTFB on WordPress explains how to make each request cheaper for the server.

When to Call Your Host

Contact your host if the log points to the server rather than WordPress, if you see 502 errors, if 503s continue outside maintenance, or if you've worked through the steps above without a fix. Give them details so they can act quickly:

Checklist of what to tell your host about a 500 or 503 error, including affected URLs, when it started, status code and error log lines
Specific details get faster answers from support.

Frequently Asked Questions

What causes a WordPress 500 internal server error?

Common causes are a corrupted .htaccess file, PHP memory or execution limits, a plugin or theme fatal error, wrong file permissions or a server misconfiguration. The error log usually tells you which.

How do I fix a 503 service unavailable error in WordPress?

If it follows an update, delete the .maintenance file in your site root. Otherwise check for traffic spikes, bots and resource limits, and ask your host whether the server is overloaded.

What is the difference between a 500 and a 503 error?

A 500 is a generic error meaning something unexpected failed. A 503 means the server is temporarily unable to handle requests, usually because of maintenance or overload.

Where do I find the WordPress error log?

Check your hosting control panel for web server and PHP error logs, or enable WP_DEBUG_LOG in wp-config.php to write errors to wp-content/debug.log.

Will increasing the PHP memory limit fix a 500 error?

Only if the log shows memory exhaustion. Even then, it's worth finding what uses so much memory, as raising the limit only treats the symptom.

Final Thoughts

A WordPress 500 internal server error or a 503 looks alarming, but the error log usually tells you where to look. Work from .htaccess to limits, plugins, themes and traffic, change one thing at a time, and bring your host in early when the server itself is the problem.

If your site is down and you need help now, my site down recovery service can find and fix the cause.

Read the log, change one thing at a time, and keep backups of every file you touch.

Official References

Sources checked on 29 October 2026: