Hosting Cost
Intermediate Troubleshooting / Errors

500 Internal Server Error: Causes & Fixes

Marcus Feld, Infrastructure Editor
Marcus Feld

Infrastructure Editor

Disclosure: Some links on this page are affiliate links — if you sign up through one, we may earn a commission at no extra cost to you. It never changes our ratings, rankings or verdicts: we don't sell hosting and take no pay-for-placement.

Who it's for

  • WordPress site owners
  • Small business website admins
  • Developers
  • Non-technical site managers

By Marcus Feld, Infrastructure Editor

What a 500 Internal Server Error Means

A 500 Internal Server Error is the server’s way of saying “something went wrong and I don’t have a more specific code for it.” Unlike a 404 (page not found) or a 403 (permission denied), it names no culprit. The visitor sees a bland message, and the real explanation sits in the server’s error log, which is why a 500 feels so opaque from the front end: the same screen can hide a typo in a config file, a crashed plugin, or a process that ran out of memory.

Two things are worth knowing before you touch anything. First, a 500 means the request reached your server and something failed while handling it, so your domain, DNS and hosting account are almost certainly fine. Second, it is usually a fault in what runs on the server (your site’s files, settings and code) rather than in the hardware underneath. That makes a 500 the most fixable error in this family, and often something you can resolve yourself in well under an hour.

Is It the Server, the Application or the Network?

Sorting the cause into a layer saves a lot of wasted effort.

a hand holding an iPhone up to a laptop in a dim techy home office at night, the laptop showing a server terminal with scrolling log lines a
  • Application layer (by far the most likely). A plugin, theme, custom code or a corrupted core file threw a fatal error. If the error started right after an update, an install or an edit, this is almost certainly it.
  • Server configuration layer. A bad .htaccess rule, a wrong permission, or a PHP setting (memory, version) the application can’t live with. This is typical after a migration or a PHP version change.
  • Resource layer. The account hit a memory, process or CPU ceiling mid-request. This is often intermittent and tied to traffic or a heavy task.
  • Network layer. Rarely the cause. A 500 is generated by the server itself, so a dropped connection or a DNS problem will look different (a timeout, a 502 or a 504, or no page at all).

If you only remember one rule, remember this one: the error log decides which layer you’re in. Guessing is slower than reading one log line.

Common Causes of a 500 Internal Server Error, Ranked

The order below reflects how often each cause turns up on typical shared and managed WordPress-style hosting. It is a practical ordering from experience, not a measured statistic, and on a custom application the order will shift.

Plugin or Theme Conflict

A recently updated or newly installed plugin or theme throws a fatal PHP error the server can’t recover from. If the site broke in the minutes after you clicked Update, start here. Two plugins that each work alone can also clash once both are updated, which is why the trigger is sometimes not the plugin you just touched.

Corrupt or Misconfigured .htaccess File

Common on shared hosting running Apache. A bad rewrite rule, a leftover directive from a plugin you removed, or a rule the server doesn’t support breaks every request it processes. Caching, security and redirect plugins are the usual authors of the offending lines.

Exhausted PHP Memory Limit

A script or plugin tries to use more memory than your plan allows and the process is killed mid-request. Page builders, WooCommerce, big imports and image-processing plugins are typical triggers. The log will usually say “allowed memory size exhausted”.

Incorrect File or Folder Permissions

Web servers expect sensible permissions, commonly 644 for files and 755 for folders. Anything stricter can stop the server reading a file; anything looser (especially 777) may be refused outright by hardened hosts. Permissions often go wrong after a manual upload or a restore from backup.

PHP Version Mismatch or a Fatal Coding Error

Moving to a newer PHP version can break an older theme or plugin that used features since removed. A hand-edited functions.php with a missing bracket does the same thing. An infinite loop or unhandled exception in custom code halts the request.

Corrupted Core Files

An interrupted update or a half-finished file transfer leaves the application’s core files incomplete. Less common, but it does happen, particularly when an update was run on a slow connection or while the server was under load.

Step-by-Step Fix for a 500 Internal Server Error

Work in this order. Each step is cheap and reversible, and each one rules out a layer.

