Loading...

How to Migrate a WordPress Site to DigitalOcean

Moving a live WordPress site to DigitalOcean is a different task from a fresh install, because real visitors and real email are on the line while you work. The safe method is to copy the site to a new Droplet first, test it privately, and only switch your domain over once everything checks out. This guide covers three ways to make the move, the backup and DNS steps that prevent downtime, and the checks that catch the problems people only notice a week later.

Before You Start: What a Safe Migration Needs

Preparation is what separates a clean migration from a day of downtime. Set these up before you copy anything.

  • A DigitalOcean Droplet ready to receive the site. If you have not built one yet, follow our guide to installing WordPress on a DigitalOcean Droplet first.
  • A full backup of the current site, both files and database, downloaded somewhere off the old host.
  • Your domain's DNS TTL lowered to 300 seconds at least a day ahead, so the final switch takes minutes to propagate instead of hours.
  • A note of the current PHP and WordPress versions, so you can match them on the Droplet and avoid plugin errors.

Method 1: Migrate With a Plugin (Easiest)

A migration plugin is the simplest route for most sites. Tools such as All-in-One WP Migration, Duplicator, or Migrate Guru package your whole site, files, database, themes, and plugins, into a single export you restore on the Droplet.

Install the plugin on both the old site and the fresh WordPress install on the Droplet, create the export on the old site, then import it on the new one. The plugin rewrites the database for you, so internal links and settings carry over. Watch the file-size limit on the free tiers, because very large sites may need the paid version or a manual move.

Method 2: Move the Site Manually

A manual migration gives you the most control and costs nothing, but it has more steps. Copy the wp-content folder and your wp-config values to the Droplet over SFTP, export the database from the old host with phpMyAdmin or WP-CLI, import it on the Droplet, and update wp-config.php with the new database name, user, and password.

If your domain is changing as part of the move, do not run a plain find-and-replace on the database. WordPress stores some settings in serialised form that a raw replace will corrupt. Use WP-CLI's search-replace command or the Better Search Replace plugin, which handle serialised data safely.

Method 3: Let Cloudways Do It

If you are provisioning the Droplet through a managed layer, the move is close to automatic. Running the Droplet through Cloudways gives you a free migration plugin that copies the site for you, and the process is the same one described in our guide to migrating a WordPress site to Cloudways. This is the least technical option and the one to pick if you would rather not touch SFTP or the database.

Test Before You Switch the Domain

Never point your live domain at the new Droplet before you have seen the site working there. Edit your computer's hosts file to map your domain to the Droplet's IP address on your machine only. You can then browse the full site on the new server while the rest of the world still sees the old one. Click through pages, log in to wp-admin, submit a test form, and check that images load. When it all works, remove the hosts-file entry and change the real DNS A record. Because you lowered the TTL earlier, the switch propagates quickly.

After the Move: Three Checks People Skip

The migration is not finished when the DNS flips. These three catch the most common post-move surprises.

  • Reissue SSL on the new server. Your old certificate does not travel with the files. Install a fresh Let's Encrypt certificate on the Droplet and confirm it auto-renews.
  • Fix outbound email. DigitalOcean blocks the standard mail port on new accounts, so contact forms and password resets fail silently. Route mail through an authenticated SMTP service with a plugin such as WP Mail SMTP.
  • Keep the old site live for a few days. Do not cancel the old host immediately. Leave it running until DNS has fully propagated and you are sure nothing points at it, then take a final backup before you close the account.

For the wider setup picture and how the self-managed and managed routes compare, see our DigitalOcean setup and migration guide.

Frequently Asked Questions

Yes. You can move an existing WordPress site to a DigitalOcean Droplet with a migration plugin, by hand over SFTP and a database export, or automatically using Cloudways' free migrator if you run the Droplet through Cloudways.
Copy the site to the Droplet first, lower your DNS TTL a day ahead, and test the copy through your computer's hosts file before touching live DNS. Only switch the real DNS record once the new server works, so visitors never hit a broken site.
A migration plugin such as All-in-One WP Migration or Duplicator is the easiest manual route. For no technical work at all, run the Droplet through Cloudways and use its free one-click migrator.
It should not, if you test the copied site before switching DNS and keep the old host running until propagation finishes. Lowering the DNS TTL beforehand keeps the final switch down to a few minutes.
Yes. SSL certificates do not transfer with your files, so issue a fresh free Let's Encrypt certificate on the Droplet after the move and confirm the auto-renewal job is active.
Some of the links on this blog are sponsored links
Newsletter
Stay Ahead in Hosting

Expert hosting tips, reviews, and exclusive deals — delivered straight to your inbox. Join thousands of smart webmasters.

You're in! Thanks for subscribing.
Something went wrong — please try again.
No spam, ever. Unsubscribe in one click.
Top