The WordPress 500 Internal Server Error means your server hit a problem it could not handle and returned a generic error instead of loading the page. Your site goes down, your admin dashboard may be inaccessible, and the error message tells you almost nothing about the actual cause. If the outage lasts more than a few hours, your SEO rankings can take a hit as Google encounters repeated 5xx responses when crawling.

The good news: the 500 error almost always has a fixable cause. In my experience, the three most common culprits are a corrupted .htaccess file, a plugin or theme conflict, and an exceeded PHP memory limit. This guide walks through nine fixes in order of likelihood and difficulty, starting with the quickest checks. If you're also encountering broken pages on your site, our guide to fixing WordPress 404 errors covers the most common causes and the fastest fixes.

Key Takeaways
1
The #1 fix for a WordPress 500 error is renaming the .htaccess file via FTP. This resolves the issue in roughly 40% of cases and takes under 2 minutes.
2
Plugin and theme conflicts are the second most common cause. Deactivate all plugins by renaming the /plugins/ folder via FTP, then reactivate one at a time to isolate the conflict.
3
If your site was working fine before a hosting update, check your PHP version. WordPress 6.7+ requires PHP 7.2.24 minimum, but PHP 8.1 is recommended, and many modern plugins now require PHP 8.0 or higher.

What Causes the 500 Internal Server Error in WordPress?

A 500 error is a server-side error, meaning the problem is on your web server, not in the visitor's browser. The server encountered a condition it could not handle and returned a generic error instead of loading the page. The most common causes in WordPress are:

  • Corrupted .htaccess file: The most frequent cause. A faulty rewrite rule or a plugin that modified .htaccess incorrectly can crash the entire site.
  • Plugin or theme conflict: A recently updated or newly installed plugin that is incompatible with your WordPress version, PHP version, or another plugin.
  • PHP memory limit exceeded: Your site's scripts require more memory than the server allows, especially on shared hosting plans with low default limits (64MB-128MB).
  • PHP max_execution_time exceeded: A script runs longer than the server allows (typically 30-60 seconds), causing the server to kill it and return a 500 error.
  • Incorrect file permissions: WordPress files should be set to 644 and directories to 755. Permissions of 777 can trigger a 500 error on some hosts.
  • PHP version incompatibility: Running an outdated PHP version (7.2 or lower) with a plugin that requires PHP 8.0+.
  • Corrupted WordPress core files: Rarely, a failed auto-update can corrupt core WordPress files.
  • Database connection error: Incorrect database credentials in wp-config.php or a crashed MySQL table.

Quick Check: Clear Your Browser Cache First

Before troubleshooting on the server, rule out a stale cached page. Your browser may be showing a cached version of a 500 error that has already been resolved. Clear your browser cache and cookies, then reload the page. In Chrome, press Ctrl+Shift+Delete (Windows) or Cmd+Shift+Delete (Mac) to open the cache clearing dialog.

Also try loading your site in a private/incognito window or a different browser. If the site loads normally there but not in your main browser, the issue is cached, not a real server error. If the 500 error persists across browsers, move on to the server-side fixes below.

How Do You Fix a Corrupted .htaccess File?

This is the single most common fix for the 500 error and takes under 2 minutes. A corrupted .htaccess file is responsible for roughly 40% of WordPress 500 errors.

  1. Connect to your site via FTP (FileZilla) or your host's file manager (cPanel, Cloudways, etc.).
  2. Navigate to your WordPress root directory (where wp-config.php is located).
  3. Find the .htaccess file and rename it to .htaccess_backup.
  4. Try loading your site. If it works, the .htaccess file was the problem.
  5. To regenerate a clean .htaccess file, log into your WordPress admin, go to Settings > Permalinks, and click Save Changes without changing anything. WordPress creates a new .htaccess automatically.

If your site does not load after renaming .htaccess, rename the backup back to .htaccess and move to the next fix.

Check for .htaccess Files in Subdirectories

A lesser-known cause of partial 500 errors is a corrupted .htaccess file inside a subdirectory like /wp-content/uploads/. Some security and caching plugins create .htaccess files in subdirectories, and if these become corrupted, only certain parts of your site break (for example, image uploads may fail while the rest of the site loads). If renaming the root .htaccess did not fix the error, check for .htaccess files inside /wp-content/ and its subdirectories.