a small home server tower on a shelf with blinking green and amber LEDs, a tangle of ethernet cables hanging below it, dim evening light fro
  1. Check the server error log first, via your hosting control panel (cPanel: Errors or Metrics > Errors; Plesk: Logs). The log usually names the exact file and line. If you see that, you can often skip straight to the matching step below. If your host offers a WordPress debug option, turning on WP_DEBUG_LOG writes PHP errors to a file you can read.
  2. Retrace your last change. Note what you did just before the error: an update, a new plugin, an edit, a PHP version switch, a migration. Undoing the most recent change is the fastest fix more often than any technical step.
  3. Rename .htaccess to .htaccess_old via FTP or File Manager, then reload the site. If it loads, the original file was the problem. Regenerate it from your CMS (WordPress: Settings > Permalinks > Save).
  4. Deactivate all plugins. If you can’t reach the admin dashboard, rename the plugins folder over FTP or File Manager and reload. If the site recovers, put the folder name back and reactivate plugins one at a time until the error returns. The last one you turned on is your culprit.
  5. Switch to a default theme the same way if plugins weren’t the cause. A broken theme function produces an identical symptom.
  6. Reset file and folder permissions to 644 for files and 755 for folders using your File Manager’s permission tool or an FTP client’s “set permissions” option.
  7. Raise the PHP memory limit in wp-config.php (define('WP_MEMORY_LIMIT', '256M');) or through your host’s PHP settings panel if the log shows memory exhaustion. Treat a raise as a test. If a single plugin needs a huge allowance to run, the plugin is the real problem.
  8. Try a different PHP version from your control panel if the error began after a PHP change or a long-overdue plugin update. Stepping back one version is a safe test, though it is a stopgap and not a fix.
  9. Re-upload core application files from a clean copy if the log points to a missing or corrupted core file. Leave your content, uploads and configuration alone.
  10. Contact hosting support with the exact log line and timestamp if none of the above clears it.

When It’s Your Fault and When It’s the Host’s

Most of the time a 500 traces back to your site, not your host. The giveaways that it is on your side: it began right after a change you made, it disappears when you disable a plugin or restore .htaccess, and the log names a file inside your own wp-content or application folder.

The signs that point at the host: the error appears with no change on your end, it affects many unrelated sites on the same server at once, the log shows a process killed by a server limit rather than a code error, or the error clears itself and returns on a pattern. Plan limits also belong in this bucket. If your site needs more memory or processes than your plan offers and you haven’t changed anything, that is a sizing conversation with your host, and our guide to resource limits explains what those caps typically look like.

a rainy window beside a desk lamp, a steaming mug and a closed notebook on a wooden desk, grey daylight and soft reflections on the glass

A fair honesty note: hosts vary a lot in how helpful they are here. A good one will read the log with you and tell you straight whether it’s their server or your code. A poor one will send a copy and paste reply telling you to “check your plugins.” If you can show them a log line that names a server-side limit, that request is much harder to deflect.

How to Prevent 500 Internal Server Errors

  • Update one plugin or theme at a time, and try major changes on a staging copy first. If you change five things and the site breaks, you’ve created five suspects.
  • Keep a recent full backup so a rollback is a five-minute job, not an emergency rebuild. Test that you can actually restore from it.
  • Set file permissions correctly at upload time and avoid 777 as a quick fix. It’s a security risk as well as unnecessary.
  • Remove plugins you no longer use. Every active plugin is another thing that can break, and leftover rules in .htaccess are a frequent source of trouble.
  • Watch PHP memory usage in your hosting dashboard if you run heavier plugins (page builders, WooCommerce, forums).
  • Review file permissions as part of routine maintenance, not just when something breaks.
  • Turn on uptime monitoring so you hear about a 500 from an alert and not from a customer.

When to Contact Your Host

Contact support once the error log names a server-side PHP limit, a corrupted core process, or a fault that persists after you’ve ruled out .htaccess, plugins, themes and permissions. Give them the exact log line, the time it happened and what you’ve already tried. That turns a ticket into a fast confirm-and-fix instead of a repeat of your own diagnosis. See the common hosting errors overview for how a 500 relates to the other error families, and check the error establishing a database connection guide if the log points to a failed database call rather than a PHP fault.

FAQ

Why does my 500 error come and go instead of staying constant? An intermittent 500 usually points to a resource limit being hit under load (memory, CPU or database connections) rather than a permanently broken file. Check your hosting plan’s usage graphs and compare the error times against traffic or scheduled tasks such as backups and cron jobs.

Does clearing my browser cache fix a 500 error? No. A 500 is a server-side fault; the problem exists before your browser ever renders a response, so client-side cache clearing won’t change the outcome. It is worth checking the site from another device or network only to confirm the error is real for everyone.

Can a 500 error affect my SEO rankings? Yes, if it persists. Search engines that repeatedly can’t crawl a page because of server errors can drop it from the index over time. A short blip is unlikely to matter, but resolve persistent 500s quickly, and check the status codes cheat sheet for how search engines treat each code differently.

Is a 500 error the same on every hosting type? The HTTP meaning is the same everywhere, but the likely cause shifts. Shared hosting sees more .htaccess and permission issues, while VPS and dedicated environments more often show PHP-FPM or memory-limit faults from custom configurations.

I can’t log in to my dashboard either. How do I fix it? Use FTP or your host’s File Manager. Every step in the fix list above, from renaming .htaccess to renaming the plugins folder, can be done without the admin area.