How to Fix the 500 Internal Server Error in WordPress

The WordPress 500 Internal Server Error is one of the most frustrating errors because it gives no information about what went wrong. It can appear on any page, take your site completely offline, and affect your search rankings if it stays unresolved for more than a few hours.

Download WP STAGING to avoid this and other errors in the future. The WP STAGING plugin allows you to create a copy of your WordPress site in seconds. You can test new plugins, designs, and other updates in a secure environment on that staging site.

TL;DR: The five most common fixes for a WordPress 500 error are: (1) enable debug mode to read the error log, (2) check and regenerate your .htaccess file, (3) raise the PHP memory limit, (4) deactivate all plugins and reactivate them one by one, and (5) reinstall WordPress core files. Start with debug mode so you know which specific fix to apply.

What Is the WordPress 500 Internal Server Error?

A 500 status code is the server’s generic way of saying "something went wrong." When your browser requests a page, the server runs PHP code to build that page. If something in that process fails before a proper response can be formed, the server responds with HTTP 500 rather than the page itself.

The error may look like this:

Error-500

Or it may look like this:

Error 500 - Internal  Server Error

The key characteristic is that the error is generic. It tells you the request failed, but not why. That is what makes it harder to fix than a more specific error such as a 404 (page not found) or a 403 (access denied). The rest of this guide gives you a systematic path through the most common causes.

What Causes a 500 Error in WordPress?

The most common causes are:

  • A corrupted or malformed .htaccess file
  • PHP memory exhaustion
  • A plugin or theme conflict causing a fatal PHP error
  • Corrupted WordPress core files
  • A server-level failure (PHP-FPM crash, misconfiguration, file permissions)

Use the table below to match your situation to the most likely cause and the fastest first fix:

When did the 500 error appear? Scope Most likely cause First fix to try
After installing or updating a plugin Entire site Plugin conflict Fix 4: Deactivate all plugins
After editing wp-config.php or .htaccess Entire site Syntax error in config file Fix 2: Regenerate .htaccess
After a WordPress core update Entire site Corrupted core files Fix 5: Reinstall core files
No recent changes, entire site down Entire site Memory exhaustion Fix 3: Increase PHP memory limit
No recent changes, single page affected One page only Permalink or mod_rewrite issue Fix 2: Regenerate .htaccess
Cannot access wp-admin at all Entire site Unknown cause Fix 1: Enable debug mode first

Quick Checks to Try First

Before touching any files, run through these two fast steps. Either one can resolve a 500 error caused by a stale cache.

Force refresh the page: Press Ctrl + F5 on Windows or Cmd + Shift + R on Mac to bypass the cached version and load the most recent copy of the page.

Clear your browser cache: Clearing the browser cache rules out a client-side caching issue before you change any server files.

  1. Google Chrome: Press Ctrl + Shift + Delete, select the desired time range, and click "Clear Data."
Clear Browser Cache
  1. Mozilla Firefox: Press Ctrl + Shift + Delete, choose the appropriate time range, and click "Clear Now."
Clear Firefox Browser Cache
  1. Apple Safari: Press Command + Option + E to clear the cache instantly.
  2. Microsoft Edge: Press Ctrl + Shift + Delete, check "Cached images and files," and click "Clear now."

If the error disappears after clearing the cache, you are done. If it persists, continue with the numbered fixes below.

The following steps are more complex and affect the database/files on the WordPress website. To not cause any further damage, and if you still have access to the WordPress dashboard, create a staging site with WP STAGING and try to fix the error on the staging page instead of the production site.

You can create a staging site to test each fix safely before applying it to your production site with WP STAGING.

Fix 1: Enable WordPress Debug Mode

The safest first step is to turn on WordPress debug logging so you can read the exact error that caused the 500 response. Without the log, every subsequent fix is guesswork. In WP STAGING support tickets, the most common first cause we see is a plugin conflict, and the debug log surfaces it immediately.

Open your wp-config.php file (located in the root of your WordPress installation, accessible via FTP or your hosting file manager) and add these three lines:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Edit Wp-Config File

Check out this article for a step-by-step walkthrough of activating the WordPress debug log.

The debug log writes to /wp-content/debug.log. Open the file and look for the first error near the top. If the log points to a specific plugin, rename that plugin’s folder to disable it. For example, rename /wp-content/plugins/woocommerce to /wp-content/plugins/woocommerce-disabled.

If the debug log is empty, check the server-level error log:

  • Apache: /var/log/apache2/error.log
  • Nginx: /var/log/nginx/error.log

Access these via FTP or your hosting control panel. Some control panels also expose the error log through their user interface.

Fix 2: Regenerate Your .htaccess File

A corrupted .htaccess file is one of the most common causes of a 500 error on Apache-based servers. The file is located in your WordPress root directory, next to the wp-admin, wp-includes, and wp-content folders.

Edit .htaccess File

To regenerate it:

  1. Connect to your site via FTP or your hosting file manager.
  2. Rename the existing .htaccess to .htaccess_backup so you have a fallback.
  3. Create a new file called .htaccess and paste in the default WordPress rewrite rules:
# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

# END WordPress

Reload your site. If the corrupted .htaccess was the cause, the error resolves immediately.

Alternative via WordPress admin: If you still have access to the dashboard, go to Settings > Permalinks and click "Save Changes" without modifying anything. WordPress regenerates .htaccess automatically on that save.

Fix 3: Increase the PHP Memory Limit

PHP processes each page request within a memory budget. When a plugin, theme, or complex query exceeds that budget, the server responds with a 500 error. From our testing on shared hosting environments, PHP memory exhaustion is the most common server-side trigger we encounter when no recent site changes preceded the error.

You can raise the limit in two ways:

Option A: Via cPanel (if your host provides it)

  1. Log in to cPanel.
  2. Open "Select PHP Version."
  3. Click "Switch to PHP Options."
  4. Click memory_limit and increase the value to 256 or 512 (MB), then save.

Option B: Via wp-config.php

Edit Wp-Config File

Open wp-config.php and add this line near the top:

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

Save the file and reload your site. If memory exhaustion was the cause, the error resolves after saving.

Fix 4: Deactivate All Plugins

Plugin conflicts are a frequent root cause of a WordPress 500 error. If Fix 1 confirmed a plugin conflict in the debug log, or if you cannot read the log, deactivating all plugins and reactivating them one by one identifies the culprit.

If you have access to the WordPress admin:

  1. Go to Plugins in the dashboard.
  2. Select all plugins using the checkbox at the top.
  3. From the "Bulk Actions" dropdown, choose "Deactivate," then click "Apply." WordPress Dashboard Select Plugins Deactivate plugins to troubleshoot errors in the WordPress Admin Dashboard
  4. Reload your site. If the error is gone, reactivate plugins one by one, reloading after each one, until the error reappears. The last plugin you activated is the culprit.

If you cannot access the WordPress admin:

Connect via FTP and rename the plugins folder:

  1. Rename /wp-content/plugins to /wp-content/plugins-disabled.
  2. Reload your site. If it comes back, you have confirmed a plugin conflict.
  3. Rename the folder back to /wp-content/plugins.
  4. Disable individual plugins by renaming their subfolders (for example, rename /wp-content/plugins/woocommerce to /wp-content/plugins/woocommerce-disabled), then reload after each rename.

Fix 5: Reinstall WordPress Core Files

If the error appeared without any plugin or theme change, corrupted WordPress core files may be the cause. You can reinstall core without overwriting your content, plugins, or themes.

  1. Download the latest copy of WordPress from wordpress.org.
  1. Unzip the downloaded archive.
  2. Connect to your server via FTP or your hosting file manager.
  3. Rename the existing /wp-admin and /wp-includes folders to /wp-admin-backup and /wp-includes-backup.
  1. Upload the fresh /wp-admin and /wp-includes folders from the unzipped archive to the same location.
  1. Reload your site. If corrupted core files were the cause, the error resolves after the upload completes.

Do not replace wp-config.php or the wp-content folder during this process. Those files hold your database credentials and all uploaded media.

Fix 6: Contact Your Hosting Provider

If none of the five fixes above resolved the error, the problem is most likely at the server level rather than inside your WordPress installation. Server-level causes include:

  • A PHP-FPM process that crashed or stopped silently
  • Apache or Nginx misconfiguration introduced during a server update
  • File permission changes that block PHP from reading WordPress files
  • Server-level resource limits unrelated to the PHP memory limit

Contact your hosting provider’s support team and share the relevant lines from the server error log you found in Fix 1. Most managed WordPress hosts can diagnose server-level 500 errors quickly from the log.

If your host cannot resolve the issue, or if 500 errors recur frequently under normal load, it may be time to evaluate a more capable hosting environment for your site’s requirements.

Subscribe to our YouTube Channel for more WordPress video tutorials and connect with us on Twitter and Facebook.

What to Do If None of the Fixes Work

If you have worked through all six fixes and the error persists, use this table to narrow down the remaining possibilities:

Symptom What to check
Debug log is empty after enabling WP_DEBUG Check the server-level error log (Apache or Nginx path from Fix 1); the PHP error may not be reaching the WordPress log layer
All plugins deactivated, error still occurs Switch to a default WordPress theme (such as Twenty Twenty-Four) via FTP by renaming your active theme folder under /wp-content/themes/
Error only on wp-admin, not the front end An admin-specific plugin or file in /wp-content/mu-plugins/ may be loading and failing; check that directory
500 error appears on a single URL only A post-specific shortcode, custom field, or block may be triggering a fatal error; enable WP_DEBUG and visit that URL to capture the log entry
Hosting provider says there is no server error Ask specifically about PHP-FPM process health and whether the PHP worker pool was restarted recently

Related Articles

Rene Hermenau

Author: Rene Hermenau

About the author: René Hermenau is the founder of WP STAGING. He works on WordPress backups, staging, migrations, database handling, and safe deployment workflows.