Skip to content Use Monity from Claude, ChatGPT or Codex: set up monitors and ask what changed, from a chat. Use Monity from Claude, ChatGPT or Codex Connect yours
Tutorial 4 min read

HTTP 500 Internal Server Error: what to do, and where the real error is

A 500 Internal Server Error is the website’s fault. What to do as a visitor, where Apache, nginx, PHP and WordPress log the real error, how to get past WordPress’s critical error page, and how to catch a 500 after a deploy.

Alex Lead Product Designer
UpdatedNovember 23, 2026 Read time4 min AudienceSite owners and developers

A 500 Internal Server Error means the website’s server hit a problem it didn’t expect and couldn’t finish your request. It’s the site’s fault, not your browser’s or your connection’s. As a visitor, reload once after a minute and, if it stays, try later or tell the site. If it’s your site, the page won’t say what broke, but the server’s error log will.

Seeing a 500 on a site you’re visiting

  • Reload once, a minute later. Some 500s last seconds, during a deploy or a restart.
  • Don’t resend a payment or an order straight away. The request may have gone through before the error. Check your email or your account first.
  • Try another page of the site. If the rest works, only that page is broken; if it all fails, the site is down.
  • Tell the site if it lasts: the address, the time and what you were doing are what its developers need.

Clearing cookies or switching browsers rarely helps, because the error happens on the server. The exception is a 500 that only your account triggers: if the same page works signed out, report that to the site.

Your site: find the real error

RFC 9110 defines 500 as an “unexpected condition that prevented it from fulfilling the request”, and MDN calls it a catch-all. Unlike 502, 503 or 504, the code says nothing about where it failed, so read the log for the minute it happened. The usual places:

What runs the site Where the error usually is
Apache /var/log/apache2/error.log (Debian, Ubuntu) or /var/log/httpd/error_log (Red Hat family)
nginx with PHP-FPM /var/log/nginx/error.log, plus PHP-FPM’s own log for fatal errors
WordPress wp-content/debug.log, once logging is on (below)
A Node, Python or Ruby app The app’s own log or process output, for example journalctl -u <service> for a systemd service
Shared hosting The host’s control panel, under error logs

The line you want is a stack trace or a fatal error with the same timestamp. It names the file, and often the reason: a missing function after an update, a database that refused the connection, a memory limit, a file the server can’t read.

WordPress: “There has been a critical error on this website”

That message is WordPress answering a PHP fatal error with a 500. WordPress also emails the site’s admin address a link to recovery mode, which lets you sign in with the broken plugin or theme paused. Without the email:

  1. Add define( 'WP_DEBUG', true ); and define( 'WP_DEBUG_LOG', true ); to wp-config.php, reload the page, and read wp-content/debug.log (WordPress docs). Turn them off afterwards.
  2. If the log names a plugin, rename its folder in wp-content/plugins to switch it off.
  3. If the log is empty, rename .htaccess. Apache answers 500 to a directive it doesn’t allow there or a syntax error (Apache). If the site comes back, start again from WordPress’s default rules.

“Error establishing a database connection” is another common 500 on WordPress, according to Cloudflare: check the database credentials in wp-config.php, and that the database server is up and has disk space. On a Cloudflare site, a 500 page that mentions “cloudflare” came from Cloudflare (a failing Worker, for example), and one that doesn’t came from your server.

A 500 right after a deploy

Roll back first, then find out why: a missing environment variable, a migration that didn’t run, an extension that didn’t load after an upgrade. To catch the next one before customers do, test the pages that matter right after each deploy. Monity’s browser tests run your sign-in or checkout steps from a deploy hook or a GitHub Actions workflow and fail the job when a step fails.

A Monity browser test’s deploy trigger: a URL to POST from CI or a deploy hook, a curl command, and a GitHub Actions workflow file named monity-tests.yml
A test’s deploy trigger in Monity: one POST from your CI after each deploy, or the GitHub Actions workflow, which waits for the run and fails the job unless the test passed.

Between deploys, Monity’s uptime monitoring requests the page on a schedule and alerts when it returns 500. A keyword monitor also catches an error page sent with a 200, by text the page must or must not contain.

More: 502 Bad Gateway, 503 Service Unavailable and all HTTP status codes.

FAQ

Questions people ask

Is a 500 Internal Server Error my fault?

No. It’s an error on the website’s server. Your request can trigger the bug, but only the site can fix it.

How long does a 500 error last?

Until someone fixes the cause. One during a deploy can clear in seconds; one caused by a bug lasts until the code or setting is fixed. Try again later, or tell the site.

How do I fix a 500 error on WordPress?

Use the recovery mode link WordPress emails to the admin address, or turn on WP_DEBUG_LOG and read wp-content/debug.log. Switch off the plugin or theme it names, or rename .htaccess and restore WordPress’s default rules.

What’s the difference between a 500 and a 502?

A 500 comes from the server that ran your request. A 502 comes from a proxy in front of it that got a broken answer from the server behind. With a 502, look one layer further back.

Does a 500 error affect SEO?

A short one, little. Google slows its crawling when it sees server errors and keeps indexed pages for a while, but URLs that keep returning them are eventually dropped.

Written by

Alex

Alex leads product design at Monity. From the plain-English setup to the way an alert is laid out, her work is about making website monitoring something anyone can use, technical or not. She writes here about product design and usability.

More by author
Kamil, Alex and Martyna A person replies within two working days

Have a question?

Pricing, security or scoping: pick one and your message goes to a person on the team.