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
- Log in to your old hosting via FTP (FileZilla)
- Go to
public_htmlorwwwfolder - Download EVERYTHING to your computer
- This can take 10-60 minutes (depending on size)
Database
- Open phpMyAdmin in your old hosting
- Select your database
- Click "Export"
- Choose "Quick export" and "SQL" format
- Download the .sql file
Email (optional)
If you want to keep email:
- Set up your email client with IMAP
- Emails will be automatically synchronized
- Or export from webmail
Step 2: Prepare new hosting
Create database
- Log in to your new hosting (cPanel/DirectAdmin)
- Go to MySQL Databases
- Create new database
- Create database user
- Assign user to database
- 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
- Connect to your new hosting (FTP)
- Go to
public_htmlor correct domain folder - Upload all files from your backup
- This can take 15-90 minutes
Tip: Upload in multiple sessions if your connection is slow.
Import database
- Open phpMyAdmin on new hosting
- Select your new database
- Click "Import"
- Choose your .sql backup file
- 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
- Open
C:\Windows\System32\drivers\etc\hostsas administrator - Add:
123.45.67.89 yourdomain.com(IP of new hosting) - Save
Mac/Linux
- Open
/etc/hostswith sudo rights - Add:
123.45.67.89 yourdomain.com - 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
- Log in to your domain registrar
- Go to DNS settings
- Change A-record to IP of new hosting
- 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
- Create email accounts on new hosting
- Copy old emails via IMAP
- 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:
- Go to SSL/TLS section in cPanel
- Click "Install Let's Encrypt SSL"
- 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:
- Verify everything works 100%
- Download final backup from old hosting
- 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
- Parallel hosting - Keep both hosts active
- Content freeze - Stop updates during migration
- Evening/night - Migrate when traffic is low
- 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.
Related articles
What is PHP Memory Limit? Increase Memory Limit
Discover what PHP memory limit is, why you need to increase it and how to adjust memory_limit for better performance.
301 Redirect: Permanent Redirect Explained
Learn what a 301 redirect is, when to use it and how it affects your SEO.
404 Error: Page Not Found Explained
Discover what a 404 error is, what causes it and how to fix and prevent 404 errors.
500 Internal Server Error: Causes and Solutions
Learn what a 500 error is, common causes and how to fix this server error.
503 Service Unavailable: Server Overloaded
Discover what a 503 error means, what causes it and how to fix or prevent it.