WordPress 500 internal server error: how to fix it
A WordPress 500 internal server error is a generic failure: the server hit a problem it could not describe. The usual fixes are renaming a corrupted .htaccess file, deactivating plugins, switching to a default theme and raising the PHP memory limit. Read the server error log first, because it names the cause.
- The browser gets no detail by design. The server error log holds the real message.
- Rename .htaccess first: it is the quickest test and WordPress rebuilds it.
- Work through plugins, theme, memory and core files in that order.
How do you fix a WordPress 500 error, in order?
- 01
Read the server error log
Your host control panel or /var/log files show the PHP or web server error behind the 500. Start here when you can.
- 02
Rename .htaccess
Over FTP, rename .htaccess to .htaccess_old and reload. If the site returns, go to Settings > Permalinks and save to generate a fresh file (Apache sites).
- 03
Deactivate all plugins
Rename wp-content/plugins, or use Plugins > Deactivate in the dashboard if you can log in. Reactivate one at a time.
- 04
Switch to a default theme
Rename the active theme folder so WordPress falls back to a default theme.
- 05
Raise the PHP memory limit
Set WP_MEMORY_LIMIT in wp-config.php or raise the limit with your host. WordPress documents defaults of 40MB for a single site and 64MB for multisite.
- 06
Re-upload core folders
Replace wp-admin and wp-includes with fresh copies from a clean WordPress download, leaving wp-content and wp-config.php untouched.
How does a 500 differ from other server errors?
| Symptom | Usual meaning | See |
|---|---|---|
| 500 Internal Server Error | Generic server-side failure, often .htaccess, PHP or plugin | This page |
| Blank page with status 200 | Fatal PHP error with display turned off | White screen of death |
| Error establishing a database connection | WordPress cannot reach MySQL | Database connection error |
| 502, 503 or 504 | A proxy or the server is overloaded, down or timing out | 502 Bad Gateway |
Back up before you replace files
WordPress documentation advises a full backup of files and database before any repair or upgrade. Back up even a broken site, so that a wrong guess does not make recovery harder.
What does a default .htaccess look like?
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPressWordPress documents its rewrite rules in the .htaccess reference. Nginx sites have no .htaccess, so a 500 there comes from the server config or PHP-FPM.
What should you check after the site returns?
- Re-save Settings > Permalinks so rewrite rules are current
- Test the checkout, forms and login, not only the home page
- Note the cause and fix in the client maintenance log
- Keep an uptime alert on the site so a repeat is caught within minutes
Common questions
What causes a 500 internal server error in WordPress?
The common causes in WordPress documentation are a corrupted .htaccess file, a faulty plugin, a faulty theme, an exhausted PHP memory limit and damaged core files. The server log usually points to which one.
Is a 500 error my fault or my host fault?
Either. A 500 caused by .htaccess, a plugin or a theme is a site-level issue. A 500 across many sites on one server, or one that appears with no recent change, points to the host. Check the host status page and ask support with the log time.
Will renaming .htaccess break my site?
Not permanently. Without it, pretty permalinks may stop working on Apache until WordPress writes a new file. Saving Settings > Permalinks regenerates the default rules. Keep the old copy in case it held custom rules.
Why does the 500 error come and go?
Intermittent 500s usually mean resource limits: memory, PHP workers or database connections hit under load. Check host resource graphs at the failure times, and monitor from several regions so you see when and how often it fails.
Does a 500 error hurt SEO?
A brief 500 is rarely a problem, since crawlers can retry later. A 500 that lasts for hours or days means lost visitors, failed crawls and lost sales. Fix it quickly and keep an uptime alert running so you know when it starts.
Keep reading
Watch your domains automatically
Aepto monitors expiry, DNS, SSL and uptime for every domain you own and alerts you when something changes. Free for 3 domains.