Black Friday: 60% off yearly plans with code BF2026, until November 30. See the deal

Troubleshooting

500 Internal Server Error: what it means and how to fix it

A 500 Internal Server Error is a generic server-side failure: the server hit an unexpected condition and had no more specific 5xx code to return. Visitors cannot fix it. Owners find the cause in the error log, where the real message is.

The short answer
  • A catch-all server error. The message that matters is in the server or application log.
  • Visitors: reload once, wait a few minutes, then tell the site owner.
  • Owners: check what changed just before the first 500, usually a deploy or config edit.
Try the website status checkerFree, live, no signup

What causes a 500 Internal Server Error?

MDN lists these common causes. Each leaves a different trace in the logs.

Unhandled exception

Application code throws an error nothing catches: a syntax error, a missing dependency, a null value.

Server misconfiguration

A bad rule in .htaccess, an invalid directive or a wrong handler setting makes every request fail.

Out of memory

The process exceeds its memory limit and is killed or stops mid-request.

Wrong file permissions

The web server or interpreter cannot read or execute files it needs.

Failing dependency

A database, cache or API the app needs is down or refuses the connection.

Plugin or theme conflict

On CMS sites, a new or updated extension breaks page rendering.

How do you fix a 500 error, in order?

  1. 01

    Reproduce it with curl

    Run curl -I https://example.com/page to confirm a real 500 and note the time. Check whether it affects every URL or only some.

  2. 02

    Read the error log

    Look at the web server and application logs for the same timestamp. The line names the file, the error and the request.

  3. 03

    Undo the latest change

    Roll back the last deploy, config edit, plugin or theme update. A 500 that began right after a change almost always comes from it.

  4. 04

    Check resources

    Confirm free memory, disk space and database connections. Out-of-memory kills and a full disk both produce 500s.

  5. 05

    Verify permissions and config syntax

    Test the web server configuration for syntax errors and check ownership and permissions on the application files.

  6. 06

    Add a request ID to error pages

    Log every 500 with the request details so the next failure takes minutes to trace, as MDN recommends.

Where do you look in the logs?

Typical commands on Linux (paths vary by distribution and setup)
# nginx
sudo tail -n 100 /var/log/nginx/error.log

# Apache on Debian or Ubuntu
sudo tail -n 100 /var/log/apache2/error.log

# systemd-managed app server
sudo journalctl -u your-app.service --since "15 minutes ago"

How does 500 differ from 502, 503 and 504?

Server error codes compared
CodeMeaningWhere the fault sits
500Unexpected condition, no specific code fitsThe server or application itself
502Gateway got an invalid upstream responseBehind the proxy
503Temporarily unable to handle the requestOverload or maintenance
504Gateway got no upstream response in timeA slow or hung upstream

What does a persistent 500 do to search?

5xx

Google slows crawling when servers return server errors, and drops URLs that keep failing

Source: Google Search Central

15.6.1

Section of RFC 9110 that defines 500 Internal Server Error

Source: RFC 9110

Gradual

After the server returns 2xx again, Google gradually raises the crawl rate

Source: Google Search Central

Common questions

What does 500 Internal Server Error mean?

It means the server hit an unexpected condition and could not complete the request. The code is generic, used when no more specific 5xx code applies. The cause is on the server or in the application, not in the visitor request.

How do I fix a 500 error on WordPress?

Read the PHP and web server error log first. Then disable plugins and switch to a default theme to find a conflict, check for a corrupt .htaccess file, and confirm the PHP memory limit is high enough. Restore from a backup if a recent update broke the site.

Is a 500 error temporary?

It can be. A brief overload or a restart in progress may clear in minutes. A 500 on every request after a deploy or config change stays until someone fixes the cause, so check the logs rather than waiting.

Can I fix a 500 error as a visitor?

No. Reload once and try again later. Clearing cache or changing browsers rarely helps, because the failure happens on the server. Tell the site owner the URL and time so they can find it in their logs.

Does a 500 error affect SEO?

A short outage has little effect. Google treats persistent server errors as a reason to slow crawling and eventually drop URLs from the index. Fix lasting 500s quickly and monitor key pages so you hear about them first.

Get alerted on the first 500

Aepto checks your sites from up to six regions and puts failures in one Attention queue.