A 500 Internal Server Error tells you only one thing: the server tried to run your site and something failed. The page itself never says what. The cause is almost always written in a log, and on a cPanel account it is usually one of five things: a broken .htaccess rule, wrong file permissions, a PHP error, a PHP version or limit problem, or a faulty WordPress plugin or theme.
This guide shows where to find the real error in cPanel and how to fix each cause, starting with the quickest checks.
Step 1: read the error log first
Do not guess. Two places in cPanel usually name the problem:
- Metrics » Errors. This shows up to 300 of the most recent entries from the web server’s error log for your domains, newest first. Reload the broken page, then open Errors and look at the top lines.
- The
error_logfile. PHP errors are often written to a file callederror_login the folder of the script that failed, such aspublic_htmlorpublic_html/wp-admin. Open it in File Manager and read the last lines.
Match the message you find to one of the sections below.
A broken .htaccess file
The .htaccess file in public_html holds rewrite rules and server settings. One wrong line breaks the whole site with a 500. Typical log messages are:
Invalid command '…', perhaps misspelled or defined by a module not included in the server configuration: a directive the server does not support, often copied from a tutorial for a different setup.Request exceeded the limit of 10 internal redirects: a rewrite rule that keeps redirecting to itself.
To test it, open File Manager, turn on Show Hidden Files in Settings, and rename .htaccess to .htaccess-off. If the site loads (perhaps with broken links), the file is the cause. Fix the line the log names, or start again with a clean file.
For WordPress, create a new empty .htaccess, then go to Settings » Permalinks and click Save Changes. WordPress writes its standard rules back. Add any custom rules again one at a time, testing after each.
A common case: php_value or php_flag lines in .htaccess. On servers where PHP does not run as an Apache module, these cause a 500. Remove them and set the same values in cPanel’s MultiPHP INI Editor instead.
Wrong file or folder permissions
On cPanel servers, PHP normally runs as your account’s own user, and the server refuses to run files that other users could change. After a migration, an FTP upload or a restore, permissions can end up too open or too strict. Log lines with SoftException, is writeable by group or Permission denied point here.
cPanel’s documented defaults for the files inside public_html are:
- Files: 644
- Folders: 755
- All owned by your cPanel user, not by root or another account
You can check and change permissions in File Manager (right-click, Change Permissions). With SSH access, these commands reset everything under public_html at once; replace username with your cPanel username:
find /home/username/public_html -type d -exec chmod 755 {} \;
find /home/username/public_html -type f -exec chmod 644 {} \;
Never set files or folders to 777 to “fix” an error. It does not help on these servers, and it lets other processes change your files. Wrong file ownership needs root access, so if files are owned by another user, open a ticket with your host.
A PHP fatal error
If the log shows PHP Fatal error, it names the file and line. The most common ones:
Allowed memory size exhausted
Allowed memory size of 134217728 bytes exhausted means the script hit PHP’s memory_limit (here 128 MB). Raise memory_limit for your domain in MultiPHP INI Editor, then find out why the script needs so much, because a plugin with a bug will hit any limit eventually.
Call to undefined function, or a syntax error after a PHP change
Code written for an older PHP version can fail on a newer one, and the other way round. Check which version the site uses in MultiPHP Manager. If the error started right after a PHP change, switch back to the previous version to bring the site back, then update the code. Our guide to moving WordPress to PHP 8.4 or 8.5 covers this. If PHP files download instead of running, that is a different problem, covered in how to fix PHP files downloading instead of running.
Maximum execution time exceeded
The script ran longer than max_execution_time allows. Raise it in MultiPHP INI Editor for long imports or backups, but a normal page that takes that long has another problem, such as a slow external API or a heavy database query.
WordPress: a plugin or theme
In WordPress, a 500 or “There has been a critical error on this website” usually comes from a plugin or theme, often right after an update. WordPress emails the site administrator a recovery mode link that names the plugin; log in with it and deactivate that plugin.
No email? Turn on WordPress’s debug log. In wp-config.php, above the line /* That's all, stop editing! */, add:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Reload the page, then read wp-content/debug.log. The path in the error shows which plugin or theme failed. If you still cannot get into the dashboard:
- In File Manager, rename
wp-content/pluginstoplugins-off. This deactivates every plugin. - If the site loads, rename the folder back to
pluginsand rename the plugins inside it one at a time until the error returns. - If the plugins are not the cause, rename the active theme’s folder in
wp-content/themes; WordPress falls back to a default theme if one is installed.
Set WP_DEBUG back to false when you are done. If the site shows “Error establishing a database connection” instead of a 500, follow our guide to fixing the WordPress database connection error.
When it is not your account
If the log is empty, every site on the account fails at once, or a fresh index.html also returns a 500, the problem may be on the server. Open a ticket with the time of the error, the URL and anything you found in the logs. That saves a round of questions.
Frequently asked questions
What causes a 500 Internal Server Error?
A failure on the server while it builds the page. On cPanel hosting the usual causes are a broken .htaccess rule, wrong file permissions, a PHP fatal error or limit, or a faulty WordPress plugin or theme.
Where is the error log in cPanel?
Open Metrics » Errors for the latest web server errors. PHP errors are often also written to an error_log file in the folder of the script that failed.
Can a .htaccess file cause a 500 error?
Yes. An unsupported directive or a rewrite loop in .htaccess returns a 500 for the whole site. Rename the file to test.
What permissions should WordPress files have on cPanel?
644 for files and 755 for folders, owned by your cPanel user. Never use 777.
Why did my site show a 500 error after a WordPress update?
Most often a plugin or theme is not compatible with the new version, or with your PHP version. Use the recovery mode email or the debug log to find which one.
Hosting where someone reads the logs with you
Our shared hosting and WordPress hosting run on cPanel with LiteSpeed and daily JetBackup backups, so a bad update can be undone by restoring the files from before it. If a 500 error will not go away, open a ticket and our team will look at the server-side logs you cannot see. Moving from a host where this keeps happening? We offer free migration.
Tags:
Related articles
How to fix “Error establishing a database connection” in WordPress on cPanel
Check wp-config.php against Manage My Databases, reset the database password, repair damaged tables, then rule out the server.
Read More →How to fix PHP files downloading instead of running
After moving cPanel accounts to a LiteSpeed server, PHP files can download in the browser instead of running. Here is why, and the script that fixes it.
Read More →



