So, you just migrated your WordPress site and… BOOM! A mysterious message shows up on your screen.
“There has been a critical error on this website.”
Yeah, we know. Not your idea of a warm welcome. But don’t worry — we’re here to explain it in the simplest, most fun way possible. 😄
This error is WordPress’s way of saying, “Something is broken, and I don’t want to show anything until it’s fixed.”
It doesn’t tell you much. That’s what makes it annoying. But the good news is — you can fix it!
When you move your site from one place to another (like a new host or different domain), a lot of things can go wrong. Here are some common causes:
Let’s walk step by step through some fixes. You don’t need to be a tech wizard. Just follow along!
Before you do anything else, let’s find out what exactly is causing the problem.
Open your wp-config.php file. This file is in the root folder of your WordPress installation.
Look for this line:
define( 'WP_DEBUG', false );
Change it to:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
This tells WordPress to log all errors but not display them. The log file will be saved in
/wp-content/debug.log
Check that file after accessing your site again. It’ll tell you what’s breaking things.
Your site might be using a custom theme that doesn’t like its new home.
If you can, log into your WordPress Dashboard and go to:
But if you can’t access the dashboard, change the theme through the database.
twentytwentyone
or another default themePlugins are great. But they can be drama queens during a migration.
You can do this one of two ways:
This deactivates all plugins instantly.
Then try loading your site again. If it works, you’ll need to re-enable plugins one by one to see which one caused the mess.
If your site URL settings are wrong, WordPress gets confused.
To fix them:
Still not working? You can also override these in wp-config.php like this:
define( 'WP_HOME', 'https://yourdomain.com' ); define( 'WP_SITEURL', 'https://yourdomain.com' );
Your database may have gotten a few bumps during the move.
To repair it:
/* That's all, stop editing! */
:define( 'WP_ALLOW_REPAIR', true );
Then visit this URL in your browser:
https://yoursite.com/wp-admin/maint/repair.php
Follow the instructions to repair and optimize your database.
Don’t forget to remove that line from wp-config.php afterward!
WordPress needs the right version of PHP to run smoothly. Too old or too new, and it throws a tantrum.
Check your current version using your hosting control panel. WordPress recommends:
If you’re running something older (like 7.2), upgrade it. If you went too futuristic with PHP 8.2 and things broke, try downgrading to 8.0 or 8.1.
You can usually change the PHP version through your host’s control panel, often under something like “Select PHP Version.”
Sometimes files don’t transfer well during a migration. And WordPress gets cranky when it can’t find what it needs.
You can manually reupload the core files:
This will replace any corrupted files without touching your content or settings.
Here are some extra things to consider just in case:
Still getting that critical error after trying everything? It might be time to call in the big guns. 💪
Contact your host’s support team. They can check server logs, database settings, and other stuff that’s above your pay grade.
You can also try a WordPress-specific support forum like:
The “critical error” sounds scary… but it’s usually fixable. The key is to go step by step, stay calm, and maybe even smile a little along the way 😊
Remember: every WordPress expert once broke their site and saw this same