500 Internal Server Error
Symptoms
You hit your site and got a blank page or a generic “Internal Server Error” message. The 500 error is WordPress’s way of saying “something broke on the server, but I have no idea what.” It’s the most common and least helpful error in WordPress — the server knows it failed but won’t tell you why without some digging.
What Causes 500 Internal Server Error?
- Corrupted
.htaccessfile — A bad rewrite rule or a plugin that wrote garbage into your.htaccesswill kill the entire site instantly. - PHP memory limit exhausted — Your server ran out of memory mid-execution. Common with bloated themes and too many plugins.
- Broken plugin or theme — A fatal PHP error in a plugin or theme crashes the whole request. This is the #1 cause after updates.
- Corrupted WordPress core files — Missing or damaged core files from a failed update or bad FTP transfer.
- PHP version incompatibility — Running a plugin built for PHP 8.2 on a server still stuck on PHP 7.4, or vice versa.
How to Fix It
Step 1: Check the Error Log
You can’t fix what you can’t see. Enable WordPress debug logging first.
Open wp-config.php via FTP or SSH and add these lines before the /* That's all, stop editing! */ comment:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Reload the broken page, then check wp-content/debug.log for the actual PHP error. This file tells you exactly which file and line number caused the crash. Skip this step if you want headaches later — flying blind with a 500 error is a waste of time.
Step 2: Rename .htaccess
The fastest fix to try first. Connect via FTP or SSH and rename your .htaccess file:
cd /var/www/html # or your WordPress root
mv.htaccess.htaccess.bak
Now reload your site. If it works, your .htaccess was corrupted. Generate a fresh one by going to Settings → Permalinks in your WordPress admin and clicking Save Changes. WordPress writes a clean .htaccess automatically.
Step 3: Deactivate All Plugins
If .htaccess wasn’t the problem, a plugin is the likely culprit. You can’t access the admin? No problem — rename the plugins folder via FTP:
mv wp-content/plugins wp-content/plugins_disabled
Or if you have WP-CLI access:
wp plugin deactivate --all
If your site loads after this, reactivate plugins one at a time to find the offender:
wp plugin activate plugin-name
The right way to do this: activate one, reload the site, check for the error. Repeat. When the 500 returns, you’ve found your broken plugin. Delete it or contact the developer.
Step 4: Switch to a Default Theme
Still broken after deactivating plugins? Your theme might be the problem. Rename your active theme’s folder:
mv wp-content/themes/your-theme wp-content/themes/your-theme-broken
WordPress will fall back to Twenty Twenty-Five or whatever default theme is installed. If that fixes it, your theme has a fatal error — check debug.log for the specific line.
Step 5: Increase PHP Memory Limit
If the debug log shows a “memory exhausted” error, bump the limit. Add this to wp-config.php:
define( 'WP_MEMORY_LIMIT', '256M' );
You may also need to set it in your .htaccess:
php_value memory_limit 256M
Or in a php.ini file in your WordPress root:
memory_limit = 256M
Which method works depends on your host. If none of these stick, contact your hosting provider — some shared hosts lock this down.
Step 6: Reinstall WordPress Core
If nothing above works, your core files may be damaged. WP-CLI makes this clean:
wp core download --skip-content --force
This replaces all core files without touching your wp-content folder. Your themes, plugins, and uploads stay intact. If you don’t have WP-CLI, download a fresh copy from wordpress.org, extract it, and upload everything except the wp-content folder via FTP.
Prevention
- Stage updates before going live. Never update plugins, themes, or core on a production site without testing first. Use a staging environment — hosts like Kinsta and WP Engine include one-click staging.
- Keep PHP updated. Run PHP 8.1+ and make sure your plugins support it. Most 500 errors from “random” plugin crashes trace back to PHP version mismatches.
- Limit your plugin count. Every plugin is a potential point of failure. If you’re running 30+ plugins, audit them quarterly. Deactivate and delete anything you’re not actively using.
- Set up uptime monitoring. Use a free tool like UptimeRobot to alert you within minutes of a 500 error. Your visitors shouldn’t be the ones telling you your site is down.
Last verified: April 2026
Related reading
- plugin
- theme
- WP Engine Review 2026: Is the Premium WordPress Host Still Worth $30/mo?
- wordpress-core
- Kinsta Review 2026: Premium WordPress Hosting Worth $35/Month?
- Kinsta vs WP Engine (2026): Premium Managed Hosting Compared
- wp-cli
- Cloudways vs Kinsta (2026): Cloud Hosting Compared
- WordPress.com vs WordPress.org (2026): Which Should You Use?