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:

    1. Open the wp_options table.

    2. Edit the template and stylesheet values to a default theme like Twenty Twenty.

    3. Save and reload your site.

2. Corrupted .htaccess File

  • Rename the .htaccess in your public_html folder to disable it.

  • Create a new .htaccess if needed.

3. PHP Memory Limit

  • Scripts and plugins need sufficient memory.

  • Add to .htaccess to increase limits:

 
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
php_value memory_limit 256M

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 displayErrors and log_errors via PHP Options to see the specific issue.

6. WordPress Debugging

  • Enable WordPress Debug to generate logs in wp_content or 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.php and the wp-content folder 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.

هل كانت المقالة مفيدة ؟ 0 أعضاء وجدوا هذه المقالة مفيدة (0 التصويتات)