# Move from another host

> Export your site from any WordPress host and move it to WP Waterfall with the free migration, then switch the domain, or move it by hand.

Source: https://docs.wpwaterfall.com/migrate/from-generic-wordpress

This guide is for a WordPress site on a host that has no guide of its own. You make one archive of the site, hand it to WP Waterfall, review the result on staging, and then move the domain. If the importer sends your archive to a person, or you prefer to do the work yourself, [Move it by hand](#move-it-by-hand) at the end covers every step.

## What you need

- wp-admin access to the site, and a way to get its files and database: a backup plugin, the host's file manager and database tool, SFTP, or SSH.
- A free site license, and a backup file in a format that [Migrate a site to WP Waterfall](https://docs.wpwaterfall.com/migrate-a-site#what-do-i-need) lists.

Your host's docs show its backup, SFTP, and database screens.

## Export your site from your host

Use the first route that works.

1. **A backup plugin.** Duplicator builds one archive that holds `wp-content` and the database, and the migration form has a Duplicator backup type. Install it, create a package, and download the archive.
2. **Your host's backup download.** Open it first. If it holds `wp-content` and one database export, it works as it is. A cPanel full backup works too: choose the backup type **cPanel backup**.
3. **SSH with WP-CLI.** From the site's folder:

```
wp db export ~/site.sql --add-drop-table
zip -r ~/site-move.zip wp-content -x "wp-content/cache/*"
cd ~ && zip site-move.zip site.sql
```

Without `zip`, use `tar -czf ~/site-move.tar.gz -C /path/to/site wp-content -C ~ site.sql`.

4. **SFTP plus a database export.** Download `wp-content` over SFTP, export the SQL from the host's database tool, such as phpMyAdmin, and zip both on your computer.

`wp-config.php` names the database (`DB_NAME`) and the table prefix (`$table_prefix`). If a database holds tables from more than one install, export only your prefix's tables.

## Request the migration and switch the domain

Share the archive as a public link, then follow [Migrate a site to WP Waterfall](https://docs.wpwaterfall.com/migrate-a-site) to request the migration. That article also covers what to remove from the archive, what moves, what you set up again, how to switch the domain, and how to roll back. DNS sits at the registrar, at Cloudflare, or on the host's own nameservers, so look them up first.

## Troubleshooting

- The export times out: use SSH with WP-CLI, or export files and database separately.
- The zip is too large: remove cache and old backups.

## Move it by hand

Use this route when the importer sends your archive to a person, or when you prefer to do the work yourself. You create a site, then bring the code, uploads, database, settings, and domain across in that order. Export these from the old host while the site still runs there:

- A database dump, as `.sql` or `.sql.gz`.
- The `wp-content` folder, or at least `wp-content/uploads` and any plugins and themes you do not keep in a repository.
- A list of the site's domains and their DNS records.
- Your redirect rules: source, destination, and status code. Check `.htaccess` for rules you forgot.
- Your cron jobs: the schedule and the command for each.
- The PHP version, and any IP addresses you block.

Note the current hostname. You replace it in the database in the Move the database step. Export the database and the files at the same time, so posts and their images match.

### Create the site

1. Open **Sites** and choose **Add site**.
2. Pick a name, a starting point, a data center location, and the PHP version the old site uses.
3. Choose a subscription plan.

The site opens on its **Info** tab with a temporary domain.

### Move the code

Every site starts on staging, and live code is read-only. Move the code onto staging, then promote it to live. Pick one path:

- **Git.** Add your SSH key under **Account Settings**, **Integrations**, **SSH keys**. Then open **Info**, click **Clone with Git** in the **Code** card, and copy the address. Clone it, copy your site folder into the clone without uploads, caches, and `wp-config.php`, then commit and push to `master`. Then switch to staging, and click **Promote to live** in the **Environment details** card on **Info**. Add a `wpwaterfall.yml` if you use Composer or a build step. See [How Git deploys work](https://docs.wpwaterfall.com/code/git-workflow).
- **SFTP.** Switch staging to SFTP mode (the **SFTP | Git** switch on the **Code** card of **Info**). Upload plugins and themes over SFTP with the primary SFTP and SSH user from the **Info** tab, click **Commit changes**, then click **Promote to live**.

WP Waterfall writes `wp-config.php` for each environment. Do not upload yours; move custom constants into the **Environment variables** card on the **Info** tab.

### Move the uploads

Connect over SFTP with the credentials on the **Info** tab and upload your old `wp-content/uploads` into the environment's uploads folder, which stays writable in both code modes. The **Files** tab does not upload, so SFTP is the way to bring a whole folder.

### Move the database

1. Import your `.sql` file with phpMyAdmin from **Database**, or with the API. See [Database access](https://docs.wpwaterfall.com/database-access).
2. Open **Tools**, then **Search and replace**. Replace the old hostname with the temporary domain. Every run starts as a dry run that lists each table with its count. Press **Apply** and type the site name to confirm.

Open the temporary domain and sign in to wp-admin to check.

### Recreate settings

- **Redirects.** Open **Redirects** and import a CSV. `.htaccess` rules do not carry over; recreate them here. See [Redirects](https://docs.wpwaterfall.com/redirects).
- **Cron jobs.** Open **Cron** and add each job. See [Cron jobs](https://docs.wpwaterfall.com/cron-jobs).
- **Blocked IPs.** Open **IP Deny** and add the addresses and ranges you blocked before.
- **PHP version.** Open **Tools**, then **PHP settings**. WP Waterfall checks the homepage after a version change and rolls back on its own if it fails.
- **Mail.** Staging sends no mail, so test orders never reach a real inbox. See [Email from WordPress](https://docs.wpwaterfall.com/wordpress-email).

### Move the domain by hand

Follow the [domain steps](https://docs.wpwaterfall.com/migrate-a-site#how-do-i-switch-my-domain-after-the-migration). If you also move DNS, open **DNS**, choose **Add zone**, and let WP Waterfall import the current records. Set the two nameservers at your registrar and choose **Check activation**. WP Waterfall then writes the domain's records itself.

### Host-specific notes

- A cPanel host exports the database through phpMyAdmin and the files through its file manager or FTP. See [Move from a cPanel host](https://docs.wpwaterfall.com/migrate/from-cpanel).
- Shared hosts often leave caching, security, or backup plugins that belong to that host. Remove their folders before you deploy, and read `error.log` under **Logs** after the first visit.

## Related

- [Migrate a site to WP Waterfall](https://docs.wpwaterfall.com/migrate-a-site)
- [Migrate a Multisite network or a site with a custom prefix](https://docs.wpwaterfall.com/migrating-a-multisite-or-custom-prefix-site)
- [Move from a cPanel host](https://docs.wpwaterfall.com/migrate/from-cpanel)
- [Move from a Plesk host](https://docs.wpwaterfall.com/migrate/from-plesk)
- [Move from a VPS or your own server](https://docs.wpwaterfall.com/migrate/from-vps)
- [How Git deploys work](https://docs.wpwaterfall.com/code/git-workflow)
- [wpwaterfall.yml reference](https://docs.wpwaterfall.com/code/wpwaterfall-yml)
- [Database access](https://docs.wpwaterfall.com/database-access)
- [Search and replace in the database](https://docs.wpwaterfall.com/tools-search-replace)
- [Manage files](https://docs.wpwaterfall.com/files-manager)
- [Redirects](https://docs.wpwaterfall.com/redirects)
- [Cron jobs](https://docs.wpwaterfall.com/cron-jobs)
- [Domains](https://docs.wpwaterfall.com/domains)
- [Duplicator on WordPress.org](https://wordpress.org/plugins/duplicator/)
- [WP-CLI wp db export](https://developer.wordpress.org/cli/commands/db/export/)
