New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

HTTP 500

Learn how to fix a WordPress 500 internal server error.

HTTP 500 is a generic server failure. WordPress, Apache, nginx, or PHP crashed before sending a useful page. This tutorial shows how to read logs, fix .htaccess, and isolate plugin conflicts.

Time: 20-45 minutes Level: Intermediate
Neil McNaught, founder of BugShield and WordPress author
Written by
Written by
Updated
Updated

What this problem looks like

A 500 error means the web server encountered an unexpected condition. On WordPress sites the cause is usually a bad .htaccess rule, PHP fatal error, memory limit, or incompatible plugin after an update.

Unlike a white screen, some hosts show a generic 500 page. You still need server logs to find the real message. Start with .htaccess and the logs, then isolate plugins and themes until the error is gone.

Step 1: Find the real error in server logs

Log in to your hosting and open the error log. Search for entries at the time the site started returning the error. Look for PHP Fatal error, mod_security block, or AH01071 lines on Apache.

  • cPanel: Metrics → Errors or File Manager → error_log in site root.
  • Plesk: Logs for the domain.
  • Managed WordPress hosts: Application or PHP logs in the dashboard.

Step 2: Test with a default .htaccess

Corrupt or plugin-added rewrite rules are a frequent cause. Find .htaccess in your site root, next to wp-admin and wp-content. Rename it to .htaccess.old via File Manager, SFTP, or FTP. If the site loads, the problem is in rewrite rules.

apache
# 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

Step 3: Enable debug mode in wp-config.php

If the logs point at PHP, enable WordPress debug logging. Open wp-config.php in your site root, next to wp-admin and wp-content. Search for WP_DEBUG, WP_DEBUG_LOG, and WP_DEBUG_DISPLAY first. If those lines already exist, set them to the values below instead of adding duplicates. If none of them exist, paste them above the line that says stop editing:

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

Step 4: Deactivate plugins and switch theme

Rename wp-content/plugins to plugins.disabled. If the error is gone, rename plugins.disabled back to plugins, then activate plugins one at a time in wp-admin until the error returns. If renaming plugins did not help, rename the active theme folder in wp-content/themes/ and confirm a default theme exists.

Step 5: Raise PHP limits in hosting

A 500 error often follows memory exhausted or maximum execution time messages. In hosting PHP settings, raise memory_limit and max_execution_time. You can also set WordPress memory in wp-config.php in your site root, next to wp-admin and wp-content:

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

When to stop DIY and hire help

If the error persists after .htaccess reset and full plugin isolation, the issue may be server configuration or corrupted core files. BugShield resolves internal server errors at a confirmed price without hourly billing surprises.

Questions answered

WordPress 500 internal server error FAQs

Answers about server logs, plugins, PHP settings, permissions, and safe ways to restore a WordPress site showing HTTP 500.

Why does only one page return 500?

A single page may hit a plugin shortcode or custom template that triggers a PHP fatal error. Check debug.log while loading that specific URL.

Can Cloudflare cause a 500 error?

If you use Cloudflare, a 500 error usually means your host returned the error. Fix the site on your hosting first. Incorrect SSL mode settings can also cause redirect loops that look like server errors.

Should I delete .htaccess?

Rename it instead of deleting. You can restore permalinks from wp-admin once the site loads.

How do I fix a 500 error after installing a plugin?

Rename that plugin folder in wp-content/plugins/ via File Manager, SFTP, or FTP. Then update or replace the plugin before reactivating.

What causes a WordPress 500 internal server error?

A 500 error can come from a PHP fatal, a broken plugin or theme, invalid .htaccess rules, exhausted resources, wrong file permissions, or a hosting fault.

Where should I look for the cause of a WordPress 500 error?

Check the PHP or web-server error log at the exact time of the failed request. The final relevant line often identifies the file, rule, or limit involved.

Can incorrect file permissions cause HTTP 500 in WordPress?

Yes. Executable or unreadable PHP files can trigger server errors. Typical starting permissions are 755 for directories and 644 for files, subject to your host's setup.

Can changing PHP versions fix a WordPress 500 error?

It can confirm a compatibility problem, but a downgrade should be temporary. Update or replace the incompatible code before the older PHP version reaches end of life.

Should I clear cache after fixing a WordPress 500 error?

Yes. Clear page, object, server, CDN, and browser caches after the underlying fault is fixed so cached error responses are not mistaken for an ongoing failure.

When does a WordPress 500 error need a developer?

Get help when logs are inaccessible or unclear, the error affects checkout or wp-admin, or plugin, theme, and .htaccess isolation does not restore the site.

Would you rather a developer fixed it?

Request a fix at a confirmed price and speak directly with the BugShield developer working on your site.

Request a Fix