The Developer's EdgeNovember 29, 2026 · 6 min read

WordPress Error 500: A Calm, Step-by-Step Fix

WordPress error 500? Check your error logs, then test .htaccess, plugins, themes, memory and PHP settings one step at a time.

M

Murad Raza

Freelance Full-Stack Developer

WordPress Error 500: A Calm, Step-by-Step Fix

A WordPress error 500 means the server hit a problem it could not handle, so it sent an "Internal Server Error" page. Common causes are a damaged .htaccess file, a plugin or theme crash, low PHP memory, or code that does not support your PHP version. Back up, then read the logs.

I'm Murad Raza, a freelance web developer who has built WordPress sites since 2022. The core steps use WordPress and MDN documentation plus WordPress core code, checked on 29 November 2026. The table, example memory value and precautions are my guidance, not test results.

Key Takeaways

  • WordPress and server logs can help identify the cause.
  • If no table row fits, work through Steps 3 to 6 in order.
  • Change one thing at a time, and undo changes that do not help.

What a 500 error tells you

MDN calls it a "generic 'catch-all' response", used when the server cannot find a more specific error.

The WordPress common errors guide links the related "critical error" message to plugins, themes, PHP versions, memory and corrupted files.

Do Steps 1 and 2. If the logs are unclear, use this table:

What happened just beforePossible causeGo to
Plugin or theme changePlugin or theme crashStep 4
Permalink or security plugin changeDamaged .htaccessStep 3
PHP upgradeOld plugin or theme codeStep 6
Large importMemory limit; confirm in the logStep 5

Step 1: Back up and check your admin email

Use your host's backup tool to save your files and database. In its file manager or FTP app, show hidden files, then download wp-config.php and any .htaccess. If an edit causes a new error, restore that copy.

Check your WordPress admin email. A fatal error can trigger a recovery mode link. It pauses the crashing plugin or theme for your browser only, so visitors may see the error until you fix or deactivate it. Emails are rate-limited and cover login and admin crashes, not every page, so no email proves little.

Step 2: Read the error logs

Ask your host for the server error log. WordPress can keep one too, but debug.log may be publicly readable. Ask your host to block access first, and log briefly.

Based on the WordPress debugging guide, put these lines in wp-config.php above "That's all, stop editing!" Edit any that already exist:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Reload the broken page. In wp-content/debug.log, find a "Fatal error" or "Parse error" from that moment. A made-up example:

PHP Fatal error: ... in /wp-content/plugins/example-plugin/file.php
  • A plugins or themes path suggests where to start in Step 4.
  • "Allowed memory size" with "exhausted" means Step 5.
  • An .htaccess message points to Step 3.
  • If debug.log is empty or missing, use the server log.

Step 3: Test the .htaccess file

The common errors guide calls a corrupted .htaccess file "the most likely issue". Skip this step if your server does not use one, such as Nginx alone.

Renaming it temporarily removes custom redirects, security rules and host PHP settings inside. If you rely on those, or only inner pages fail, ask your host instead.

  1. Rename it to .htaccess_old and test the homepage and login page. Inner pages may show a 404 for now.
  2. If the error remains, restore the original name and move on.
  3. If the failed page now loads, go to Settings > Permalinks and click Save Changes.
  4. If WordPress cannot create the file, add the default rules that match your setup. Multisite rules differ.

Keep the old file and ask your host or developer which custom rules to restore.

Step 4: Isolate the plugin or theme

If the log names one plugin, deactivate it. Without dashboard access, rename only its folder inside wp-content/plugins, open the Plugins screen to deactivate it, then restore the folder name.

Test every plugin only if the log gives no clue. This can stop shop orders and remove security protection, so use staging (a private test copy) or a maintenance window. Note which are active. If the dashboard works, deactivate them all, then reactivate one at a time. If not, the WordPress troubleshooting FAQ gives this method:

  1. Rename wp-content/plugins to plugins.hold.
  2. Log in and open the Plugins screen, which deactivates the missing plugins.
  3. Rename the folder back to plugins.
  4. Reactivate plugins one at a time, testing after each.

If the error remains with plugins off, restore the folder name and any plugins you turned off, then check the theme.

Otherwise, leave the faulty plugin off, but do not delete it, as that can remove its data. Update it, or ask its developer about a safe rollback, then test it.

For a theme crash, check that a default theme (a twenty... folder in wp-content/themes) is installed, then activate it under Appearance > Themes. If you are locked out, rename the active theme's folder and load /wp-admin/themes.php, which switches to a default theme. Restore the old folder's name, but keep the default active until the old theme is fixed.

Step 5: Check the PHP memory limit

The log shows the limit in bytes: 268435456 is 256M. If it is already 256M or more, have the plugin, theme or import checked before raising it.

If a public page hit a lower limit, set this example value above the "stop editing" line, editing any existing entry:

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

Admin screens can use a separate limit, WP_MAX_MEMORY_LIMIT, which defaults to at least 256M if PHP allows changes. If an admin page stops below that, ask your host.

Step 6: Check PHP and core files

WordPress recommends PHP 8.3 or greater, but old code can fail on newer versions. Update the faulty plugin or theme. If you are locked out, use Step 4 or ask your host for the previous PHP version, if it still gets security updates.

If files change and nobody knows why, check for a hacked WordPress site before replacing anything. Errors in wp-admin or wp-includes can still start in a plugin, so check the full log entry. If your host confirms core damage, re-upload both folders from the official release it recommends. Leave wp-content and wp-config.php alone.

Get help

Contact your host if every site on your account fails, or the server log mentions permissions. For database messages, see the database connection guide.

Clean up

Exit recovery mode if you used it. Set WP_DEBUG to false, restore or remove the other two debug lines and delete debug.log.

My website maintenance plan covers updates, backups and monitoring.

Frequently asked questions

01Is a WordPress 500 error my host's fault?
It can be, but plugins, themes and .htaccess rules cause it too. Your host can check the server log.
02Will fixing a 500 error delete my content?
These steps should not delete posts, pages or orders, but they change files and some database settings. Back up first.

Need this fixed on your site?

I Build Websites That Work as Hard as You Do

Start a project

Have a project in mind?
Let's build it right.

Two project slots open right now. Tell me what you're building and I'll reply within two business days.