How Do I Move My Website to a New Server in Egypt?

Short answer: Order a server in Cairo, lower your DNS TTL to about 300 seconds at least 24–48 hours before the move, take a full backup of files and database, set up the new server with the same software versions, copy and import everything, test it through your local hosts file, then switch DNS. Keep the old server running for a few days and re-issue SSL on the new one.
Last updated: November 2026
Most failed migrations fail because steps run in the wrong order, not because a step is hard. This guide focuses on that order for a move to a server in Egypt.
What needs to move?
Make this list first. Anything missing here breaks after the switch.
| Item | What to move | How to check it works |
|---|---|---|
| Files | Website code, uploads, images, config files (e.g. .env, wp-config.php) |
Pages and media load from the new server |
| Database | Full export (MySQL/MariaDB/PostgreSQL) | Logins, orders and forms work |
| Mailboxes and messages, if email is hosted on the old server | Send and receive a test message | |
| SSL | Certificate for every domain and subdomain | Browser shows a valid padlock on all URLs |
| Cron jobs | Scheduled tasks (backups, queues, reports) | Each job runs on schedule on the new server |
| DNS records | A, AAAA, MX, TXT (SPF, DKIM, DMARC), CNAME | Records point to the new server; mail still passes checks |
If DNS is managed at your old host, export the full zone first. Otherwise you only need to edit records.
Before you start: choosing the plan and the Cairo location
Pick the server type by what your site needs: Cloud VPS for most business sites and web apps, Linux VPS for full root control, Windows RDP if your application needs Windows Server, and a dedicated server for large databases or heavy traffic.
On IM HOST, Cairo is listed for Cloud VPS, Linux VPS, Windows RDP, and Intel and AMD dedicated servers. Stock varies, so we confirm the location before activation. Cloud VPS plans start at $16/month (4 vCPU, 8 GB RAM, 80 GB NVMe). Invoices are in USD; customers in Egypt can also pay through InstaPay or Vodafone Cash. Prices are current on im-host.com as of November 2026 and may change.
A server closer to your visitors usually responds faster. If most of your visitors are in Egypt, run ping and traceroute to the new server from your own connection before you commit to the move.
As a starting point, choose a plan with at least the same RAM and disk as your current server, plus room for growth. You can upgrade later.
The move, step by step
- Lower the DNS TTL first. Set the TTL of your A, AAAA and MX records to about 300 seconds. Do this at least 24–48 hours before the switch. The new TTL only takes effect after the old TTL expires, so this step must come first.
- Take a full backup. Back up all files and export the database. Store one copy outside both servers, for example on your own computer.
- Set up the new server. Install the same web server, PHP or Node.js version, database version and extensions you run today. Matching versions avoids most errors after the move.
- Copy the files. Use
rsyncorscpover SSH for large sites. - Import the database. Create the database and user on the new server, import the export, and update the connection details in your config file.
- Recreate cron jobs and email. Copy each scheduled task. If email lives on the server, create the same mailboxes and copy messages over IMAP.
- Test through the hosts file. See the next section. Do not continue until the site works fully on the new server.
- Freeze changes and run a final sync. For stores and sites with user activity, pause new orders or put the site in maintenance mode for a short time. Then copy the latest files and re-export the database so nothing is lost.
- Switch DNS. Point the A (and AAAA) records to the new server's IP. Update MX records if email moved.
- Re-issue SSL. Once DNS points to the new server, issue or install the certificate there. Free certificates that validate over HTTP need the domain to resolve to the new server first.
- Keep the old server running for a few days. Some visitors and mail servers will still use cached DNS. Watch the old server's access log; when traffic there stops, you can cancel it.
- Run final checks. Check every main page, forms, checkout, logins, email, cron output and the SSL padlock on all subdomains. Then raise the TTL back to a normal value.
How do you test the new server before switching DNS?
The hosts file makes your computer open your domain from the new server while everyone else still sees the old one.
- Open the hosts file as administrator:
- Windows:
C:\Windows\System32\drivers\etc\hosts- macOS and Linux:/etc/hosts - Add a line with the new server's IP and your domain, for example:
203.0.113.10 example.com www.example.com - Save the file, clear your browser cache, and open the site.
- Test logins, forms, payments in test mode, and admin pages.
- Remove the line when you finish testing.
Visitors are not affected, so you can fix problems calmly.
Can IM HOST do the move for you?
Yes. IM HOST has a free migration service: our team can move your website to your new server. Send the details of your current hosting through support, and the team will review what needs to move. We do not promise a fixed timeframe or zero downtime, because both depend on the size of the site, the type of application and access to the old server. Support is available 24/7 in live chat if you have questions during the move.
FAQ
How long does DNS propagation take after the switch?
It depends on the TTL that resolvers cached. If you lowered the TTL to about 300 seconds a day or two in advance, most visitors move within minutes to a few hours. Some networks can take longer, which is why the old server should stay online for a few days.
Will my website go down during the move?
Not if you follow the order above. The old server keeps serving visitors until DNS switches. Sites with live orders or user content may need a short freeze during the final sync.
Do I need to move my domain to a new registrar?
No. Moving servers only means changing DNS records. Your domain can stay with its current registrar.
What if something breaks after the switch?
Point the DNS records back to the old server. This is why you keep it running and keep your backup until final checks pass.
If you want our team to handle the move to your new server in Cairo, start with the IM HOST free migration service.
More from our blog
Discover more practical guides and product insights from the IM Host team.
View all articles