Support article
How to switch hosting without downtime
Learn how to switch to miHosting without downtime: migrate files, database, email, and DNS in an orderly, step-by-step way.
Introduction
Switching hosting providers doesn’t have to mean your website goes down. Most downtime during a migration happens because the DNS change is made too soon, files or databases are forgotten, email isn’t checked, or the previous hosting is cancelled too early.
In this guide we explain how to switch to miHosting without downtime, what to check before moving your website, and how to minimize any interruption during the change. If you’re also worried about losing Google rankings during the process, check out how to migrate hosting without losing your SEO rankings.
Before you start: what you should have ready
Before starting the migration, make sure you have access to:
- Your current hosting panel, such as cPanel, DirectAdmin, or another panel.
- Your new miHosting panel.
- The domain registrar or the domain’s DNS zone.
- The website’s files.
- The databases, if the site uses WordPress, PrestaShop, Joomla, or another CMS.
- Email accounts, passwords, and current configuration.
- A recent backup.
If you’re moving a professional website or an online store, it’s best to do the migration during a low-traffic period to reduce risk. If you’d rather not handle these steps yourself, at miHosting migration is included at no extra cost on every paid plan: our technical team moves your website, email, and databases for you.
Steps to switch hosting without downtime
1. Don’t cancel your previous hosting yet
The first common mistake is signing up for new hosting and cancelling the old one right away. Don’t do that.
During a migration, the old hosting needs to stay active until you’ve confirmed that:
- The website works correctly on the new server.
- Email is being sent and received without issues.
- The DNS already points to the new hosting.
- DNS propagation has completed.
- No visitors are still reaching the old server.
It’s best to keep both services active for a few days to avoid interruptions.
2. Lower the DNS TTL before the change
The TTL determines how long other servers cache your domain’s DNS records.
If you lower the TTL before switching hosting, the IP change will propagate faster when the time comes. For example, if your domain’s records have a TTL of 14400 or 86400 seconds, you can temporarily lower it to 300 seconds a few hours before the migration. This is usually changed from the domain’s DNS zone.
Important: lowering the TTL right at the moment of the change doesn’t always help, since external servers may keep using the previous value until it expires.
3. Make a full copy of your website
Before moving anything, download a complete copy of the current site. This copy should include:
- Website files.
- Databases.
- Email accounts, if they’re being migrated.
- Custom configurations.
- SSL certificates, if applicable.
- Cron jobs, redirects, and special rules.
In cPanel or DirectAdmin you can generate full or partial backups depending on the case. If you use WordPress or PrestaShop, you can also export the database from phpMyAdmin and download the files via FTP or the file manager.
4. Migrate the files to the new hosting
Upload the website’s files to the new server using FTP, SFTP, or the panel’s file manager.
On cPanel hosting, the public folder is usually public_html. On DirectAdmin, it’s usually found under a path similar to domains/yourdomain.com/public_html.
Check that every file was copied, especially:
- Hidden files such as
.htaccess. - Image and upload folders.
- Configuration files.
- Folder and file permissions.
- The PHP version required by the website.
5. Migrate the database
If your website uses a database, export it from the previous hosting and import it into the new one.
Then update the website’s configuration file with the new connection details: database name, database user, password, and database server (usually localhost).
On WordPress, this data is in the wp-config.php file. On PrestaShop, the location can vary by version, but it’s usually found in configuration files inside the app/config or config folder.
6. Check the PHP version and required extensions
A website can break even if the files and database were migrated correctly, if the new server uses an incompatible PHP version.
Before changing the DNS, check the PHP version, the PHP memory limit, the required extensions, and compatibility with WordPress, PrestaShop, or the CMS in use. If your website was running on a specific PHP version, try to replicate that configuration on the new hosting and update it gradually if needed.
7. Test the website before changing the DNS
Before pointing the domain to the new server, test that the website works. You can do this a couple of ways: using a temporary URL if your hosting offers one, or editing your computer’s hosts file so the domain loads from the new IP.
The hosts file option lets you test the site as if the domain already pointed to the new hosting, but only from your own computer. You should check:
- The homepage.
- Internal pages.
- Forms.
- The cart and checkout process, if it’s an online store.
- Access to the admin panel.
- Sending emails from the website.
- Images and attachments.
- Redirects and permalinks.
8. Set up the email accounts on the new hosting
If the domain’s email is also managed on the hosting, create the same email accounts on the new server before changing the DNS or nameservers — for example info@yourdomain.com, sales@yourdomain.com, or support@yourdomain.com.
Also check passwords, mailbox quotas, forwarding, auto-replies, mail filters, MX records, and SPF, DKIM, and DMARC records.
If you use an external email service, don’t change the MX records without first reviewing the current configuration. In that case, switching web hosting shouldn’t affect email as long as the DNS records are kept correct.
9. Migrate old emails if needed
Creating the accounts on the new hosting doesn’t always move over old emails. If you need to keep previous messages, you can migrate them via IMAP sync, panel migration tools, or manual copies from an email client. You can also check how to transfer email from one server to another if you need help with this step.
Before changing the DNS, confirm that important mailboxes are ready and that users know about the new configuration if the mail server is changing.
10. Change the DNS or nameservers
Once the website has been tested and email is ready, you can make the change. There are two common ways to do this:
- Change the nameservers: points the domain to the new hosting provider’s DNS servers (for example
ns1.example.comandns2.example.com). This moves the entire DNS management to the new provider. - Change only specific DNS records: keeps the current DNS zone and changes specific records, such as the domain’s A record, the
wwwA record, the MX records if email is also changing, or the SPF, DKIM, and DMARC records. This gives you more control but requires carefully reviewing each record.
If you’re not sure which option to use, first check where your domain’s DNS zone is currently managed.
11. Activate or check the SSL certificate
After pointing the domain to the new server, activate the SSL certificate so the site loads correctly over HTTPS. On cPanel or DirectAdmin, this can usually be installed from the panel’s corresponding section.
Afterward, check that the site loads with https://, that no “not secure” warnings appear, that there’s no mixed content (such as images loading over HTTP), and that HTTP-to-HTTPS redirects work correctly.
12. Check DNS propagation
DNS propagation is the time it takes for DNS changes to be reflected across different Internet providers. During this period, some visitors may reach the old hosting while others reach the new one. That’s why it’s important to keep both services active temporarily.
You can check propagation by looking up the DNS records from different locations. Pay special attention to the A record’s IP, the active nameservers, the MX records, the SSL certificate’s status, and whether email is working.
13. Check the logs and real-world behavior
After the change, monitor the website for a few hours or days. Check for 404 errors, 500 errors, forms that don’t submit, orders or user registrations, emails that don’t arrive, CPU/memory/disk usage, cron jobs, and automatic backups.
If you spot errors, you can still compare them against the old hosting and fix them before cancelling the old service.
14. Cancel the previous hosting only once everything is confirmed
Once you’re sure the domain points to the new hosting, the website works correctly, and email is operational, you can cancel the previous hosting. Before doing so, download one last backup and confirm there’s no pending information left on the old server.
Useful tips to avoid interruptions
- Do the migration during low-traffic hours.
- Don’t modify the website while copying files and the database.
- If you have an online store, consider putting it in maintenance mode during the final copy.
- Lower the TTL ahead of time.
- Keep the previous hosting active for a few days.
- Check email before and after the change.
- Don’t change MX records if you don’t know where email is managed.
- Check the PHP version before migrating.
- Keep backups on your computer or external storage.
- Document the changes you make.
If your website has grown in traffic, orders, or resource usage, the migration can also be a good moment to check whether your current hosting plan is still the right fit. In some cases it’s worth moving to professional hosting, a VPS, or a dedicated server depending on your project’s real usage.
Common problems when switching hosting
The website loads in some places but not others
This is usually due to DNS propagation. Some Internet providers may still be showing the old IP while others already show the new one. Keep both hostings active until the change has fully propagated.
The website shows a database connection error
Check that the configuration file has the correct data for the new database: name, user, password, server, and user permissions. On WordPress, check the wp-config.php file.
A 500 error appears after migrating
This can be caused by an incompatible PHP version, incorrect .htaccess rules, file permissions, or missing PHP extensions. Check the hosting panel’s error log to identify the exact cause.
Email stopped working
This can be caused by incorrect MX records, accounts not yet created on the new hosting, DNS that hasn’t propagated, or issues with SPF, DKIM, and DMARC. Before changing the DNS, confirm whether email is managed on the hosting or through an external service.
The website loads without HTTPS
This means the SSL certificate isn’t installed, wasn’t issued correctly yet, or the website isn’t redirecting to HTTPS. Check the panel’s SSL section and confirm the domain already points to the new server.
Frequently asked questions
Can I switch hosting without my website going down?
Yes. To do this, migrate the files, databases, and email first, test the website on the new server, and change the DNS only once everything is ready.
How long does DNS propagation take?
It depends on the previous TTL, the registrar, the DNS provider, and each network’s cache. It can take anywhere from a few minutes to several hours.
Should I change the nameservers or just the IP?
It depends on where you want to manage the DNS. Changing nameservers moves all DNS management to the new provider. Changing only the IP keeps the current DNS zone and only changes where the website points.
What happens to my email when I switch hosting?
If email is managed on the hosting, you need to create the accounts on the new server and migrate the messages if you want to keep them. If you use external email, you need to keep the current MX records correctly configured.
Do I need to migrate WordPress differently?
WordPress requires moving files and the database. You should also check wp-config.php, permalinks, the PHP version, plugins, themes, caching, and the SSL certificate.
Can I cancel the old hosting right after changing the DNS?
Not immediately. It’s best to wait for DNS propagation to finish and confirm that the website, email, and SSL are working correctly from the new hosting.
Can miHosting help me with the migration?
Yes. Migration is included at no extra cost on paid plans: our technical team handles moving your website, email, and databases. You can contact support to review your case and get guidance based on your type of website, control panel, email, and domain.
Conclusion
Switching hosting without downtime mainly depends on good planning. First copy and test the website on the new server, prepare email, review the DNS configuration, and switch the domain only once everything is ready.
The key is not cancelling the previous hosting until you’ve confirmed the migration is complete. With a backup, a lowered TTL, active SSL, and email accounts ready, switching hosting can be done safely, with minimal or even unnoticeable interruption for visitors.
If you’d rather have our technical team handle the whole process, check out our professional hosting plans or contact us: free migration is included and avoids most of the risks described in this guide.