"500 Internal Server Error" means the server could not finish the request, but it does not say why. On cPanel hosting the cause is almost always one of five things: a broken .htaccess rule, wrong file permissions, a PHP fatal error, an incompatible PHP version, or running out of memory. The logs point you to the right one in minutes.
Before you start
- Note when the error started and what changed just before (plugin update, new code, PHP version change, a redirect you added).
- For WordPress-specific causes, also see fix a 500 error in WordPress.
Read the logs first
- Load the failing page once.
- Open cPanel → Metrics → Errors and read the newest lines.
- Open File Manager and look for a file named
error_login the site folder (and inwp-adminfor WordPress). The last lines show PHP fatal errors.
Details on reading them: error and access logs in cPanel.
Match the log message to a fix
| Log says | Cause | Fix |
|---|---|---|
Invalid command '...', .htaccess: ... not allowed here | Unsupported directive in .htaccess | Remove or comment out that line |
is writable by group, SoftException | Permissions too open (e.g. 777) | Files 644, folders 755 |
PHP Fatal error: ... in /home/user/public_html/... | Code error, often a plugin or theme | Disable or roll back the named component |
Allowed memory size ... exhausted | PHP memory limit too low | Raise memory_limit |
Call to undefined function, deprecated syntax | Wrong PHP version or missing extension | Change version or enable extension |
End of script output before headers | Process killed (resource limit or crash) | Check resource usage and memory |
Test the .htaccess file
- In File Manager, open Settings and tick Show Hidden Files (dotfiles).
- Rename
public_html/.htaccessto.htaccess.bak. - Reload the site. If it works (perhaps with broken pretty URLs), the problem is in that file.
- Restore the file and remove the most recently added rules, e.g. a
php_valueline (not supported with LSAPI/PHP-FPM; use the MultiPHP INI Editor instead) or anAddHandlerline forcing an old PHP version.
Tip: For WordPress, saving Settings → Permalinks recreates a clean default .htaccess.
Fix permissions
cPanel servers refuse to run PHP files that are writable by group or others. Select the file in File Manager → Permissions and set 644 (folders 755). For a whole site, use the commands in cPanel Terminal. Never use 777.
PHP version and limits
- If the error began after a PHP change, switch back in MultiPHP Manager, then update the code.
- Raise
memory_limitto256Min Select PHP Version → Options. - Check Resource Usage for memory limit hits.
Still stuck?
Restore yesterday's files from JetBackup to get the site online, or open a support ticket with the URL and the time of the error; we can read the server-side logs that you cannot see.
