Troubleshooting

Fix a 500 Internal Server Error in WordPress

Troubleshoot a WordPress 500 Internal Server Error on cPanel: check error logs, reset .htaccess, fix PHP settings and permissions, and isolate plugins or the theme.

IntermediatecPanel hosting3 min read

A 500 Internal Server Error means the web server could not complete the request but did not say why. In WordPress it is usually caused by a broken .htaccess rule, a PHP fatal error, wrong file permissions or a resource limit. The error log tells you which one.

Before you start

  • Access to cPanel and File Manager with hidden files shown.
  • Note what changed last: a plugin install, an update, a PHP version switch or an edited file.

Read the error log

  1. Open cPanel → Metrics → Errors. It shows the most recent server errors for your account.
  2. Look in the site's folder for an error_log file and read the last lines.
Log message containsLikely cause
Invalid command or .htaccessBad line in .htaccess
PHP Fatal errorPlugin, theme or PHP version
Permission denied or is writable by groupWrong permissions
Allowed memory sizePHP memory limit
php_value not allowedPHP setting in .htaccess that LiteSpeed/CloudLinux does not accept there

Reset .htaccess

  1. In File Manager rename .htaccess to .htaccess-broken.
  2. Reload the site. If it works, the file was the problem.
  3. Go to Settings → Permalinks and click Save Changes to create a clean file, then copy back any rules you still need, one block at a time.

Note: Remove php_value and php_flag lines from .htaccess. Set PHP values in cPanel → Software → Select PHP Version → Options or the MultiPHP INI Editor instead.

Fix permissions

Folders should be 755 and files 644. Files set to 777 or folders writable by the group can be refused for security reasons and cause a 500 error. In File Manager select the item, click Permissions and correct the values. Over SSH you can fix a whole site:

find ~/public_html -type d -exec chmod 755 {} \; && find ~/public_html -type f -exec chmod 644 {} \;

Isolate plugins and the theme

If the log shows a PHP fatal error, rename wp-content/plugins to plugins-off. If the site loads, rename it back and reactivate plugins one by one. If not, rename the active theme's folder to fall back to a default theme.

Check PHP version and limits

  • If the error began after changing PHP, switch back in cPanel → Software → Select PHP Version and test.
  • Increase memory_limit to 256M if the log mentions memory.
  • Check cPanel → Metrics → Resource Usage. If the account reached its entry process or memory limit, visitors may get 500 or 508 errors until traffic drops.

Replace core files

If nothing else helps, a core file may be corrupted. Download the same WordPress version, then upload fresh wp-admin and wp-includes folders, overwriting the old ones. Your content and wp-content are untouched.

Still stuck?

Open a ticket at Support → New ticket with the URL, the time the error happened and what you already tried. Our team can read server logs that are not visible in cPanel.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.