Skip to main content
WordPress TroubleshootingMay 26, 2026

How to Fix 500 Internal Server Error in WordPress 2026

Fix the WordPress 500 Internal Server Error safely with .htaccess checks, plugin tests, debug logs, PHP memory, and server-level steps.

Category: WordPress Troubleshooting

How to Fix 500 Internal Server Error in WordPress

A 500 Internal Server Error in WordPress means the server failed while trying to load your website, but it could not show a more specific error message. That makes it frustrating because the browser may only show “HTTP Error 500,” “Internal Server Error,” or a blank server error page without telling you what actually broke.

The good news is that most WordPress 500 errors are fixable. The cause is usually a broken .htaccess file, plugin conflict, theme error, PHP memory limit, incompatible PHP version, failed update, custom code issue, or server configuration problem. This guide shows you how to troubleshoot the error safely and restore your site without random guessing.

TL;DR: Fastest Safe Fix

To fix a WordPress 500 Internal Server Error, first refresh once and check whether the issue is temporary. Then rename your .htaccess file, disable plugins by renaming the wp-content/plugins folder, switch to a default theme, enable private debug logging in wp-config.php, check the PHP/server error log, increase memory if needed, and verify your PHP version. The fastest real fix usually comes from reading the first fatal error in the log instead of changing settings blindly.

What Is a 500 Internal Server Error in WordPress?

A 500 Internal Server Error is a general server-side error. In WordPress, it means the server encountered a problem while processing the request, but the exact cause was not displayed in the browser.

Unlike a 404 error, which usually means a page was not found, a 500 error usually means something failed behind the scenes. The problem may come from WordPress, a plugin, a theme, PHP, .htaccess, file permissions, server limits, or hosting configuration.

Common ways this error appears

  • 500 Internal Server Error
  • HTTP Error 500
  • This page isn’t working
  • The server encountered an internal error
  • A blank page with a 500 status code
  • A 500 error only inside wp-admin
  • A 500 error only during checkout, login, media upload, or plugin update

External reference: You can read Mozilla’s HTTP status explanation here: MDN Web Docs: 500 Internal Server Error.

What Usually Causes a WordPress 500 Error?

A 500 error is not one single WordPress problem. It is a generic result caused by different backend failures. The fastest way to fix it is to narrow the cause step by step.

Most common causes include:

  • Corrupted .htaccess file: Bad rewrite rules, plugin-added rules, redirect loops, or malformed directives can trigger server errors on Apache or LiteSpeed.
  • Plugin conflict: A security plugin, cache plugin, page builder, WooCommerce extension, backup plugin, or recently updated plugin may cause a fatal PHP error.
  • Theme error: A broken theme file, child theme edit, template override, or functions.php mistake can stop WordPress from loading.
  • PHP memory limit: WordPress may hit memory limits during imports, backups, updates, WooCommerce processes, image handling, or page builder editing.
  • PHP version mismatch: A plugin or theme may not support the active PHP version.
  • Failed update: Incomplete WordPress, plugin, or theme updates can leave missing or corrupted files.
  • Wrong file permissions: Incorrect permissions can stop PHP or the web server from reading required files.
  • Server configuration issue: PHP-FPM, Apache, Nginx, LiteSpeed, ModSecurity, timeout limits, or hosting-level restrictions may be involved.

Before You Start: Do These Safety Checks

Do not delete files immediately. A 500 error can often be fixed by renaming files or folders temporarily, reading logs, and reversing the change if needed.

Safety checklist:

  • Take a full file and database backup if your hosting panel still allows it.
  • Write down what changed recently: plugin update, theme update, PHP change, migration, security rule, or custom code edit.
  • Check whether the error affects the whole site, only wp-admin, or only one URL.
  • Do not restore an old database on WooCommerce, LMS, booking, or membership sites unless you understand the data loss risk.
  • Use hosting File Manager, SFTP, or SSH instead of editing blindly from the WordPress dashboard.
  • Keep a copy of any file before editing it, especially .htaccess and wp-config.php.

If you already have a server log or PHP error log, you can paste the relevant section into the FyrePress Server Log Analyzer to quickly understand whether the issue points to a plugin, theme, memory problem, permission issue, or server rule.

Fix 1: Refresh Once and Check If the Error Is Temporary

Sometimes a 500 error appears because of a temporary server process failure, overloaded PHP worker, short timeout, or cached failed request. Refresh the page once in a private browser window.

Do this first:

  1. Open the page in an incognito/private window.
  2. Refresh once.
  3. Try another important URL, such as your homepage, login page, or a static page.
  4. Check whether the error appears for all visitors or only for logged-in users.

If the error disappears immediately, monitor the site and check logs anyway. Temporary 500 errors can still indicate high resource usage, plugin timeouts, cron issues, or server overload.

If the error happens during checkout or payment, do not keep retrying the same transaction. First confirm whether an order, payment attempt, or invoice was already created.

Fix 2: Check and Reset the .htaccess File

On Apache and LiteSpeed servers, .htaccess is one of the first things to check. A corrupted or malformed .htaccess file can break the whole site before WordPress fully loads.

How to reset .htaccess safely:

  1. Open your hosting File Manager or connect with SFTP.
  2. Go to the WordPress root directory, usually public_html or your domain folder.
  3. Find the .htaccess file.
  4. Download a backup copy to your computer.
  5. Rename .htaccess to .htaccess-old.
  6. Reload your website.
.htaccess
.htaccess-old

If the site loads after renaming .htaccess, the file was likely the problem. Next, create a clean default WordPress .htaccess file.

Default WordPress .htaccess rules:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

After restoring access, go to Settings → Permalinks in WordPress and click Save Changes to regenerate rewrite rules.

FyrePress tool: Use the FyrePress .htaccess Security Builder when you need safer WordPress-ready .htaccess rules for Apache or LiteSpeed environments.

Related FyrePress guide: Nginx vs Apache for WordPress.

Fix 3: Disable All Plugins Manually

If .htaccess is not the issue, plugins are the next major suspect. A plugin can trigger a 500 error after an update, PHP version change, database query failure, missing file, or conflict with another plugin.

How to disable all plugins without wp-admin:

  1. Open your hosting File Manager or connect using SFTP.
  2. Go to your WordPress installation folder.
  3. Open wp-content.
  4. Rename the plugins folder to plugins-disabled.
  5. Reload your website.
wp-content/plugins
wp-content/plugins-disabled

If the website starts working, one plugin is causing the 500 error. Rename the folder back to plugins, then disable plugins one by one by renaming individual plugin folders.

How to find the broken plugin:

  1. Rename plugins-disabled back to plugins.
  2. Open the plugins folder.
  3. Rename one plugin folder at a time.
  4. Reload the website after each change.
  5. The plugin that restores the site after being renamed is likely the cause.

After finding the plugin, check its latest update, support forum, changelog, PHP compatibility, and WordPress compatibility. Do not reinstall the same broken version blindly.

Related FyrePress guide: WordPress Plugin Compatibility Checklist.

Fix 4: Switch to a Default WordPress Theme

If plugins are not the cause, your active theme or child theme may be triggering the 500 error. This is common after editing functions.php, updating a premium theme, adding template overrides, or using unsupported PHP syntax.

If wp-admin works:

  1. Go to Appearance → Themes.
  2. Activate a default WordPress theme.
  3. Reload the broken page.

If wp-admin does not work:

  1. Open File Manager or connect with SFTP.
  2. Go to wp-content/themes.
  3. Rename your active theme folder.
  4. Reload the site.

If WordPress has a default theme installed, it may fall back to that theme. If the error disappears, inspect your active theme, child theme, template files, and custom functions.

Related FyrePress guide: Create a WordPress Staging Site Before Updates.

Fix 5: Enable WordPress Debug Logging

A 500 error is too generic to diagnose from the browser alone. Debug logging helps reveal the actual PHP warning, fatal error, missing file, class conflict, memory issue, or plugin path behind the failure.

Open wp-config.php and add these lines before the final comment that says That's all, stop editing!:

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

Then reload the page that shows the 500 error once. After that, check:

  • wp-content/debug.log
  • PHP error logs in your hosting panel
  • LiteSpeed, Apache, Nginx, or PHP-FPM logs
  • WooCommerce logs if the issue happens during checkout
  • Security plugin logs if the error started after firewall changes

Example fatal error clue:

PHP Fatal error: Uncaught Error: Call to undefined function example_function()
in /wp-content/plugins/example-plugin/includes/class-loader.php on line 58

In this example, the file path points to example-plugin. That means the plugin should be disabled, updated, rolled back, or replaced.

External reference: WordPress documents the official debugging constants here: Debugging in WordPress.