How Do You Fix a Plugin or Theme Conflict?

If a plugin or theme update triggered the error, deactivating all plugins and themes isolates the conflict. Since you likely cannot access the WordPress admin, do this via FTP:

  1. Connect to your site via FTP.
  2. Navigate to /wp-content/.
  3. Rename the plugins folder to plugins_disabled.
  4. Try loading your site. If it works, a plugin was the cause.
  5. Rename the folder back to plugins. All plugins are now deactivated but still installed.
  6. Log into your WordPress admin and activate plugins one at a time, refreshing your site after each one. When the 500 error returns, the last activated plugin is the culprit.

If deactivating plugins did not fix the error, repeat the process with themes: rename your active theme's folder in /wp-content/themes/. WordPress will fall back to a default theme (Twenty Twenty-Four). If the site loads, your theme is the problem. Contact the theme developer or check for an update.

WooCommerce-Specific 500 Errors

WooCommerce stores encounter 500 errors in specific scenarios that general plugin troubleshooting may miss:

  • Checkout page only: A 500 error that only appears on the checkout page usually points to a payment gateway plugin conflict. Deactivate payment gateway plugins one at a time (Stripe, PayPal, etc.) to isolate the cause. Also verify your SSL certificate is valid and not expired, as some server configurations return a 500 error when SSL fails on the checkout page specifically.
  • Cart page only: This often means a WooCommerce extension (subscriptions, bundles, bookings) has a PHP error in how it renders cart items. Enable debug mode and check the log for the specific extension name in the error.
  • After WooCommerce update: WooCommerce updates can break third-party extensions built on older WooCommerce hooks. After a WooCommerce update that causes a 500 error, check whether your WooCommerce extensions (Subscriptions, Memberships, etc.) have compatible versions available.
  • Memory errors on order processing: WooCommerce order processing is memory-intensive. If your site returns a 500 error specifically when placing orders, try increasing PHP memory to 512M before looking for plugin conflicts.

Switching Themes via phpMyAdmin (No Dashboard Access)

If you cannot access wp-admin or FTP to rename themes, you can switch your active theme directly in the database. Open phpMyAdmin from your host's control panel, find the wp_options table, and locate the rows with option_name template and stylesheet. Change both values to twentytwentyfour (or another default theme installed on your server). This forces WordPress to load the default theme on the next page load.

How Do You Increase the PHP Memory Limit?

WordPress's default memory limit is often 64MB or 128MB on shared hosting. Resource-intensive plugins (page builders, WooCommerce, image optimization tools) can exhaust this limit. There are three ways to increase it:

Method 1: wp-config.php

Add this line to your wp-config.php file, just above the line that says "That's all, stop editing!":

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

Method 2: .htaccess

Add this line to your .htaccess file:

php_value memory_limit 256M

Method 3: php.ini

Create or edit a php.ini file in your WordPress root directory and add:

memory_limit = 256M

If your host restricts these changes, contact their support to request a memory limit increase. Most hosts will accommodate 256M-512M without issue.

Insufficient PHP memory also causes the could not insert post into the database error when WordPress can't complete a database write operation. The same memory fix resolves both.

Also Check: max_execution_time

Separate from memory limits, PHP has a max_execution_time setting that controls how many seconds a script can run before the server kills it. The default is usually 30 seconds, which may not be enough for heavy operations like importing products or running large database queries. You can increase it in the same three places:

  • wp-config.php: set_time_limit(300);
  • .htaccess: php_value max_execution_time 300
  • php.ini: max_execution_time = 300

Setting this to 300 gives scripts 5 minutes to complete, which is enough for most WordPress operations.

How Do You Enable WordPress Debug Mode?

When the above fixes do not resolve the error, enabling debug mode tells you exactly what is failing. Edit your wp-config.php file and replace:

define('WP_DEBUG', false);

With:

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

This creates a debug log file at /wp-content/debug.log. Open this file to see the specific PHP error, including which file and line number is causing the 500 error. Remember to set WP_DEBUG back to false after resolving the issue. For more details, see our guide on checking your PHP error log.

Reading Your WordPress Debug Log: What Common Error Messages Mean

Once you've enabled debug mode and opened /wp-content/debug.log, you'll see raw PHP error messages. Here's how to interpret the most common ones:

