loading
How to Migrate Your Website to a New Web Host Safely
Imprimir
  • Switch Hosts, change web host, switch web hosting, migrate website, WordPress migration, website migration, DNS migration, transfer website, Beta Host, hosting migration, cPanel migration
  • 33

How to Migrate Your Website to a New Web Host Safely

Moving a website from one hosting provider to another doesn't have to cause downtime or data loss. With proper preparation, you can copy your website to the new server, test it, update DNS and complete the migration with minimal disruption.

This guide explains how to migrate a website safely to a new web host.

1. Don't Cancel Your Old Hosting Yet

One of the most important rules when changing web hosts is to keep your existing hosting account active until the migration is completely finished.

Your old server provides a working copy of your website while you prepare and test the new hosting environment.

Cancelling the old account too early can result in:

  • Website downtime

  • Loss of files

  • Lost databases

  • Missing emails

  • Difficulty recovering website data

Keep both hosting accounts active during the migration.

2. Create a Complete Backup

Before moving anything, create a backup of your website.

Depending on your website, this may include:

  • Website files

  • MySQL or MariaDB databases

  • Email accounts and messages

  • SSL-related configuration

  • Cron jobs

  • DNS records

  • Subdomains

  • Redirects

  • Custom PHP settings

  • Application configuration files

Don't rely entirely on your previous hosting provider's backup system.

Maintain your own copy of important website data before beginning the migration.

3. Set Up the New Hosting Account

Your new hosting account should be ready before you change nameservers or DNS records.

If you're moving to Beta Host, your hosting account information will provide the details required to access the new hosting environment.

Do not point your domain to the new server until the website has been transferred and tested.

4. Transfer Your Website Files

Website files can normally be transferred through:

  • cPanel

  • File Manager

  • FTP or SFTP

  • A full cPanel migration

  • A website migration tool

  • A backup and restore process

Make sure all required files are transferred, including hidden files such as .htaccess where applicable.

For WordPress websites, the files alone aren't enough. You must also transfer the database.

5. Transfer the Database

Dynamic websites such as WordPress usually store important content and settings in a database.

Export the database from the old hosting account and import it into the new one.

You may then need to create a database user and assign the appropriate permissions.

Check your application's configuration file afterward to make sure it contains the correct:

  • Database name

  • Database username

  • Database password

  • Database host

For WordPress, these settings are normally stored in wp-config.php.

6. Recreate Email Accounts Where Necessary

If you use email addresses hosted with your domain, don't forget them during the migration.

Examples include:

[email protected]

[email protected]

[email protected]

Create the required email accounts on the new server before changing DNS.

If existing messages need to be preserved, migrate or back them up separately.

Website migration and email migration aren't always the same process.

7. Check Your PHP Version and Extensions

The new hosting environment may use a different PHP configuration from your previous provider.

Before switching traffic, check that your website is compatible with the PHP version available on the new server.

Also verify any PHP extensions required by your application.

Beta Host customers can manage supported PHP versions through cPanel where available.

If necessary, see our knowledgebase article:

How to Change PHP Version in cPanel

8. Test the Website Before Changing DNS

Don't assume that a successful file transfer means the website is ready.

Test the migrated website before directing your visitors to the new server.

Check:

  • Homepage

  • Internal pages

  • Images

  • Forms

  • WordPress dashboard

  • Login functionality

  • Database connections

  • Shopping cart

  • Checkout

  • Payment gateways

  • Customer accounts

  • Email notifications

  • SSL

  • Redirects

  • Scheduled tasks

For an e-commerce website, place a test order if possible.

Testing before changing DNS gives you an opportunity to fix problems without affecting your live visitors.

9. Update Your Domain's DNS

Once the website is working correctly on the new server, you can point your domain to the new hosting environment.

Depending on your setup, this may involve changing:

  • Nameservers

  • A records

  • AAAA records

  • CNAME records

  • Other DNS records

Use the DNS information supplied by your new hosting provider.

If you're changing nameservers, update them through the company where your domain is registered.

10. Understand DNS Propagation

DNS changes aren't always visible everywhere immediately.

Different internet providers and DNS resolvers may cache previous DNS information for a period of time.

During this transition, some visitors may temporarily reach the old server while others reach the new one.

This is another reason you shouldn't cancel your old hosting immediately after changing DNS.

Keep both environments available until you're satisfied that traffic has moved successfully.