FyrePress tool: Use the FyrePress wp-config.php Builder to generate debug, memory, update, SSL, and security constants safely.

Fix 6: Increase the PHP Memory Limit

If the 500 error appears during media uploads, imports, backups, WooCommerce actions, Elementor editing, plugin updates, or admin tasks, your site may be hitting the PHP memory limit.

Add these constants to wp-config.php before the final stop-editing line:

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

This helps WordPress request more memory, but your hosting PHP configuration must also allow it. If the server-level memory_limit is lower, you may need to increase it from your hosting panel, php.ini, .user.ini, or by asking your host.

Related FyrePress guide: How to Fix “Allowed Memory Size Exhausted” in WordPress.

Important: increasing memory can restore access, but it may not fix the root cause. If a plugin or process keeps consuming too much memory, check the error log and isolate the heavy component.

Fix 7: Check the PHP Version

A WordPress 500 error can appear after switching PHP versions. Older plugins may fail on newer PHP versions, while modern plugins may not work properly on outdated PHP versions.

Check these questions:

  • Did the error start after changing PHP?
  • Did your hosting provider recently upgrade PHP automatically?
  • Does the error log mention syntax errors, type errors, deprecated functions, or missing classes?
  • Do your active plugins and theme support the current PHP version?
  • Does the issue disappear if you temporarily switch back to the previous PHP version?

If the site broke immediately after a PHP change, temporarily switch back to the previous working version from your hosting panel. Then update or replace the incompatible plugin, theme, or custom code.

Related FyrePress guide: WordPress PHP Requirements Explained.

Fix 8: Check File and Folder Permissions

Incorrect file permissions can cause WordPress to fail when reading or executing files. This is especially common after migrations, manual uploads, ownership changes, or server moves.

Typical WordPress permissions:

  • Folders: 755
  • Files: 644
  • wp-config.php: often 600 or 640, depending on hosting setup

Avoid setting everything to 777. That is insecure and can create bigger problems. If you suspect ownership issues, ask your host to check the user/group ownership of your WordPress files.

Fix 9: Disable Custom Code Snippets

Custom PHP snippets can easily trigger a 500 error if they contain a syntax error, duplicate function name, wrong hook, missing dependency, or unsupported PHP feature.

Check these locations:

  • wp-content/themes/your-theme/functions.php
  • wp-content/themes/your-child-theme/functions.php
  • wp-content/mu-plugins
  • Custom functionality plugins
  • Code snippets plugin entries

If the 500 error started right after adding a snippet, remove the last code change or comment it out. Even one missing semicolon can break the entire request.

Fix 10: Reinstall WordPress Core Files

If the error started after a failed WordPress update and plugins, themes, memory, PHP, and .htaccess are not the cause, WordPress core files may be incomplete or corrupted.

If wp-admin works:

  1. Go to Dashboard → Updates.
  2. Click Re-install for the current WordPress version.
  3. Clear cache and test the site.

If wp-admin does not work:

  1. Download a fresh copy from WordPress.org.
  2. Extract the files locally.
  3. Upload fresh WordPress core files using SFTP or File Manager.
  4. Do not overwrite wp-config.php.
  5. Do not overwrite the wp-content folder.

This is more advanced. If you are not comfortable replacing files manually, ask your hosting provider or developer to help.

Fix 11: Check ModSecurity, Firewall, and Server Rules

Sometimes a WordPress 500 error is not caused by WordPress itself. Hosting firewalls, ModSecurity rules, blocked requests, or server-level restrictions can break specific admin actions, form submissions, REST API requests, checkout pages, or page builder saves.

Signs this may be the cause:

  • The error appears only when saving a page.
  • The error appears only when submitting a form.
  • The error appears only during checkout.
  • The error appears only when uploading media.
  • The error appears after adding security or bot-blocking rules.
  • The error log mentions ModSecurity, forbidden rules, or request body limits.

If this happens, ask your host to check the web server logs, ModSecurity audit log, PHP-FPM log, and WAF rules for the exact request that triggered the 500 error.

Related FyrePress guide: Block Malicious Bots with .htaccess.

WordPress 500 Error vs 502, 503, and 504 Errors

A 500 error is generic, but it is not the same as every server error. Knowing the difference can help you troubleshoot faster.

