How to Roll Back a Website Migration That Went Wrong

If a migration breaks your site, here is how to safely roll back to the working version with no data loss and minimal downtime.

· Updated · 583 views

A migration occasionally goes wrong, but if you planned ahead, rolling back is simple. The golden rule is to never delete the old site until the new one is fully verified.

The Safety Net: Keep the Old Host Active

As long as your old hosting account is still live and your DNS has not been switched, your site is never truly down. You can revert instantly.

If You Have NOT Switched DNS Yet

Nothing is live on NairoHost for the public, so simply:

  1. Fix the issue on the NairoHost copy at your leisure using the hosts file preview method
  2. Switch DNS only once it works

There is no rollback needed because visitors still see the old, working site.

If You HAVE Switched DNS and the Site Is Broken

  1. Point nameservers back to your old host immediately to restore the working site for visitors
  2. DNS revert takes effect within the TTL window, often quickly
  3. Diagnose the NairoHost copy without time pressure
  4. Re-attempt the switch once fixed

Restoring From Backup

If the broken site is on NairoHost and you need a clean slate:

  1. In cPanel, use Backup or JetBackup to restore a known-good copy
  2. Or re-import your original migration export file

Prevent It Next Time

  • Always test with the hosts file before switching DNS
  • Keep the old host active for at least a week after go-live
  • Take a fresh backup before any major change

Tip: Lowering your DNS TTL a day before migration makes any rollback propagate faster.

Stuck mid-migration? Contact support via the /contact page and we will help you recover.

Was this article helpful?

Your feedback helps us improve our documentation.

Still Need Help?

Our support team is available 24/7 to assist you.