WordPress 500 Internal Server Error: 5 Fixes That Work (2026)

Rows of white server cabinets in a modern data center

A 500 Internal Server Error means the server hit a problem it could not describe. In WordPress, the most likely cause is a corrupted .htaccess file. Rename it, reload the site, and if that works, resave your permalinks. If not, deactivate all plugins, switch to a default theme, raise the memory limit, then replace wp-admin and wp-includes with fresh copies.

That order comes from the official WordPress handbook, and it is also the cheapest order: each step is faster and safer than the next. This guide walks through it, adds a way to read the real error behind the message, and tells you when to stop and call your host.

What a 500 Error Means

The message is generic on purpose. The server knows something broke but not what to tell visitors. The WordPress handbook says there can be a number of reasons for it, so the job is to narrow them down. The causes it lists are a corrupted .htaccess file, a plugin problem, a theme problem, a low PHP memory limit and damaged core folders.

Quick Diagnosis

What happened just before Most likely cause Start with
You edited .htaccess or changed permalinks Corrupted .htaccess Fix 1
You updated or installed a plugin Plugin conflict Fix 2
You activated or updated a theme Theme problem Fix 3
Error appears on heavy pages or imports Memory limit Fix 4
A core update failed halfway Damaged core files Fix 5

Before You Start

Take a backup of your files and database, or work on a staging copy. You will rename and replace files, and a restore point makes every step reversible. You need FTP or your host’s file manager, because the dashboard may be unreachable.

Fix 1: Rename the .htaccess File

The handbook calls a corrupted .htaccess file the most likely issue. Connect to your site root by FTP and rename .htaccess to .htaccess_old. Load your site. If it works, go to Settings > Permalinks and save, which makes WordPress generate a fresh .htaccess file for you.

Renaming keeps your old file, so you can compare the two later if a custom rule was inside it.

Fix 2: Deactivate All Plugins

If the dashboard loads, deactivate every plugin, check the site, then reactivate them one by one. If you cannot log in, use FTP: open wp-content and rename the plugins folder to plugins_old. That deactivates everything. Rename it back, then rename each plugin folder inside it one at a time to find the guilty one.

When a plugin update caused the error, also check the plugin’s support page for the same report before you update again.

Fix 3: Switch to a Default Theme

Activate a default WordPress theme such as Twenty Twenty-One or a newer default. Without dashboard access, rename the active theme’s folder inside wp-content/themes through FTP, and WordPress falls back to an installed default theme. If the error disappears, the theme or a child theme customization is the cause. Compare our hosting guide if the same theme keeps timing out on a weak plan.

Fix 4: Increase the PHP Memory Limit

The handbook lists increasing the memory limit as a fix, and says shared hosts may need to raise it for you. In wp-config.php, above the comment that says to stop editing, you can add:

define( 'WP_MEMORY_LIMIT', '256M' );

If the limit does not change, your host is capping it, so ask them to raise it. A very low limit is only one cause, so do not stop here if the error stays.

Fix 5: Replace wp-admin and wp-includes

Download a fresh copy of WordPress from wordpress.org and upload new wp-admin and wp-includes folders over the old ones. Do not overwrite wp-content or wp-config.php. Those hold your themes, plugins, uploads and database details.

Read the Real Error With Debug Logging

If none of the five fixes works, find the actual error. The official debugging guide gives this setup, which writes errors to wp-content/debug.log instead of showing them to visitors:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

Reload the broken page, then open wp-content/debug.log. The last lines usually name a file and line, which points to a plugin, theme or missing function. The guide warns that debug tools are meant for local testing and staging, so remove these lines once you have the answer.

When to Contact Your Host

If renaming .htaccess, disabling plugins and themes, raising memory and replacing core folders do not help, the cause may be on the server side. Send your host the time the error began, the last lines of debug.log and what you already tried. Related errors have their own guides: see the white screen of death and the database connection error.

How to Prevent It

  • Back up before every plugin, theme or core update.
  • Update one plugin at a time on busy sites, so a failure has one suspect.
  • Test big changes on a staging copy first.
  • Keep .htaccess edits small and keep a copy of the working file.

Verified Facts and Sources

The five fixes and their order come from the WordPress handbook page on common errors, last updated October 14, 2026. The debugging constants come from the handbook’s debugging guide. We did not test these steps on a broken site for this article, so we describe the documented behavior only.

Frequently Asked Questions

What causes a 500 error in WordPress?

The handbook lists a corrupted .htaccess file as most likely, then plugin or theme problems, a low memory limit and damaged core folders.

Will renaming .htaccess delete my settings?

No. Renaming keeps the file as .htaccess_old. After the site works, saving permalinks creates a new one.

How do I fix a 500 error if I cannot log in?

Use FTP or your host’s file manager. Rename .htaccess, rename the plugins folder, or rename the active theme folder, then reload.

Should I leave WP_DEBUG on?

No. The official guide says debug tools are for local and staging sites, not live ones.

Updated December 1, 2026.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *