I switched hosting providers and now my site is broken — how do I fix it?
A step-by-step guide for a site that broke after migrating hosting: DNS, missing files, and the database connection.
You moved your site to a new hosting provider, followed the tutorial, and now you're staring at a blank page, an error message, or the old site that refuses to disappear. It's frustrating, but here's the good news: almost every post-migration problem falls into three clear buckets — and each one has a logical cause, not a curse.
In this article I'll show you how to quickly diagnose what broke: DNS propagation (the site looks old or flickers between versions), missing files (blank page or 404/500 errors), and the database connection (the classic "Error establishing a database connection"). You don't need to be a developer — just patience and the right order of checks.
First, breathe: don't delete anything on the old host
The most expensive mistake after a migration is cancelling your old account the same day. As long as the old host is live, you have a working copy of your site and a safety net.
Before you fix anything, do this:
- Keep the old account active for at least a week after migrating.
- Download a full local copy: the files (via FTP or file manager) and the database (SQL export from phpMyAdmin).
- Write down exactly what you changed and when — it helps you roll back if something goes sideways.
A migration isn't irreversible as long as you hold a backup. Panic makes you delete the very thing you'll need later.
Site looks old or flickers? That's DNS propagation
If you sometimes see the new site and sometimes the old one, or a colleague sees something different from you, it's almost certainly DNS still propagating. In plain terms, the internet still remembers where your site used to live.
What to check, in order:
- Do the nameservers or the A record in your domain account actually point to the new host? This is where most people slip.
- Use a "DNS checker" tool to see whether the new IP address has propagated globally.
- Flush your local DNS cache and try from mobile data or an incognito window.
Propagation can take anywhere from a few minutes to a day or two, depending on the TTL value. If the IP is correct everywhere, there's nothing left to fix — you just wait.
Blank page or 404/500 error? Files are missing or misconfigured
If DNS is correct but the page is empty or throws an error, the problem is with the copied files. FTP transfers drop often and leave things half-finished.
Check one by one:
- The files landed in the correct folder (usually public_html or www), not in a subfolder.
- Hidden files like .htaccess were copied — a missing one often causes a 500 error.
- The file count on the new host matches the old host.
- Permissions are standard: generally 644 for files and 755 for folders.
If you only see plain text with no design, usually the theme files didn't upload or the CSS paths are wrong. Re-upload that whole folder, not just a few files.
"Error establishing a database connection"? That's the clearest error
Ironically, this message is friendly: it tells you exactly where to look. The site finds its files but can't talk to the database.
On a WordPress site, open wp-config.php and compare it against your new database details:
- Database name (DB_NAME) — on the new host it almost certainly has a different name.
- User (DB_USER) and password (DB_PASSWORD) — these must be recreated on the new server.
- Host (DB_HOST) — sometimes it isn't "localhost" but an address your new host provides.
Then make sure you actually imported the exported database (the .sql file) into the new phpMyAdmin and that the user has privileges on it. Most errors of this kind come from a mistyped password or a database that only imported halfway.
When it's worth asking for help — and how we work
If you've checked DNS, files, and the database and it still won't work, or you simply don't want to be poking around wp-config and phpMyAdmin on the site your clients come from, it's perfectly reasonable to hand the problem off.
At MPO Web Studio we work fully remotely — it doesn't matter whether you're in Cluj, Bucharest, or a village in Transylvania. You give us hosting access, we look at the three suspects above, and we tell you honestly what happened and what it costs, with no surprises.
And if you're thinking of replacing the site entirely anyway, we can build a ready-made demo before you pay anything — see the result, then decide. Send us a WhatsApp message with your site address and the error you're seeing, and we'll quickly tell you whether it's a few-minute fix or something bigger.
Frequently asked questions
How long does DNS propagation take after switching hosts?+
Usually from a few minutes to a few hours, but it can stretch to a day or two. It depends on the TTL value set on your domain. For a fast transition, lower the TTL a day before migrating.
Can I cancel the old hosting right after moving my site?+
No, that's risky. Keep the old account active for at least a week, until you confirm everything works and DNS has fully propagated. It's your only safety net if the migration left something half-finished.
I lost images and files after the migration — can I still recover them?+
Almost certainly yes, if the old host is still active. Log in via FTP or file manager on the old account, download the content folder (on WordPress, wp-content/uploads), then upload it to the new host. This is exactly why you don't delete anything early.
How do I know whether the problem is DNS or files?+
Simple rule: if you see the old site or it behaves differently on another device, it's DNS. If you see a blank page, a 500 error, or a database message, DNS is already correct and the problem is on the new server.
I'm not technical at all — could I make things worse by trying myself?+
As long as you have a full backup (files plus database), the risk is low — you can always revert. Just avoid deleting files or database tables. If you get stuck, you can give us access and we'll take a look.
7 mistakes that drive clients away from your website
Leave your email and get the guide right here, instantly. No spam.
Want to see what your business's website could look like?
Message us on WhatsApp and we'll build you a free demo website with your business name on it. See it first, then decide — no strings attached.