Does this match what you’re seeing?
- The page says 500 Internal Server Error
- The whole site or one page shows a 500
- It started after editing .htaccess, updating or changing PHP
A 500 means the server hit a problem it won’t describe to visitors. The description is in the error log.
1. Read the error log
Open System Info & Files then Site Summary / Statistics / Logs, choose the domain’s error log, reproduce the 500, and read the newest lines. Viewing website statistics and logs in DirectAdmin
| Log shows | Cause | Go to step |
|---|---|---|
.htaccess: Invalid command, RewriteRule: bad flag | .htaccess | 2 |
PHP Fatal error, PHP Parse error | PHP code | 3 |
Permission denied, is writable by group | Permissions | 4 |
Premature end of script headers | PHP crashed or timed out | 3 and 5 |
2. .htaccess
- In System Info & Files then File Manager, show hidden files and rename
.htaccessto.htaccess-off. - Reload. If the site works, the problem is in that file.
- Restore it and remove recently added rules one at a time, or restore a backup copy.
WordPress: after removing the file, re-save Settings → Permalinks to regenerate a clean one. What is .htaccess? A practical guide
3. PHP errors
The log gives the file and line.
- Parse error — a typo in an edited file. Undo the edit.
- Fatal error in a plugin or theme — disable it by renaming its folder. “There has been a critical error on this website”
- Memory exhausted — “Allowed memory size exhausted” PHP error
Understanding PHP error messages
4. Permissions
Folders should be 755, files 644. Files or folders writable by everyone (777) can be refused by the server. File permissions explained (644, 755 and why never 777)
5. PHP version
If the 500 began after switching PHP version, switch back, then find the incompatible code. How to change the PHP version in DirectAdmin
Nothing in the log?
Check the error log files inside public_html too (How to find PHP errors (error logs and display_errors)), and whether other sites or webmail on the account work (Is it my website or the server? How to tell).
Questions people ask
What causes a 500 Internal Server Error?
Most often a mistake in .htaccess, a fatal PHP error in the site’s code, incorrect file permissions or an incompatible PHP version. The domain’s error log names the exact cause.