How to Fix a 500 Internal Server Error
A 500 error usually means a PHP or .htaccess problem. Here's how to diagnose and fix it quickly.
Fixing a 500 Internal Server Error
A 500 Internal Server Error means the server encountered an unexpected condition. It is almost always caused by a PHP error, a corrupt .htaccess file, or incorrect file permissions.
Step 1 — Check the Error Log
- Log into cPanel
- Go to Metrics → Errors
- Read the most recent entries — the error message will tell you exactly what went wrong
Alternatively, check public_html/error_log via File Manager.
Step 2 — Test Your .htaccess File
A corrupt .htaccess is the most common cause.
- In File Manager, navigate to
public_html - Rename
.htaccessto.htaccess_backup - Refresh your website
If the error disappears, your .htaccess was the problem. Create a new one with just:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Step 3 — Check File Permissions
Incorrect permissions cause 500 errors. Correct values:
- Folders: 755
- Files: 644
- wp-config.php: 600 (WordPress)
To fix in File Manager: select all files → Change Permissions.
Step 4 — Check PHP Version
Your script may require a specific PHP version.
- In cPanel, go to Software → MultiPHP Manager
- Try switching to PHP 8.1 or PHP 8.2
- Refresh your site
Step 5 — Increase PHP Memory Limit
Add this to your .htaccess:
php_value memory_limit 256M
php_value max_execution_time 300
Still Getting the Error?
WhatsApp our support team at +254 733 338 989 with your domain name and we will diagnose it within 15 minutes.
Still need help?
Our Kenyan support team is on WhatsApp — real people, not bots. We respond in under 15 minutes.