1. Theme Issues
A new theme or update can trigger the 500 error.
-
If you can access WordPress admin, switch to a default theme.
-
If not, use phpMyAdmin:
-
Open the
wp_optionstable. -
Edit the
templateandstylesheetvalues to a default theme like Twenty Twenty. -
Save and reload your site.
-
2. Corrupted .htaccess File
-
Rename the
.htaccessin yourpublic_htmlfolder to disable it. -
Create a new
.htaccessif needed.
3. PHP Memory Limit
-
Scripts and plugins need sufficient memory.
-
Add to
.htaccessto increase limits:
4. Incompatible PHP Version
-
Some plugins require specific PHP versions.
-
Change it in cPanel or DirectAdmin → Select PHP Version, test, and refresh your site.
5. Enable Error Display
-
Turn on
displayErrorsandlog_errorsvia PHP Options to see the specific issue.
6. WordPress Debugging
-
Enable WordPress Debug to generate logs in
wp_contentor display errors directly on your site.
7. Restore a Backup
-
If you have a working backup, remove recent files and restore the backup.
8. Re-upload Core WordPress Files
-
Download WordPress from wordpress.org.
-
Remove
wp-config-sample.phpand thewp-contentfolder to avoid overwriting. -
Upload the remaining files via FTP to replace core files.
9. Contact Your Hosting Provider
-
If the issue persists, contact Hostking support. They can check server logs and locate the root cause.
