Oxyforge

Help Centre / Moving Your Site

Move A Site Manually With SFTP And WP-CLI

A manual move is files over SFTP, a database dump imported on this side, then one command to rewrite the stored URLs. It is the right choice when a migration plugin has failed, when the site is too large or too odd for one, or when you would rather see every step.

You move the site yourself. We do not migrate sites for customers, and the whole move happens on the temporary address, so your old host keeps serving visitors until you change DNS.

Plugin Or By Hand

Migration pluginManual
Skill neededNoneComfortable with SFTP and a terminal
URL rewriteDone for youOne WP-CLI command you run
Very large sitesCan time outFine
Old host already downNeeds the old site workingWorks from a dump and a file copy

If you are not sure, start with a migration plugin and come back here if it fails.

Before You Start

Take a full backup of the old site and download it to your own machine. Files and database, both. A backup that lives only on the host you are leaving is not a backup.

You need an SFTP client, a terminal, your old site’s files and a database dump. Create the website here first, with Add Website then Create New Website, and note its temporary address.

Step 1: Get The Old Site’s Files And Database

Download wp-content from the old site, and anything custom that sits outside it. You do not need WordPress core, because the new site already has a current copy.

Export the database with mysqldump if you have shell access on the old host, or phpMyAdmin if you only have a control panel. Export the whole database as one plain SQL file.

Step 2: Upload The Files Over SFTP

Open the site’s SFTP tab, switch SFTP on, and add an SSH key there: SFTP here is key-only. The tab shows your host and username. SFTP runs on port 2222, not 22, which is the detail people miss. See SFTP access.

Connect and upload into the site’s web root, overwriting wp-content/plugins, wp-content/themes and wp-content/uploads with the old site’s versions.

Do not overwrite wp-config.php. The file already on your new site holds the database name, user and password for the database here. The old one points at a database that does not exist on this platform, and copying it over is the single most common way to end a manual migration with a connection error.

Leave wp-content/object-cache.php and any drop-in from your old host out of the upload as well. The object cache here is ours.

Step 3: Import The Database

Switch WP-CLI on from the same SFTP tab. There is no shell session: each command is one SSH call as the oxywp user with the wp command after it, run from your web root. Import the dump:

ssh -p 2222 oxywp@HOST wp db import old-site.sql

WP-CLI reads the credentials from wp-config.php, so you do not type a database name or password. See WP-CLI, and SSH keys if you have not added one yet.

The import replaces the tables the new install created, which is expected. Your site is now the old site, except that every stored URL still says the old domain.

Step 4: Rewrite The Stored URLs

WordPress stores absolute URLs all over the database: in options, in post content, in widget and theme settings, in page builder data. Fix them with one command:

ssh -p 2222 oxywp@HOST wp search-replace 'https://old.example' 'https://site-1a2b3c4d.oxyforge.net' \
  --all-tables-with-prefix --skip-columns=guid

Swap in your real old domain and your real temporary address. Run it with --dry-run first if you want to see the count before anything changes.

Never do this with a find-and-replace in an SQL file or a database tool. WordPress keeps a lot of settings as serialised PHP, where each string is stored with its length. Changing the text without changing the recorded length corrupts the whole value, and the symptom is a page builder or theme option that silently stops working. wp search-replace unpacks those values, replaces inside them and repacks them, which is the entire reason it exists.

--skip-columns=guid is there because post GUIDs are identifiers, not links. Rewriting them makes feed readers treat every old post as new.

Step 5: Clear The Caches And Look At It

Go to the Tools tab and clear the cache, then open the temporary address. Sign in to WordPress admin, check that permalinks resolve, and re-save the permalink settings if any page 404s.

If the site uses a page builder, open a built page in the editor as well as on the front end. That is where a bad serialised value shows up.

Step 6: Tidy Up, Then Test Properly

Remove the plugins that belonged to your old host: its caching plugin, its security or backup plugin, and anything that only ran there. The platform has its own page cache, object cache, backups and malware scanning.

Then work through what to test before you point your domain before you go near DNS.

Email does not move with a website, and we host no mailboxes. If your mail lives on the old host, move it to Google Workspace or Microsoft 365 and keep the MX records pointing there, before you switch the domain.

If Something Goes Wrong

Error establishing a database connection. You overwrote wp-config.php. The quickest fix is to delete the website, create it again, and redo the upload with that one file left out.

The site loads but every link goes to the old domain. The search-replace did not run, or it ran with the wrong old URL. Check whether the old site used http:// or a www prefix and run it again with the exact string.

Images are missing. wp-content/uploads did not finish. SFTP clients give up quietly on large folders, so compare the file counts and re-upload what is short.

You want to start over. Delete the website from the Tools tab and create it again. It takes about a minute, and your old site stays live throughout. The deleted copy sits in a 30-day archive, so nothing is lost if you change your mind.

Did this answer it? If not, open a ticket from the members area and someone who runs the platform will pick it up.

Open A Ticket