11. Consider DNS TTL Before Migration

If you manage your DNS records directly, reducing the TTL before a planned migration may help DNS resolvers refresh records sooner after the change.

This should ideally be done before the migration rather than immediately before changing the server address.

After the migration is complete and stable, the TTL can be adjusted again according to your DNS requirements.

This step isn't mandatory for every migration.

12. Install and Verify SSL

Once the domain points to the new server, make sure HTTPS works correctly.

Check that:

https://yourdomain.com

loads without certificate warnings.

Also check important subdomains if they use SSL.

If your website forces HTTPS through .htaccess or application settings, make sure the SSL certificate is active before enabling redirects that depend on HTTPS.

13. Check Your DNS Records Carefully

A migration can affect more than the website.

If you're changing nameservers, make sure important DNS records are recreated correctly.

These may include:

  • A records

  • MX records

  • CNAME records

  • TXT records

  • SPF

  • DKIM

  • DMARC

  • Verification records

  • Third-party service records

Missing email-related DNS records can cause mail delivery problems even when the website itself works correctly.

14. Monitor the Website After Migration

Continue monitoring the website after changing DNS.

Check for:

  • Broken pages

  • Missing images

  • Database errors

  • SSL errors

  • Failed forms

  • Email delivery problems

  • Unexpected redirects

  • Application errors

  • Increased 404 errors

  • Payment or checkout problems

Reviewing server and application logs can also help identify problems that aren't immediately visible.

15. Keep the Old Hosting Temporarily

Don't cancel the old hosting account immediately after seeing the website load from the new server.

Keep it active long enough to confirm that:

  • DNS has moved successfully

  • The website works correctly

  • Email is functioning

  • Important data has been transferred

  • No recent content or transactions are missing

Once you're satisfied that the migration is complete, you can close the old hosting account according to the provider's cancellation procedure.

Migrating a WordPress Website

WordPress migrations require both website files and the database.

After migration, check:

  • wp-config.php

  • WordPress administrator access

  • Themes

  • Plugins

  • Permalinks

  • Media files

  • Caching

  • PHP compatibility

  • Scheduled tasks

  • Contact forms

  • Email delivery

Clear old application and CDN caches after the migration where appropriate.

If the domain name itself is changing, additional database URL updates may also be required.

Migrating an E-commerce Website

E-commerce migrations require extra care because customers may continue placing orders while you're transferring the website.

You should plan how to prevent new orders, customer registrations or inventory changes from being lost between the old and new databases.

For a busy store, consider scheduling the final migration during a lower-traffic period and using an appropriate maintenance or synchronization process.

Always test payment gateways and checkout functionality after migration.

Should You Share Your Hosting Password With a New Provider?

Avoid sending hosting passwords through ordinary email, chat messages or other insecure channels.

If a hosting provider offers migration assistance and requires access to your old account, use the provider's official secure support system and provide only the access necessary for the migration.

Where possible, create temporary credentials specifically for the migration and remove or change them afterward.

Never publish login credentials in a public support conversation.

Can a Website Be Migrated Without Downtime?

Many website migrations can be completed with little or no noticeable downtime when properly planned.

The basic approach is:

  1. Keep the old website online.

  2. Copy the website to the new server.

  3. Test the new copy.

  4. Prepare DNS.

  5. Change the DNS records.

  6. Keep the old server available during the transition.

  7. Monitor the new server.

  8. Cancel the old hosting only after confirming the migration is complete.

Complex websites may require additional planning, especially if their databases change frequently.

Moving Your Website to Beta Host

If you're migrating an existing website to Beta Host, contact our technical support team through the client area to determine whether migration assistance is available for your hosting plan.

Before requesting a migration, make sure you have a current backup of your website and access to the existing hosting environment.

Our support team can help with hosting-level migration requirements and advise you on the information needed to move your website safely.

Final Migration Checklist

Before considering your migration complete, confirm that:

  • All website files have been transferred

  • Databases are working

  • Email accounts are configured

  • DNS records are correct

  • SSL is active

  • Forms work

  • WordPress or other CMS login works

  • Payment systems work where applicable

  • Scheduled tasks are functioning

  • The website works on mobile and desktop

  • The new hosting account is receiving traffic

  • A current backup exists

Once everything has been verified, you can safely retire the old hosting environment.

Esta resposta foi útil?

Artigos Relacionados