How to Fix the “500 Internal Server Error” on Your Website
A "500 Internal Server Error" is the server's way of saying something went wrong, but it cannot tell you exactly what. It is a generic catch-all, which is frustrating — but the list of usual suspects is short, and working through them methodically almost always finds the cause.
Check the error log first
The error page is vague on purpose; the real detail is in your logs. Open the error log in cPanel and read the most recent entry. It usually names the file and line at fault, which turns guesswork into a quick fix.
The most common causes
- A broken .htaccess file — a bad rule or a leftover directive. Rename your
.htaccessto.htaccess_oldand reload; if the site returns, the file was the problem. See editing your .htaccess file. - Wrong file permissions — folders should be 755 and files 644, never 777. See checking file permissions.
- PHP memory or limits — a script running out of memory. See increasing the PHP memory limit.
- A faulty plugin or theme on WordPress — deactivate to test.
If it is a WordPress site
WordPress has its own common triggers for this error. Our dedicated guide on fixing the 500 error in WordPress walks through plugins, themes and the memory limit specifically.
Step-by-step approach
- Read the error log for the exact message.
- Rename
.htaccessand reload the site. - Check folder (755) and file (644) permissions.
- Raise the PHP memory limit if the log mentions memory.
- Disable the last plugin or code change you made.
Frequently asked questions
Is a 500 error caused by my host or by me?
Usually it is something within your own site — a rule, a permission, a script — rather than the server itself. The error log tells you which. If the log points to a server-level problem, open a support ticket.
The site was fine, then suddenly broke.
Something changed just before it broke — a plugin update, an edited file, a new .htaccess rule. Undo your most recent change first; that resolves the majority of sudden 500 errors.
Why can't I see the real error?
Servers hide detailed errors from visitors for security. Enable error display temporarily in your PHP settings, or simply read the error log, which records the full message safely.
Was this article helpful?