Skip to content
Probleem Oplossing

Migrate website: complete step-by-step plan

Last updated: 10 December 2025

Migrate website: complete step-by-step plan

Want to migrate your website to a new hosting provider? With this comprehensive guide it's guaranteed to succeed, without downtime or data loss.

Preparation (important!)

Checklist before you start

✅ New hosting already active ✅ FTP access to old AND new hosting ✅ Database access (phpMyAdmin) ✅ DNS management access at your domain registrar ✅ Backup of current website made ✅ List of email accounts

Tip: Plan migration during quiet time (evening/weekend) to minimize impact.

Step 1: Make backup

Website files

  1. Log in to your old hosting via FTP (FileZilla)
  2. Go to public_html or www folder
  3. Download EVERYTHING to your computer
  4. This can take 10-60 minutes (depending on size)

Database

  1. Open phpMyAdmin in your old hosting
  2. Select your database
  3. Click "Export"
  4. Choose "Quick export" and "SQL" format
  5. Download the .sql file

Email (optional)

If you want to keep email:

  1. Set up your email client with IMAP
  2. Emails will be automatically synchronized
  3. Or export from webmail

Step 2: Prepare new hosting

Create database

  1. Log in to your new hosting (cPanel/DirectAdmin)
  2. Go to MySQL Databases
  3. Create new database
  4. Create database user
  5. Assign user to database
  6. Note: database name, user, password!

Add domain (as addon domain)

Some hosts require you to first add the domain before you can upload files.

Step 3: Upload files

Via FTP

  1. Connect to your new hosting (FTP)
  2. Go to public_html or correct domain folder
  3. Upload all files from your backup
  4. This can take 15-90 minutes

Tip: Upload in multiple sessions if your connection is slow.

Import database

  1. Open phpMyAdmin on new hosting
  2. Select your new database
  3. Click "Import"
  4. Choose your .sql backup file
  5. Click "Go"

If file too large (>50 MB):

  • Split file
  • Or use SSH/command line
  • Or ask your hosting provider

Step 4: Adjust database configuration

WordPress

Edit wp-config.php:

define('DB_NAME', 'new_database_name');
define('DB_USER', 'new_db_user');
define('DB_PASSWORD', 'new_db_password');
define('DB_HOST', 'localhost'); // Sometimes different, check with provider

Joomla

Edit configuration.php:

public $db = 'new_database_name';
public $user = 'new_db_user';
public $password = 'new_db_password';
public $host = 'localhost';

Other systems

Look for database configuration file (often config.php or settings.php).

Step 5: Test website via hosts file

Important: Test your website BEFORE changing DNS!

Windows

  1. Open C:\Windows\System32\drivers\etc\hosts as administrator
  2. Add: 123.45.67.89 yourdomain.com (IP of new hosting)
  3. Save

Mac/Linux

  1. Open /etc/hosts with sudo rights
  2. Add: 123.45.67.89 yourdomain.com
  3. Save

Test your website

  • Open browser (private/incognito mode)
  • Visit http://yourdomain.com
  • Check all pages, forms, images
  • Test admin login

Everything works? Continue to next step!

Step 6: Change DNS

This is the moment your website 'moves'.

Change A-record

  1. Log in to your domain registrar
  2. Go to DNS settings
  3. Change A-record to IP of new hosting
  4. Save

Propagation time

DNS changes take 1-48 hours (usually within 4 hours).

During this time:

  • Some visitors see old site
  • Some visitors see new site
  • This is normal!

Step 7: Email migration

Two options:

Option A: Email on new hosting

  1. Create email accounts on new hosting
  2. Copy old emails via IMAP
  3. Update MX records at DNS

Option B: External email (recommended) Use Google Workspace or external email:

  • No downtime
  • Independent of hosting changes
  • MX records remain unchanged

Step 8: SSL certificate

Let's Encrypt (free)

Most hosts offer 1-click SSL:

  1. Go to SSL/TLS section in cPanel
  2. Click "Install Let's Encrypt SSL"
  3. Wait 5-10 minutes

Force HTTPS

Add to .htaccess:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Step 9: Test everything

Test checklist

✅ Homepage loads ✅ All pages accessible ✅ Images load ✅ Forms work ✅ Admin/login works ✅ Database interactions (comments, cart, etc.) ✅ SSL certificate active (green lock) ✅ Email send/receive works

Step 10: Cancel old hosting

Wait at least 1 week before canceling old hosting!

Why?

  • DNS can take longer
  • You have backup if something goes wrong
  • Email migration time

After 1-2 weeks:

  1. Verify everything works 100%
  2. Download final backup from old hosting
  3. Cancel old hosting

Common problems

Website doesn't show

  • Check DNS propagation (whatsmydns.net)
  • Verify A-record is correct
  • Check file permissions (755 for folders, 644 for files)

Database connection error

  • Check wp-config.php details
  • Verify database user has rights
  • Check if DB_HOST is correct (sometimes not 'localhost')

Images don't load

  • Check if uploads folder was migrated
  • Verify file permissions
  • Update URLs in database (search/replace old-domain.com → new-domain.com)

Email doesn't work

  • Verify MX records
  • Check email account login credentials
  • Wait for DNS propagation (up to 48 hours)

Minimize downtime

Tips for zero-downtime migration

  1. Parallel hosting - Keep both hosts active
  2. Content freeze - Stop updates during migration
  3. Evening/night - Migrate when traffic is low
  4. Status page - Communicate maintenance window

Need help?

Many hosting providers offer free migration service! Providers like TransIP, Vimexx and Hostnet often migrate your website for free.

Or see which providers offer the best migration services.

Conclusion

Migrating a website is manageable with these steps. The key is:

  • Good preparation
  • Complete backup
  • Testing before DNS change
  • Keep old hosting during propagation

Good luck with your migration!

Was this article helpful?

Compare hosting packages directly to find the best choice for your situation.

đŸĒ We use analytics cookies for statistics. The site works fine without them too. Learn more