🛠️ Step-by-Step: How to Fix a 500 Error on Your Website

✅ 1. Enable Debug Mode

Turn on WordPress debugging to see what's causing the error.

Access your site via FTP or cPanel > File Manager

Open the wp-config.php file

Add or update this line:

php

CopyEdit

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

Reload your website. Then check /wp-content/debug.log for error details.

✅ 2. Check .htaccess File

A corrupt .htaccess file can cause a 500 error.

Go to your site's root folder

Rename .htaccess to .htaccess_old

Try reloading your site

If it works, go to WordPress Dashboard > Settings > Permalinks and click Save to regenerate it

✅ 3. Disable All Plugins

A faulty plugin is a common cause.

Go to /wp-content/ and rename the plugins folder to plugins_old

Reload your site

If it works, rename the folder back to plugins and activate plugins one by one to find the culprit

✅ 4. Switch to a Default Theme

If a theme update caused the issue:

Go to /wp-content/themes/

Rename your active theme folder (e.g., astra to astra_old)

WordPress will default to a theme like twentytwentyfour

If your site works, the theme is the problem

✅ 5. Check File Permissions

Incorrect file or folder permissions can lead to a 500 error.

Folders: 755

Files: 644

You can fix this via cPanel or using an FTP client like FileZilla.

✅ 6. Increase PHP Memory Limit

You may be running out of server memory.

In wp-config.php, add:

php

CopyEdit

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

✅ 7. Check Server Error Logs

Your hosting control panel (like cPanel or Plesk) usually has Error Logs under "Metrics" or "Logs." Check them for detailed errors (like PHP version mismatch, timeout, etc.).

✅ 8. Contact Hosting Provider

If you can’t identify the issue or don’t have access, your web host can help you check logs, fix file permissions, or restart the server.

Was this article helpful?

2 out of 2 found this helpful