How to Fix 500 Internal Server Error in WordPress (8 Ways)

Your site was working. Now it just says “500 Internal Server Error” — and sometimes wp-admin is down too.
Don’t reinstall anything. Your posts and images are almost always still there. In most cases, one small thing broke: a bad .htaccess file, one plugin that just updated, or WordPress running out of memory.
Work through the fixes below in order. Reload your site after each one. Stop as soon as it comes back.
First, ask: what changed last?
Before you touch anything, think back 5 minutes.
– Did you just update a plugin? Start at Fix 3.
– Did you just update your theme? Start at Fix 4.
– Did you just change the PHP version in hosting? Start at Fix 8.
– Did you just edit .htaccess or wp-config.php? Start at Fix 1 or 2.
If you don’t know, start at Fix 1. It takes 2 minutes.
And take a backup first, if you can. In hosting, download .htaccess and wp-config.php. That’s it — don’t skip this, because you will be renaming files below.
Fix 1 — Rename .htaccess
This fixes a lot of 500 errors, and it’s the fastest check.
1. In hosting File Manager, go to public_html. Turn on “Show Hidden Files” if you can’t see .htaccess.
2. Rename .htaccess to .htaccess_old.
3. Reload your site.
If it loads, that file was the problem. Go to WordPress Settings → Permalinks and click Save Changes. WordPress will make a clean .htaccess for you.
If it still doesn’t load, rename .htaccess_old back to .htaccess and move on.
No .htaccess file at all? You’re probably on Nginx hosting. Skip this fix.
Fix 2 — Give WordPress more memory
A heavy plugin or an update can hit the PHP memory limit and crash the site with a 500.
1. In File Manager, open wp-config.php.
2. Just above the line that says /* That’s all, stop editing! Happy publishing. */, add this:
define( 'WP_MEMORY_LIMIT', '256M' );
3. Save and reload.
If that doesn’t help, your host may cap memory in the hosting panel instead. Look for PHP Settings or Select PHP Version, raise memory_limit there, and reload again.
Fix 3 — Find the bad plugin
This is the most common cause after an update — for example, after updating WooCommerce, Elementor, or a security plugin.
If wp-admin still works: Go to Plugins, select all, Deactivate. Reload your site. Then turn plugins back on one by one, reloading after each one. When the error comes back, the last plugin you turned on is the problem. Leave it off.
If wp-admin is also down: 1. In File Manager, go to wp-content and rename the plugins folder to plugins_old. 2. Reload. If the site loads, a plugin was the cause. 3. Rename the folder back to plugins, then in wp-admin turn plugins on one by one until you find the bad one.
Don’t turn them all back on at once — that just brings the error back and tells you nothing.
Fix 4 — Test your theme
Same idea as plugins, but for the theme.
If wp-admin works: Appearance → Themes, switch to Twenty Twenty-Four or Twenty Twenty-Five. Reload. If the site works, your old theme is the problem.
If wp-admin is down: in File Manager, go to wp-content/themes and rename your theme folder, for example mytheme to mytheme_old. WordPress will fall back to a default theme. If you don’t have a default theme installed, download one from wordpress.org first.
Fix 5 — Read the real error in the debug log
By now you’ve ruled out the quick causes. Stop guessing — read the log. It will literally name the plugin or file that broke.
1. In wp-config.php, add these three lines above /* That’s all, stop editing! */:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
2. Reload your site 2-3 times.
3. Open wp-content/debug.log in File Manager. Look at the bottom for a line starting with PHP Fatal error.
A real example looks like this:
PHP Fatal error: Allowed memory size exhausted in /wp-content/plugins/some-plugin/file.php
That path is your answer. Fix, update, or remove that plugin or theme.
When you’re done, turn debug off — set WP_DEBUG back to false and delete debug.log. Never leave it running on a live site.
Fix 6 — Check permissions
This one is quick. In File Manager, check: Folders: 755, Files: 644, wp-config.php: 640 or 644. Never use 777. It doesn’t fix a 500, and it’s a security risk.
Fix 7 — Replace broken core files
If a core file got corrupted in a failed update, replace it with a clean copy.
Download fresh WordPress from wordpress.org, unzip it, and upload only the wp-admin and wp-includes folders over the ones on your site.
Do NOT overwrite wp-content and do NOT overwrite wp-config.php. Those hold your content and your database login. Reload.
Fix 8 — Check PHP version, then ask your host
In hosting, open Select PHP Version. WordPress needs PHP 7.4 or higher — 8.1 to 8.3 is safe for most sites right now.
If you just changed the PHP version and the error started, change it back one version and reload.
Still down? Send your host this, with the fatal error line from Fix 5:
My WordPress site shows a 500 Internal Server Error since [time]. My debug log shows [paste the PHP Fatal error line]. Can you check the server error log and whether anything changed on the server or my PHP version?
That one message gets you a faster answer than just saying “site down.”
How to stop this happening again
– Update plugins one at a time, and check the site after each one.
– Keep one default WordPress theme installed, even if you never use it. It’s your free test.
– Keep a backup running, and test restoring it once.
– Don’t edit .htaccess or wp-config.php without downloading a copy first.
Quick answers
Will I lose my posts? Almost never. They’re in the database, your images are in wp-content/uploads. None of these fixes delete them.
How long does it take? 10-15 minutes if it’s .htaccess or a plugin. Another 10 minutes to read the debug log.
Site and wp-admin both down? Start at Fix 1 and use File Manager for every step. You don’t need wp-admin to fix this.
I just see a white screen, no 500 message? Same problem, same fixes. A white screen is just a 500 with error display turned off.
That is the full fix. If this got your site back, bookmark it.
And if your other WordPress problem is “Error Establishing a Database Connection”, that fix is Post #1 here: https://connectdigitalworld.com/fix-error-establishing-database-connection-wordpress/
