WP 500 Error Debugging

User
ini_set('display_errors', 1);
error_reporting(E_ALL);
define('WP_CACHE', false);
define('DISABLE_CACHE', true);
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
Still error not showing worpdress 500
Assistant
If you're getting a **500 Internal Server Error** in WordPress and the error is not showing up even after setting these lines:

ini_set('display_errors', 1);
error_reporting(E_ALL);
define('WP_CACHE', false);
define('DISABLE_CACHE', true);
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);

Then here are some troubleshooting steps to help uncover the actual error:

### ✅ 1. **Check the PHP error log directly**
Since WordPress might not show errors due to fatal PHP issues, check your **server's PHP error log** directly. The path depends on your server config:

– Apache (Ubuntu): `/var/log/apache2/error.log`
– Apache (CentOS): `/var/log/httpd/error_log`
– Nginx (PHP-FPM): `/var/log/php7.x-fpm.log` or `/var/log/nginx/error.log`

Run:

tail -f /var/log/apache2/error.log

*(Adjust path to your server setup)*

### ✅ 2. **Check `wp-content/debug.log`**
If `WP_DEBUG_LOG` is enabled, WordPress should log errors here:

wp-content/debug.log

Open it manually or run:

tail -f wp-content/debug.log

### ✅ 3. **Make sure you're editing the right `wp-config.php`**
Sometimes if you're running multiple environments (like Bedrock, Docker, etc.), make sure you're editing the correct `wp-config.php`.

### ✅ 4. **Disable all plugins manually**
A plugin might be throwing the error. Rename the plugin folder via FTP or SSH:

mv wp-content/plugins wp-content/plugins-bak

Then refresh the site.

### ✅ 5. **Switch to default theme**
Rename your active theme's folder (temporarily), and WordPress will fall back to a default theme:

mv wp-content/themes/your-theme wp-content/themes/your-theme-bak

### ✅ 6. **Set correct file permissions**
Incorrect file permissions may also cause a 500 error.

Run:

find . -type f -exec chmod 644 {} ;
find . -type d -exec chmod 755 {} ;

### ✅ 7. **Increase PHP memory limit**
Add this to your `wp-config.php`:

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

### ✅ 8. **Check `.htaccess` (if using Apache)**
A bad rewrite rule can cause 500 errors. Rename it to test:

mv .htaccess .htaccess-bak

Then refresh the site.

Would you like to share access to the log file or any recent changes you made before this error started? I can help narrow it down quickly.

Leave a Comment

Your email address will not be published. Required fields are marked *