How to Fix HTTP 500 Internal Server Error

69 views
Short answer: Temporarily rename .htaccess to .htaccess.old, inspect error_log in public_html to isolate fatal PHP errors, and temporarily disable conflicting plugins by renaming their folder.

Master diagnostic workflow for HTTP 500 Internal Server Errors, corrupt .htaccess files, invalid PHP directives, and permission issues.

Before you start: Back up your site files and database and download the backup to your own computer. How to take a full backup

Quick reference

Top 3 Causes 1. Invalid .htaccess syntax | 2. 777 permissions on files/folders | 3. Fatal PHP execution error
Primary Log public_html/error_log
cPanel Interface cPanel > Metrics > Errors

Quick diagnosis

Scenario & Suspected Cause Immediate Action & Remedy
.htaccess syntax error or bad directive Rename file to .htaccess.old or restore standard WordPress rewrite rules.
Plugin or theme conflict after update Temporarily rename wp-content/plugins to plugins_old to disable all active plugins.
PHP Memory Limit exhaustion Increase memory_limit to 256M or 512M under cPanel Select PHP Version.
Fatal syntax error in PHP code Inspect error_log in public_html to identify exact crashed file and line number.

Steps

  1. Check cPanel Errors Log: Go to cPanel > Metrics > Errors. The web server log will specify the exact line number in .htaccess or PHP script that caused the crash.
  2. Test by Renaming .htaccess:
    • In File Manager, rename .htaccess to .htaccess.bak.
    • Reload your website. If it loads immediately, your .htaccess contained a faulty or unsupported directive.
  3. Check Permissions: Ensure all directories are 755 and files are 644. Never use 777.
  4. Increase PHP Memory Limit: In Select PHP Version > Options, increase memory_limit to 512M.

Troubleshooting and tips

  • PHP settings in .htaccess: Change PHP values from the Options tab of Select PHP Version. If php_flag or php_value lines in .htaccess cause a 500 error, remove them.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket
Was this article helpful?
No, I need more help
Didn't find your answer?
Under 3 minutes
Submit Support Ticket