On this page
A wrong migration (switching DNS before the destination is ready) causes error messages, lost traffic and a drop in search engine rankings. The right way is methodical, safe and reversible at any moment. The reason is that your site actually lives in two places during the migration: a complete old copy that is still running, and a new copy you prepare quietly, out of visitors' sight. As long as the old copy is running and you haven't switched DNS, nobody notices anything — and that is exactly the secret of zero downtime. This guide covers the whole process step by step: why and when to migrate, the types and methods of migration, proper preparation, the manual migration in detail, the DNS switching strategy, verification after the migration, and fixes for problems you may run into.
Why migrate your site at all? And when is migration the right decision?
Migration isn't a hobby; every migration carries some risk, however small, so don't migrate without a clear reason that is worth the trouble. In practice, the reasons that justify a migration fall into three families: changing hosting, changing the domain, and merging/splitting sites.
Changing hosting (the most common reason)
Most migrations happen because the current hosting no longer suits the site:
- Slowness or instability: pages that are slow to load, or frequent outages (downtime) showing up in monitoring reports. Slowness alone costs you visitors and Google rankings.
- Growing beyond the plan's capacity: a site that started on shared hosting may be choked by limited resources as traffic multiplies, making a move to VPS hosting or a stronger plan a necessity rather than a luxury. To choose the most suitable type, see the difference between shared, VPS and managed hosting.
- Poor technical support: tickets that are ignored, or late replies in a crisis.
- A high renewal price: the first-year discount ends and the price jumps, so you look for better value.
- A lack of modern features: an old PHP version, no server-level caching, no staging environment, no automatic backups, no built-in CDN.
Changing the domain
Sometimes it isn't the hosting that changes but the domain name: a rebrand, moving from a .net domain to a .com, or merging two names into one. This type is a little more complex because it requires updating all the internal URLs stored in the database and setting up 301 redirects from the old domain, as we'll detail in the search-replace section.
Merging or splitting
Moving several small sites so they are combined under a single installation (multisite), or splitting a section of a large site into a separate subdomain. These are advanced cases, but their essence is the same: moving files + a database + adjusting URLs.
When should you postpone a migration? If your site is in a peak season (a marketing campaign, a seasonal offer, a product launch), postpone the migration until things calm down. And if the only reason is "a slightly cheaper price," calculate the real cost: your time, the risk, and any potential downtime, which may be worth many times the difference.
Migration types: same domain or a new domain?
Before choosing "how" to migrate, determine "what" exactly you are migrating, because the type changes some steps fundamentally.
| Type | What changes | Difficulty | Most important thing to watch |
|---|---|---|---|
| Same domain, new hosting | The IP only (A record) | Low | Switching DNS smartly via TTL |
| New domain, same hosting | The domain name | Medium | Search-replace + 301 redirects |
| New domain + new hosting | Both together | High | Do it in two stages, not all at once |
| Moving a sub-environment (subdomain/path) | The path | Medium | Updating relative and absolute URLs |
The golden rule for changing the domain: don't change the hosting and the domain at the same moment. If you do and something goes wrong, you won't know whether the problem comes from the server or from the URLs. First move the site as it is to the new server on the same domain, make sure it works, then carry out the domain change as a separate operation. Changing only the hosting while the domain stays the same is the simplest type, because the database needs no URL edits at all — all that changes is the A record.
Another reason that makes separating the two stages wise: changing the domain directly affects your reputation with search engines, since it transfers link equity from the old domain to the new one through permanent 301 redirects. If you combine it with a hosting change and an outage occurs, Google may crawl a broken site during the most sensitive phase of the authority transfer, which is the worst possible timing. By separating the two operations, each risk stays isolated and can be rolled back on its own. And if your site is a store or relies on several subdomains, consider drawing up a complete map of all domains and paths before you start so you don't forget to redirect any of them.
The four migration methods: which one suits you?
There are four main ways to migrate WordPress, and each has its place. The following table summarizes the comparison, and then we explain each one.
| Method | Best for | Advantages | Drawbacks | Knowledge required |
|---|---|---|---|---|
| Plugin (Duplicator / All-in-One) | Small and medium sites | Fast, packages everything, fewer errors | Size limits in free versions, memory usage | Low |
| Manual (FTP + phpMyAdmin) | Large sites, full control | No size limits, full transparency | Slow, requires experience, possible human error | High |
| Host tool / free migration | Customers of hosts that offer the service | Easiest and lowest risk, carried out by experts | Not available at every provider | None |
| WP-CLI / SSH | Developers and very large sites | Fastest method, scriptable and automatable | Requires SSH access and terminal familiarity | Very high |
Migrating with plugins
Plugins such as All-in-One WP Migration, Duplicator and Migrate Guru package the whole site (files + database) into a single bundle. You install the plugin on the old site, export the bundle, then install it on the new site. This is the easiest method for non-technical users, and it usually handles the URL problem (search-replace) automatically. Its main drawback is the upload size limit in free versions (for example, 512MB in All-in-One), and it can use a lot of memory on very large sites.
Manual migration
You move the files yourself via FTP/SSH and export/import the database manually. No size limits, full control and complete transparency at every step — but it is slower and requires familiarity with phpMyAdmin, FTP and editing configuration files. This method is the most educational because it shows you how WordPress is actually put together, which is why we cover it fully in the next section.
The host's tool or free migration
Many providers — especially managed WordPress services — migrate your site for free or offer a one-click migration tool. This is often the best option if it is available: it is carried out by experts, less prone to errors, and costs you no time. Ask support before you start manually — you may save yourself hours.
WP-CLI over SSH
For developers and very large sites, WP-CLI is the fastest and cleanest method. One command exports the database, and another runs a safe search-replace on serialized data without breaking it — a decisive feature we'll explain later. It requires SSH access and familiarity with the terminal.
Preparation: the half that guarantees the other half succeeds
A successful migration is won before you move the first file. The following preparation checklist isn't a formality; every item on it prevents a potential disaster.
| Step | Why | How |
|---|---|---|
| A full backup (files + DB) | A safety net before anything else | UpdraftPlus or a manual export + a local copy |
| Note the current PHP version | To match it on the new server | The hosting panel or phpversion() |
| Note the MySQL/MariaDB version | To avoid import problems | The hosting panel or phpMyAdmin |
| Have the login details for both servers ready | FTP/cPanel/SSH for the source and destination | Keep them somewhere safe |
| Set up a staging environment on the destination | Testing before launch | Most hosting panels provide one |
| Choose a low-traffic time | To reduce the impact of any glitch | Watch your analytics and pick the quietest hour |
| Freeze publishing during the migration | Avoid losing changes | No new posts/comments/orders |
| Note the list of active plugins | To confirm they are complete later | A screenshot of the Plugins page |
The backup: your real insurance
Create a full backup that includes the site files and the database together, and keep it locally on your computer, not only on the server. A backup that lives on the server you are moving away from isn't real insurance — if the server is lost, it is lost with it. Plugins such as UpdraftPlus automate the process and upload the backup to external cloud storage, which is ideal.
A staging environment: test before you launch
A staging environment is an identical copy of your site that runs isolated from the live copy, letting you try out the migration and changes without any risk to visitors. The idea is to build the site completely on the new server as a staging environment, test it until you are confident, then "promote" it to become the live site as soon as you switch DNS. This is the philosophy the whole zero-downtime approach rests on.
An expert tip: a week before the migration, update WordPress, the theme and the plugins to the latest versions on the old site, and fix any conflicts. Migration moves problems as they are; don't migrate a broken site and expect the new server to fix it.
Manual migration step by step
This is the most detailed method, and understanding it makes you able to diagnose any problem with any other method. We'll go through each step carefully.
| Stage | Tool | Output |
|---|---|---|
| 1. Export the files | FTP / SSH / File Manager | An archive of all the site's files |
| 2. Export the database | phpMyAdmin / mysqldump | A complete .sql file |
| 3. Create a new DB | The hosting panel | A database + user + password |
| 4. Import the database | phpMyAdmin / mysql | The site's data on the new server |
| 5. Upload the files | FTP / SSH | The files on the new server |
6. Edit wp-config.php | A text editor | A correct connection to the new database |
| 7. Search-Replace | WP-CLI / plugin / SQL | Updated URLs without breaking serialization |
1. Move the files (FTP or SSH)
Compress the entire WordPress folder — wp-content (the most important, containing themes, plugins and media), wp-admin, wp-includes, and root files such as wp-config.php and .htaccess — then move it to the new server. Over FTP, use a client such as FileZilla. Over SSH, the fastest way is to copy a compressed archive directly between the two servers, or with scp:
# Compress the site on the old server
tar -czf site-backup.tar.gz /home/user/public_html
# Copy it to the new server via SCP
scp site-backup.tar.gz user@new-server-ip:/home/user/
# On the new server: extract it
tar -xzf site-backup.tar.gzMoving a compressed archive is much faster than moving thousands of small files over FTP, especially with wp-content/uploads full of images.
2. Export the database
From phpMyAdmin on the old server: select the site's database, then the Export tab, and choose the SQL format and the Quick method (or Custom if you want to compress the output for a large file). Save the resulting file locally.
For large sites, phpMyAdmin may fail because of size limits or timeouts. The cleanest solution is mysqldump over SSH, which doesn't care about size:
# Export the entire database to a file
mysqldump -u db_user -p old_database > backup.sql
# For huge databases: compress the output right away to save space and time
mysqldump -u db_user -p old_database | gzip > backup.sql.gz3. Create a new database and user
On the new server, from the hosting panel (the MySQL Databases section in cPanel, for example): create a new database, then a new user with a strong password, then link the user to the database and grant it ALL PRIVILEGES. Write down the three values precisely: the database name, the username and the password — you will need them in step 6.
4. Import the database
Via phpMyAdmin: select the new (empty) database, then the Import tab, and upload the .sql file. For large files, use the command line, which bypasses web limits:
# Import the SQL file into the new database
mysql -u new_db_user -p new_database < backup.sql
# If the file is compressed
gunzip < backup.sql.gz | mysql -u new_db_user -p new_database5. Edit wp-config.php
This file is the link between the files and the database. Open it on the new server and edit four values to match what you created in step 3:
define( 'DB_NAME', 'new_database' ); // New database name
define( 'DB_USER', 'new_db_user' ); // New user
define( 'DB_PASSWORD', 'strong_password' ); // Password
define( 'DB_HOST', 'localhost' ); // Usually localhost; may differ at some providersDB_HOST in particular is a frequent source of errors: some providers don't use localhost but a special address — check the new host's documentation if a database connection error appears.
6. Update URLs with search-replace (the step everyone gets wrong)
If the domain or path has changed, the database contains thousands of old URLs stored inside it (image URLs, internal links, theme settings). Don't use a regular find/replace in SQL, because WordPress stores some data in serialized form, which includes the length of each string; changing the text without updating the length breaks the data and disables the theme or plugins.
The right solution is a tool that handles serialization safely. The best is WP-CLI:
# A safe replace that respects serialized data (try --dry-run first)
wp search-replace 'https://old-domain.com' 'https://new-domain.com' --dry-run
wp search-replace 'https://old-domain.com' 'https://new-domain.com' --all-tablesAs an alternative to WP-CLI, the Better Search Replace plugin or the Search Replace DB script do the same job safely from the browser. Remember: if the domain hasn't changed (a hosting move only, on the same domain), there is no need for this step at all.
7. Test via a temporary URL before touching DNS
This is what makes the migration safe: you test the new site completely before any real visitor reaches it. Two ways:
- A temporary URL from the host: many hosting panels provide a temporary domain (such as
temp-url.host/~username) that opens your new site immediately. - The local
hostsfile: add a line on your computer that maps your domain to the new IP, so only your browser sees the new copy while the rest of the world sees the old one:
# In the hosts file (Windows: C:\Windows\System32\drivers\etc\hosts)
203.0.113.45 example.com www.example.comBrowse the site as if you were a visitor: the pages, the images, the wp-admin dashboard, the forms, the store. Don't move on to the next step until everything works. And if these manual steps seem exhausting, ask your new hosting provider whether it offers a migration service; some providers handle the move and test it before launch.
The zero-downtime strategy: switching DNS smartly
This is where "zero downtime" is won or lost. Everything before was preparation; this moment is the actual switch, and its precise order is the difference between a move nobody notices and a site that shows "connection error."
| Timing | Action | Value |
|---|---|---|
| 24–48 hours before the migration | Lower the A record's TTL | 300 seconds (5 minutes) |
| The moment you're ready | Switch the A record to the new IP | The new server's IP |
| Hours after the switch | Confirm propagation | Global DNS checking tools |
| After 24–48 hours | Shut down the old server | After propagation is complete |
| After a week | Set the TTL back to its normal value | 3600 seconds or more |
Why do we lower the TTL first?
TTL (Time To Live) is how long intermediate servers and visitors' devices keep a cached copy of the DNS record before asking again. If its value is 86400 seconds (a full day), some visitors will keep being sent to the old server for a whole day after your switch. By lowering the TTL to 300 seconds a day before the migration, you ensure the switch propagates within minutes, not hours. What matters is that the reduction itself needs time to propagate, so we do it early: if you lower the TTL and then switch the A record in the same minute, the reduction won't help you, because intermediate servers still hold the old, long value. Give the reduction a full day to propagate before the actual switch. To understand the A record, TTL and propagation in detail, see DNS records explained simply.
A practical point that confuses many people: DNS propagation doesn't happen "all at once" around the world, but gradually, depending on where each intermediate server is and when its cache expired. That is why you may see the new site while a friend in another country sees the old one — this is completely normal during the transition window, not a fault. Use global DNS checking tools (which query dozens of locations around the world at once) to follow propagation progress instead of relying on your own device alone, since your device may hold an old cache that misleads you.
The switching steps
- 24 hours before the migration: lower the A record's TTL to 300 seconds. This makes the change propagate quickly later.
- Once you're sure the new site works: update the A record to point to the new server's IP.
- Keep the old server running for 24–48 hours, because some visitors may reach the old copy until propagation is complete.
Why do we keep the old server running?
During the propagation period, visitors are split: some reach the new server, and some are still sent to the old one because of caching. As long as both servers show a healthy site, nobody notices a difference. Don't delete the old site or shut down its server until you are sure all visitors are reaching the new one (24–48 hours is usually enough). A subtle point: any comment or purchase order the old server receives during this window won't appear on the new one — which is why we chose a low-traffic time and froze publishing.
The rollback plan: what if something goes wrong?
The best thing about this method is that it is fully reversible right up to the last moment. As long as you haven't deleted the old server, any serious problem that appears after the switch is solved with one simple action: point the A record back to the old server's IP. Because you lowered the TTL in advance, visitors will return to the healthy old copy within minutes, buying you time to diagnose the fault on the new server calmly, without pressure. This "back button" is what turns migration from a terrifying leap into a calculated step. So make your working rule strict: don't touch the old server — neither deleting it nor canceling the subscription — until at least 48 hours have passed and you have confirmed with global checking tools that propagation is complete and the new site works without faults. Also keep a recent local backup throughout this period; it is your last line of defense if everything else fails.
After the migration: the complete checklist
As soon as propagation is complete, review the site methodically. The table summarizes what to check and why.
| Item | How to check | If it fails |
|---|---|---|
| Pages open without errors | Browse the home page and inner pages | See the troubleshooting section below |
| Images and media appear | Open pages with many images | Check the search-replace |
The wp-admin dashboard works | Log in | Check wp-config and the URLs |
| Forms/search/store | Actually try them | Test the responsible plugins |
| SSL certificate and HTTPS | Check for the green padlock | Reissue SSL |
| Permalinks | Open an internal link | Save the permalinks again |
| Outgoing email | Send a test | Configure SMTP on the new server |
| Performance and load speed | A speed testing tool | Review caching and the CDN |
Details of the critical items:
- Reissue the SSL certificate on the new server and enable HTTPS — the certificate is tied to the server, not the domain, and is usually issued automatically (AutoSSL), but make sure. Details are in installing SSL and enabling HTTPS.
- Refresh the permalinks: go to Settings > Permalinks and click Save without changing anything; this regenerates the
.htaccessrules and prevents 404 errors on internal links. - Email: many sites lose the ability to send email after a migration because the SMTP setup differs between servers. Test the password reset email or form messages, and configure an SMTP plugin if needed.
- Performance: once you have confirmed everything is sound, monitor the speed and, if needed, improve it with speeding up WordPress. For a comprehensive review of WordPress settings once things are stable, go back to the complete WordPress guide.
Troubleshooting: the most common failures after a migration
Even if you do everything carefully, you may run into a problem. The following table maps symptom to cause and fix, and then we go into the most important ones.
| Problem | Usual cause | Fix |
|---|---|---|
| White screen (WSOD) | A plugin/theme conflict or PHP running out of memory | Enable debug, disable plugins, raise memory_limit |
| Error establishing a database connection | Wrong wp-config details or the DB wasn't imported | Check the name/user/password/host |
| Broken links/images | Old URLs in the database | Run a safe search-replace |
| Mixed content ("not secure" warning) | http:// URLs inside an HTTPS page | Replace http with https + an SSL fixer plugin |
| Redirect loop (endless redirects) | Conflicting HTTPS/URL settings | Check siteurl/home and .htaccess |
| 404 errors on all inner pages | The permalink rules weren't generated | Save the permalinks again |
| Email isn't sent | A different SMTP setup | Configure an SMTP plugin |
The White Screen of Death
The most common failure, and the scariest, because it gives no message. Enable debug mode by adding these lines to wp-config.php to see the real error:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true ); // Writes errors to wp-content/debug.log
define( 'WP_DEBUG_DISPLAY', false );The cause is usually a plugin conflict (disable plugins by temporarily renaming the plugins folder) or PHP running out of memory (raise memory_limit to 256M).
The database connection error
"Error establishing a database connection" means wp-config.php can't reach the database. Check the four values in order: is the database name correct? Is the user correct, and does it have privileges? Is the password exact (watch out for spaces)? And most important: is DB_HOST correct (it may not be localhost at your new host)? Also make sure the import in step 4 actually succeeded and the tables exist.
Mixed content and the redirect loop
Mixed content appears when an HTTPS page loads resources over http:// (images or scripts); it is fixed by a search-replace from http:// to https:// or a plugin such as Really Simple SSL. A redirect loop, on the other hand, is usually caused by a conflict between the HTTPS settings in .htaccess and the siteurl/home values; check that they match (both https://, with the same www or non-www form) and review the redirect rules.
Common mistakes to avoid
- Switching DNS before the destination is ready — the number one cause of downtime, by far. Don't touch DNS before testing the new site.
- Forgetting to update
wp-config.php, so it can't connect to the database on the new server. - Not lowering the TTL in advance, so propagation is delayed by hours and some visitors see an old copy.
- Replacing URLs with plain SQL, which breaks serialized data — always use WP-CLI or a safe tool.
- Deleting the old server immediately before propagation is complete, which guarantees lost visitors during the transition window.
- Neglecting to reissue SSL on the new server, so "Not secure" warnings appear.
- Migrating in a peak season or without a local backup.
Conclusion
Migrating without downtime isn't luck but a methodical order: prepare the destination completely (files + database), edit wp-config and run a search-replace if needed, test via a temporary URL, lower the TTL, then switch the A record, and keep the source as a fallback for 24–48 hours. Follow this sequence and your site will move smoothly, without your visitors noticing. And if you are migrating because your current hosting is slow, choosing faster hosting is half the solution — the other half is the order you have just learned.
Frequently asked questions
Will my site go down during the migration? No, if you follow the right order: prepare the new server completely and test it before touching DNS, then switch the A record after lowering the TTL, and keep the old server running until propagation is complete. The old copy keeps serving visitors throughout the preparation period, so nobody sees an outage.
How long does DNS propagation take after a migration? From minutes to hours, depending on the TTL value and the cache of intermediate servers. Lowering the TTL to 300 seconds a day before the migration makes propagation much faster. In theory, full propagation worldwide can take 24–48 hours, but most visitors see the new server within minutes if you lowered the TTL in advance.
Should I migrate manually or with a plugin? Plugins are easier for most small and medium sites because they package everything and handle URLs automatically, while the manual method is better for large sites, when you want full control, or when you exceed the size limits of free plugins. And many providers migrate your site for free, so ask support first.
What is the difference between migrating on the same domain and migrating to a new domain? On the same domain, only the IP changes (the A record) and you don't need to edit any URLs in the database. For a new domain, you need to run a search-replace to update thousands of stored URLs and set up 301 redirects from the old domain to preserve your search engine rankings.
Do I need to reinstall SSL after the migration? Yes. The certificate is tied to the server, not the domain; reissue it on the new server (AutoSSL is usually automatic) and enable HTTPS enforcement once the migration is complete. Skip this step and visitors will see "Not secure" warnings.
Why do broken images appear after the migration?
Usually because of differing paths in the old URLs stored in the database, or because the wp-content/uploads folder wasn't uploaded completely. First make sure the file upload is complete, then run a safe search-replace tool to update the URLs from the old domain/path to the new one.
Why should I use a search-replace tool instead of a regular find and replace in SQL? Because WordPress stores some settings in serialized form, which includes the length of each string. A regular find and replace changes the text without updating the recorded length, so the serialization breaks and themes and plugins stop working. Tools such as WP-CLI or Better Search Replace recalculate the lengths automatically.
What do I do if a white screen appears after the migration?
Enable debug mode in wp-config.php via WP_DEBUG to see the real error message instead of the blank screen. The cause is usually a plugin conflict (disable plugins by renaming their folder) or PHP running out of memory (raise memory_limit). Also check debug.log in wp-content.
Does migration affect my Google ranking? If the migration is done correctly on the same domain without downtime, the effect is practically zero. Drops happen when downtime drags on and Google crawls a broken site, or when you move to a new domain without correct 301 redirects to transfer link authority. Lowering the TTL and keeping the old server running protect your rankings.
When can I safely delete the old site? 24–48 hours after switching DNS, once you have confirmed with global DNS checking tools that all regions point to the new server. Also check that any comments or orders that reached the old server during the transition period have been moved or handled. Don't rush the deletion; keep a backup even after confirming.
Can I migrate a WooCommerce site the same way? Yes, but be more careful: freeze new orders during the transition window, because any order that reaches the old server won't appear on the new one. Choose the quietest possible time, and after the switch, review the latest orders on both servers to make sure none were lost, and test the payment gateway immediately.
Sources
Frequently asked questions
Will my site go down during the migration?
No, if you follow the right order: prepare the new server completely and test it before touching DNS, then switch the A record after lowering the TTL, and keep the old server running until propagation is complete. The old copy keeps serving visitors throughout the preparation period, so nobody sees an outage.
How long does DNS propagation take after a migration?
From minutes to hours, depending on the TTL value and the cache of intermediate servers. Lowering the TTL to 300 seconds a day before the migration makes propagation much faster. In theory, full propagation worldwide can take 24–48 hours, but most visitors see the new server within minutes if you lowered the TTL in advance.
Should I migrate manually or with a plugin?
Plugins are easier for most small and medium sites because they package everything and handle URLs automatically, while the manual method is better for large sites, when you want full control, or when you exceed the size limits of free plugins. And many providers migrate your site for free, so ask support first.
What is the difference between migrating on the same domain and migrating to a new domain?
On the same domain, only the IP changes (the A record) and you don't need to edit any URLs in the database. For a new domain, you need to run a search-replace to update thousands of stored URLs and set up 301 redirects from the old domain to preserve your search engine rankings.
Do I need to reinstall SSL after the migration?
Yes. The certificate is tied to the server, not the domain; reissue it on the new server (AutoSSL is usually automatic) and enable HTTPS enforcement once the migration is complete. Skip this step and visitors will see "Not secure" warnings.
Why do broken images appear after the migration?
Usually because of differing paths in the old URLs stored in the database, or because the wp-content/uploads folder wasn't uploaded completely. First make sure the file upload is complete, then run a safe search-replace tool to update the URLs from the old domain/path to the new one.
Why should I use a search-replace tool instead of a regular find and replace in SQL?
Because WordPress stores some settings in serialized form, which includes the length of each string. A regular find and replace changes the text without updating the recorded length, so the serialization breaks and themes and plugins stop working. Tools such as WP-CLI or Better Search Replace recalculate the lengths automatically.
What do I do if a white screen appears after the migration?
Enable debug mode in wp-config.php via WP_DEBUG to see the real error message instead of the blank screen. The cause is usually a plugin conflict (disable plugins by renaming their folder) or PHP running out of memory (raise memory_limit). Also check debug.log in wp-content.
Does migration affect my Google ranking?
If the migration is done correctly on the same domain without downtime, the effect is practically zero. Drops happen when downtime drags on and Google crawls a broken site, or when you move to a new domain without correct 301 redirects to transfer link authority. Lowering the TTL and keeping the old server running protect your rankings.
When can I safely delete the old site?
24–48 hours after switching DNS, once you have confirmed with global DNS checking tools that all regions point to the new server. Also check that any comments or orders that reached the old server during the transition period have been moved or handled. Don't rush the deletion; keep a backup even after confirming.
Can I migrate a WooCommerce site the same way?
Yes, but be more careful: freeze new orders during the transition window, because any order that reaches the old server won't appear on the new one. Choose the quietest possible time, and after the switch, review the latest orders on both servers to make sure none were lost, and test the payment gateway immediately.