WordPress 500 Error – Complete Fix Guide

WordPress 500 Error - Complete Fix Guide

When your WordPress site shows a 500 Internal Server Error, follow these steps to resolve it:

1. Check Your Server Error Logs

  • In cPanel: Look for "Error Logs" or "Logs" section
  • In direct server access: Check /var/log/apache2/error.log or similar
  • Contact your host if you can't locate the logs

2. Increase PHP Memory Limit

Edit wp-config.php (via FTP or file manager) and add:

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

Place this above the "That's all, stop editing!" line.

3. Disable All Plugins

Option A: Via FTP

  1. Connect to your site via FTP
  2. Go to /wp-content/plugins/
  3. Rename folder to "plugins_OFF"

Option B: Via Database

  1. Access phpMyAdmin from your hosting panel
  2. Open wp_options table
  3. Edit active_plugins row to: a:0:{}

4. Reset .htaccess File

  1. Delete current .htaccess file
  2. Create new file with this content:
# 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

5. Check File Permissions

  • Folders: 755
  • Files: 644
  • wp-config.php: 600

Emergency Database Repair

Add to wp-config.php:

define('WP_ALLOW_REPAIR', true);

Then visit: yoursite.com/wp-admin/maint/repair.php

case studies

See More Case Studies