Error Meaning Common WordPress Cause
500 Internal Server Error Generic server-side failure Plugin, theme, .htaccess, PHP, memory, or server config issue
502 Bad Gateway Invalid response from upstream server PHP-FPM, proxy, CDN, or hosting stack problem
503 Service Unavailable Server temporarily unavailable Maintenance mode, overload, resource limits, or failed update
504 Gateway Timeout Server request timed out Long-running PHP process, slow query, import, backup, or external API call

If your browser shows different 5xx errors at different times, the issue may involve server load, PHP workers, proxy/CDN configuration, timeout limits, or external service calls.

Best Fix Method by User Type

The best troubleshooting path depends on your access level and the type of website you manage.

For beginners

Start with the simplest safe steps: refresh once, ask your host for the PHP error log, rename .htaccess, and disable plugins from File Manager. Avoid editing database tables or deleting files.

For site owners with File Manager access

Rename .htaccess first, then rename the plugins folder. These two steps fix many WordPress 500 errors and are easy to reverse.

For developers

Enable private debug logging, reproduce the error once, inspect the first fatal error, then fix the exact file, hook, class, function, memory issue, permission issue, or server rule named in the logs.

For WooCommerce, LMS, and membership sites

Avoid restoring old database backups unless absolutely necessary. Orders, payments, subscriptions, bookings, user registrations, and course progress may have changed after the backup was created. Use targeted file/plugin/theme fixes first.

How to Prevent WordPress 500 Errors

You cannot prevent every server error, but you can reduce the risk with a safer maintenance workflow.

Prevention checklist:

  • Use a staging site before major WordPress, plugin, theme, or PHP updates.
  • Keep verified full backups before updates.
  • Update plugins and themes in small batches.
  • Check plugin and theme compatibility before changing PHP versions.
  • Keep a copy of your working .htaccess file.
  • Avoid adding untested PHP snippets to a live site.
  • Remove abandoned plugins and unused themes.
  • Monitor PHP error logs after major changes.
  • Keep memory limits realistic for your site type.
  • Test login, checkout, forms, search, mobile pages, and admin editing after updates.

Related FyrePress guide: Safely Update WordPress Without Issues.

Final Recommendation

The safest way to fix a WordPress 500 Internal Server Error is to work from the most reversible fixes to the most advanced ones. Start with .htaccess, plugins, themes, and debug logs. Then check memory, PHP version, file permissions, custom code, core files, and server rules.

Do not treat a 500 error as a mystery. It almost always leaves a clue in the PHP or server error log. Once you find the exact file path or fatal error, you can fix the real cause instead of guessing.

Frequently Asked Questions

What causes a 500 Internal Server Error in WordPress?

The most common causes are a corrupted .htaccess file, plugin conflict, theme error, PHP memory limit, incompatible PHP version, failed update, wrong file permissions, custom code error, or server configuration issue.

Can I fix a WordPress 500 error without wp-admin?

Yes. You can use hosting File Manager, SFTP, or SSH to rename .htaccess, disable plugins, switch themes, edit wp-config.php, enable debug logging, and check error logs without accessing the WordPress dashboard.

Will resetting .htaccess delete my website?

No. Renaming or regenerating .htaccess does not delete your website content. It only changes server rewrite rules. Always keep a backup copy before editing the file.

Why does WordPress show a 500 error only in wp-admin?

A 500 error only in wp-admin may be caused by an admin-only plugin, security rule, dashboard widget, memory limit, PHP error triggered for logged-in users, or a plugin update process that failed.

How do I find the exact cause of a WordPress 500 error?

Enable private debug logging in wp-config.php, reload the broken page once, then check wp-content/debug.log or your hosting PHP error log. The first fatal error usually points to the plugin, theme, file, or server issue causing the problem.

Should I restore a backup to fix a 500 error?

Restore a backup only when targeted troubleshooting fails or the site is badly damaged. On WooCommerce, membership, LMS, and booking sites, restoring an old database can overwrite new orders, users, subscriptions, bookings, or form entries.

Can a plugin cause a 500 Internal Server Error?

Yes. A plugin can cause a 500 error through PHP fatal errors, memory exhaustion, missing files, failed updates, database issues, incompatible PHP code, or conflicts with another plugin or theme.

How can I prevent WordPress 500 errors in the future?

Use staging before updates, keep full backups, update plugins carefully, test PHP compatibility, avoid untested custom code, keep .htaccess clean, remove abandoned plugins, and monitor server error logs after major changes.