WordPress 500 error (Internal Server Error), how to fix it
Instead of your site, the browser shows a blunt message: "HTTP ERROR 500", "500 Internal Server Error", or "Internal Server Error". The site does not load at all, often together with the admin panel. It is one of the most common failures website owners bring to us, and one of the most confusing, because the message says nothing about the cause. Below we explain what a 500 error means, how it differs from a WordPress critical error, and how to fix it step by step.
What a 500 error means
500 is a server response code that means roughly "something went wrong on my end, but I cannot tell you what". The server tried to process the request, hit an error, and stopped before it could show anything. Unlike 404 (not found) or 403 (forbidden), a 500 concerns the actual execution of the code or the server configuration.
It is worth distinguishing it right away from the "A critical error has occurred on this website" message. That second one is WordPress's own reaction to a PHP error, so it usually hints at the cause and emails the administrator. A pure 500 error stops the request earlier, at the server level, which is why it can be harder to pin down. If you see the former instead, see our post on the critical error and white screen, where we describe that path.
The most common causes of a 500 error
- A corrupted .htaccess file. A wrong entry in
.htaccess(often after installing a plugin or manual editing) can bring the whole server down with a 500. It is the most common and easiest cause to fix. - Exhausted PHP memory limit. When a script needs more memory than the host allocated, the server aborts with a 500.
- A PHP error in a plugin or theme. A fatal error in an add-on's code, especially after an update or with an incompatible PHP version, ends in a 500.
- An incompatible PHP version. After switching PHP on the host, older code stops working, even if you changed nothing yourself.
- Server security rules (mod_security). An overly aggressive rule on the host's side can block requests with a 500.
- A corrupted WordPress core file. Rarer, but an interrupted update or a replaced file can also produce a 500.
Before you start: make a backup
Before you change anything in the files, back up the files and the database, even just through the hosting panel. If you are not sure how, we describe it in a separate post on website backups. It is five minutes that save you from deepening the failure.
How to fix a 500 error step by step
Start with the most common and simplest. Refresh the site after each step.
- Reset the .htaccess file. Through the file manager in your hosting panel or FTP, rename the
.htaccessfile to, say,.htaccess-old. Refresh the site. If it comes back, the file was to blame. Log into WordPress and, under Settings → Permalinks, click Save to generate a clean.htaccess. - Increase the PHP memory limit. In
wp-config.phpadddefine('WP_MEMORY_LIMIT', '256M');. If memory was the cause, the site will come up. - Disable plugins in bulk. Rename the
wp-content/pluginsfolder toplugins-off. If the error disappears, one of the plugins is to blame. Restore the name and enable them one by one until you find the culprit. - Switch the theme to the default. In the
wp-content/themesfolder, rename the active theme so WordPress falls back to the default. If that helps, the problem is in your theme. - Enable the error log. In
wp-config.phpsetdefine('WP_DEBUG', true);anddefine('WP_DEBUG_LOG', true);. The exact error goes towp-content/debug.log. Also check the server logs in your hosting panel, with a 500 the answer is often there. Turn debug off after the diagnosis. - Check the PHP version and mod_security. In your hosting panel, see whether the PHP version changed, and ask support whether the 500 comes from a server security rule. These are two things you cannot fix from the site alone.
When to hand it to a specialist
If the server log does not point to a clear cause, you have no file access, or the error returns despite your attempts, experimenting further on a live site only prolongs the downtime. We handle exactly these failures, when a site is down: the diagnosis is free, we work on a copy, and we tell you plainly what happened and how long the fix will take. If you want to narrow down the symptom yourself first, the interactive problem diagnosis will help.
Frequently asked questions
How does a 500 error differ from a WordPress "critical error"?
A 500 error is reported by the server before WordPress can show anything, so the message is generic. "A critical error has occurred on this website" comes from WordPress itself, usually hints at the cause, and emails the administrator. The fix steps partly overlap, but with a 500 the culprit is more often .htaccess and the server configuration.
The site worked, then suddenly a 500 error, though I changed nothing. Why?
Usually something changed on the server side: the PHP version, a security rule, or an automatic plugin update in the background. From your perspective nothing happened, yet something switched underneath.
Do I lose data with a 500 error?
No. It is an execution or configuration error, not data loss. Posts, images, and settings stay in place; the fix is about removing the cause.
I have no access to the panel. Can anything be done?
Yes. Resetting .htaccess, editing wp-config.php, disabling plugins, and switching the theme are all done at the file level through the file manager in your hosting panel or FTP, without entering the WordPress panel.