Error MessageWhat It MeansFix
PHP Fatal error: Allowed memory size of 134217728 bytes exhaustedPHP ran out of memory (128MB limit hit)Increase WP_MEMORY_LIMIT to 256M or 512M
PHP Fatal error: Maximum execution time of 30 seconds exceededA script took too long to completeIncrease max_execution_time to 120-300 seconds
PHP Fatal error: Call to undefined function wp_rand()WordPress core functions aren't loading, points to corrupted core filesRe-upload /wp-admin/ and /wp-includes/ from a fresh WordPress download
PHP Parse error: syntax error, unexpected ':'A plugin file has a PHP syntax error, often from a bad update or manual editCheck which file is named in the error, then deactivate that plugin or restore its previous version
mysql_connect(): Access denied for userDatabase credentials in wp-config.php are wrong or the MySQL user lost permissionsVerify DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST in wp-config.php against your hosting control panel
PHP Fatal error: Uncaught Error: Class 'SomePLuginClass' not foundA plugin references a class from another plugin that isn't activeThe named plugin has a dependency. Check if a required companion plugin is deactivated.
PHP Warning: Cannot modify header information - headers already sent byA PHP file has whitespace or a BOM character before the opening <?php tagOpen the named file in a code editor and remove any whitespace before the first <?php

The log file lists errors in chronological order. The most recent errors (at the bottom) are usually the most relevant. Look for PHP Fatal error entries first. PHP Warning entries are less severe and may not be causing the 500 error directly.

How Do You Check Server Error Logs?

WordPress debug mode only catches PHP errors that WordPress itself handles. Some 500 errors are triggered at the server level (by Apache, Nginx, or ModSecurity) before WordPress even loads. These errors only appear in your server's error log, not in /wp-content/debug.log.

Where to find your server error log depends on your hosting setup:

  • cPanel: Go to Metrics > Errors in your cPanel dashboard to see the most recent Apache error log entries.
  • Cloudways: Open your server's Monitoring > Logs tab. Select "Apache Error Log" or "Nginx Error Log" from the dropdown.
  • Kinsta / WP Engine / Managed hosts: Most managed WordPress hosts provide a log viewer in their dashboard. Check under "Tools" or "Logs."
  • SSH access (Apache): The Apache error log is usually at /var/log/apache2/error.log or /var/log/httpd/error_log. Use tail -100 /var/log/apache2/error.log to see the last 100 lines.
  • SSH access (Nginx): The Nginx error log is typically at /var/log/nginx/error.log. Use tail -100 /var/log/nginx/error.log.

Server error logs give you the exact error message, file path, and line number that triggered the 500 error. If the log mentions ModSecurity, a firewall rule is blocking the request. Your host can whitelist the specific rule causing the false positive.

How Do You Fix File Permissions in WordPress?

Incorrect file permissions can trigger 500 errors, especially after a migration or server change. The correct permissions for WordPress are:

  • Directories: 755 (owner can read/write/execute, group and others can read/execute)
  • Files: 644 (owner can read/write, group and others can read only)
  • wp-config.php: 440 or 400 (restrictive, owner can read only, recommended for security)

You can fix permissions via FTP by right-clicking files/folders and setting permissions, or via SSH with:

find /path/to/wordpress/ -type d -exec chmod 755 {} \;
find /path/to/wordpress/ -type f -exec chmod 644 {} \;

Never use 777 permissions on any WordPress file or directory. This is a security risk and some hosts will trigger a 500 error intentionally when they detect it.

What If None of These Fixes Work?

If you have tried all the above and the 500 error persists:

  • Check your PHP version: In your host's control panel, verify you are running PHP 7.4 or higher. WordPress 6.7 requires PHP 7.2.24 or higher as a minimum, but the official recommendation is PHP 8.1 or 8.2. Many modern plugins (particularly WooCommerce extensions, page builders, and security tools) now require PHP 8.0 or 8.1 and will crash with a 500 error on older PHP versions. Upgrading PHP resolves compatibility-based 500 errors.
  • Re-upload WordPress core files: Download a fresh copy of WordPress from wordpress.org and upload the /wp-admin/ and /wp-includes/ directories via FTP, overwriting the existing files. This does not affect your content, themes, or plugins.
  • Check database integrity: Add define('WP_ALLOW_REPAIR', true); to wp-config.php, then visit yoursite.com/wp-admin/maint/repair.php. WordPress will attempt to repair any corrupted database tables. Remove the line after repair is complete.
  • Contact your hosting provider: Some 500 errors are caused by server-level issues (Apache/Nginx misconfiguration, ModSecurity rules blocking requests, server resource limits). Your host's support team has access to server error logs that are not visible in WordPress debug mode.

