أهم النقاط
- The real cause of a 500 is in the error log, not the browser.
- A broken .htaccess line or a PHP memory limit causes most 500s.
- Disable plugins or revert a PHP upgrade to isolate code problems.
A 500 Internal Server Error is the server’s generic way of saying “something went wrong and I can’t be more specific”. The cause is almost always in your site’s code or configuration, so the fix starts with finding the real error message.
1. Read the error log
The browser hides the details; the server records them.
- In cPanel, open Metrics → Errors to see the latest entries.
- Check for an
error_logfile in your site’s folder in File Manager.
Look for lines with the time of your request. They usually name the file and line that failed.
2. Check .htaccess
A single invalid line in .htaccess causes a 500 on every page.
- In File Manager, enable Show Hidden Files.
- Rename
.htaccessto.htaccess.bak. - Reload the site. If it works, the problem is in that file — restore it and remove recent changes line by line.
3. Check PHP limits and version
- Memory exhausted messages mean the script needs more memory. Raise
memory_limitin MultiPHP INI Editor (for example to256M), within your plan’s limits. - After a PHP upgrade, old plugins or themes may use removed functions. Switch the domain back to the previous version in MultiPHP Manager to confirm, then update the code.
4. Check file permissions
Folders should normally be 755 and files 644. Files set to 777 are rejected by many servers for security reasons and can trigger a 500.
5. WordPress: disable plugins
Rename wp-content/plugins to plugins.off. If the site loads, rename it back and reactivate plugins one at a time until the error returns.
If none of this reveals the cause, send your host the exact time of the error and the URL — they can search the server-level logs.
الأسئلة الشائعة
Is a 500 error my fault or my host’s?
Usually it comes from the site’s code or configuration, such as .htaccess, PHP settings or a plugin. If the error log is empty and nothing changed, ask your host to check the server.
Why does the error appear only sometimes?
Intermittent 500s often point to resource limits being reached under load, or to a slow external service your code depends on.