How to Fix the “There Has Been a Critical Error on Your Website” WordPress Error

Your Complete Business Growth Partner

  • Home
  • Discover
  • Solutions
  • How to Fix the “There Has Been a Critical Error on Your Website” WordPress Error
business-people-shaking-hands-together (1)
27
Mar, 2025

How to Fix the “There Has Been a Critical Error on Your Website” WordPress Error

There a time when your wordpress wesite may crash with an error 

There Has Been a Critical Error on Your Website” error  that you dont have access to the backend , This error mainly occurs due to plugins, themes and wordpress core files being corrupted. The good news is that this can be fixed, if you have access to a terminal in your server . If you are on cpanel you may need to copy a new wodpress core installation files , keeping in mind not to update the wp_content files since this are where your website content reside, Only update the other worpress files and folders.

Follow these steps on your server terminal . Assuming your website is located on  /var/www/website

 

1. Reinstall WordPress Core Files (Without Affecting Content)

Run the following command to reinstall WordPress core files at /var/www/website without affecting content:

bash
wp core download --skip-content --force --allow-root --path=/var/www/website

2. Update WordPress Core

bash
wp core update --allow-root --path=/var/www/website

3. Update All Plugins

bash
wp plugin update --all --allow-root --path=/var/www/website

4. Update All Themes

bash
 
wp theme update --all --allow-root --path=/var/www/website

5. Activate All Plugins

bash
 
wp plugin activate --all --allow-root --path=/var/www/website

6. Set Correct Permissions

Ensure correct file and folder permissions:

bash
 
chown -R apache:apache /var/www/website
find /var/www/website -type d -exec chmod 755 {} \;
find /var/www/website -type f -exec chmod 644 {} \;

Restart Apache:

bash
 
systemctl restart httpd

7. Verify Installation

Check the WordPress version:

bash
 
wp core version --allow-root --path=/var/www/ruwebsite

Need Help Fixing your site?

business-people-shaking-hands-together (1)

KK Dynamic Enterprise Solutions

Welcome to KK Dynamic Enterprise Solutions, your trusted partner in delivering innovative and transformative technology solutions. With a deep commitment to excellence and a passion for innovation, we empower businesses across industries to thrive in today’s fast-paced digital landscape.

Location

Nairobi Kenya

Follow Us