What If the 500 Error Only Appears on Specific Pages?

A 500 error affecting only certain pages (rather than your whole site) has different causes than a site-wide outage. If your homepage loads but specific posts, product pages, or category pages return a 500 error, look here first:

  • Page-specific caching conflict: A caching plugin may have stored a corrupted version of that page. Clear the cache for the specific URL in your caching plugin's settings before clearing site-wide cache.
  • WooCommerce checkout or cart pages: The checkout page is particularly prone to 500 errors from payment gateway plugins. Deactivate payment gateway plugins one at a time to isolate the conflict. Also check that your SSL certificate is valid, since an expired SSL on the checkout page can trigger a 500 error on some server configurations.
  • A specific post or page has a broken shortcode: A page builder block or shortcode that references a deleted element (a removed widget, a deleted form) can crash the rendering and return a 500. Edit the page and remove any blocks or shortcodes that reference missing content.
  • .htaccess rule targeting a specific path: A redirect or rewrite rule in your .htaccess that was intended for a specific URL pattern can accidentally match unintended pages. Check your .htaccess for any rules referencing the affected URL structure.
  • Post content with unescaped special characters: Rarely, a post that contains certain special characters (particularly in code blocks or HTML embeds) can crash the PHP renderer. Try editing the affected post and removing recently added content to isolate the cause.

The diagnostic difference: if the 500 error is only on one page, start with the caching layer and page content before diving into server-level fixes. A site-wide 500 error points to server configuration, plugins, or core files.

Quick Reference: WordPress 500 Error Troubleshooting

FixTime NeededAccess Required% of Cases
Clear browser cache1 minuteNone5%
Rename .htaccess2 minutesFTP or File Manager40%
Deactivate plugins5-10 minutesFTP or File Manager25%
Switch theme5 minutesFTP or phpMyAdmin10%
Increase PHP memory2 minutesFTP or File Manager10%
Fix file permissions5 minutesFTP or SSH5%
Enable debug mode3 minutesFTPDiagnostic
Check server error logs2 minutesHost dashboard or SSHDiagnostic
Re-upload core files10 minutesFTP3%

When to Stop Troubleshooting and Call Your Host

Most WordPress 500 errors are fixed within 15 minutes using the steps above. If you have been through every fix in the quick reference table and the error persists, stop troubleshooting locally and contact your hosting provider directly.

Your host's support team has access to server-level error logs that WordPress debug mode and cPanel error logs don't expose. Server-level ModSecurity rules, firewall blocks, and memory exhaustion at the OS level all show up only in the host's backend logs. These are causes you cannot diagnose or fix yourself.

Before calling, have ready: the exact URL(s) returning the 500 error, the time the error first appeared, the last thing changed on your site (plugin update, file upload, PHP version change), and any error messages from /wp-content/debug.log or your cPanel error log. The more specific you are, the faster support can isolate the cause.

If you are on shared hosting and the 500 error happens sporadically under traffic load, the issue may be shared server resource limits. This is a sign that your site has outgrown shared hosting. A move to managed WordPress hosting (such as Cloudways) or a VPS gives you dedicated resources and eliminates most resource-based 500 errors permanently.

Summary: Fixing the WordPress 500 Error

The WordPress 500 Internal Server Error almost always comes down to a corrupted .htaccess file, a plugin conflict, or an exceeded PHP memory limit. Start with the simplest fix (clear your cache, then rename .htaccess), work through plugin deactivation, and increase the memory limit. If the cause is not obvious, enable debug mode, read the error messages in /wp-content/debug.log against the table above, and check your server error logs for the exact error. In most cases, the fix takes under 15 minutes once you identify the root cause. For a related issue, see our guide on fixing the 502 Bad Gateway error.

For a deeper look, see our complete guide to What Is WordPress?.

Show More

* read the rest of the post and open up an offer