Skip to main content

Move and sync files

Moving a site to Hosting starts with its files. You connect Hosting to your old host once, then copy from it into one of your applications. The copy runs on our servers, so you can close the page and come back.

A copy only reads the old host. It never writes to it, changes it or deletes anything there.

Connect to an old host​

Open Company → Code sources → Old host connections and choose Connect to an old host. The setup has four steps.

1. Address and login​

Paste the old host's address into Address or URL. You can paste a full address such as sftp://anna@ftp.example.com:2222/public_html: the username, port and start folder are read from it, so you only type what it did not say. A plain ftp.example.com works too.

Then choose how the login signs in:

  • A password. Type it in the password box. It is stored encrypted and never shown again.
  • Generate a key for me (SFTP). Hosting makes a key pair and shows you the public half to add on your old host. Nothing secret is typed.
  • Paste my own private key (SFTP). Paste the whole key, from -----BEGIN to END-----.

Without a type, Hosting tries SFTP, then FTPS, then FTP, and says which one answered. To pick it yourself, open Choose the type myself. Plain FTP is marked unencrypted: your password and files cross the internet in the clear, so use it only when the old host offers nothing else.

Where to find these details: cPanel "FTP Accounts" or "SSH Access", Plesk "Websites & Domains > FTP Access", DirectAdmin "FTP Management". Your host's welcome email often has them too.

Files kept somewhere other than a web host work the same way; choose the type yourself:

  • WebDAV (web folders over HTTPS). Paste the server's address, such as davs://files.example.com, and sign in with its username and password.
  • S3-compatible storage. Paste the storage endpoint, such as objects.example.com, put the access key ID in Access key ID and the secret key in Secret access key, and name the bucket in Bucket and folder, for example old-site/public. From the terminal the same source is s3://<access key id>@objects.example.com/old-site/public.

Both always connect over HTTPS and check the certificate; neither is tried when Hosting finds the type for you.

2. Old host limits​

Some cheap hosts limit how many connections or how much traffic an account may use, and block clients that go over. Pick how hard Hosting works the old host:

PresetWhat it doesWhen to use it
Normal2 connections at onceMost hosts
Gentle1 connection, 2 requests a secondYour old host has refused us before, or a check said it is limiting connections
Very gentle1 connection, 1 MB a second, 1 request a secondHosts that limit hard, or a site you must not slow down

Open Advanced to set each value yourself: connections at once (1 to 8), a speed limit (such as 1M, or a timetable such as 08:00,512k 23:00,off), requests a second (1 to 20), imports at once to this host (1 to 4) and the retry wait (1 to 600 seconds). Each value is checked before anything is sent.

The limits are saved with the connection, and each import can change them for that run.

3. Confirm and name​

The name is filled in from the host, so most of the time you only press the button. Tick Use once, don't save for a connection you need only for the run that follows: it has no name, and its password or key is deleted when that run ends.

Choose the environment the check runs from. A check reads the old host and never writes to it.

4. Check​

The check reports each stage as passed or failed, with the next step when one fails:

  1. Address found
  2. Host reachable
  3. Secure connection
  4. Signed in
  5. Start folder readable
  6. Site detected

For SFTP, the old host's key is saved on the first check and shown with the connection. A later change stops the check and shows the next step; it is never silently accepted.

With a generated key, add the public key on your old host first (choose Copy public key), then choose I have added it, check now.

If your old host is limiting connections, the check says so and offers Switch to Gentle and retry as one step. Nothing lowers the limits by itself.

Look after a saved connection​

Each saved connection shows its status, when it was last checked and the last failure in plain words. From its row you can check it again from an environment, replace its password or key, revoke it, which deletes the stored sign-in at once, and remove it once revoked.

Import from another host​

Open Hosting → SFTP & SSH → Import from another host and choose Import from another host.

  1. Old host. Pick a saved connection that has passed its check, or Use once, don't save and type the address and login there.
  2. Old host limits. The connection's limits, with the presets to change them for this run.
  3. Folders. The application to copy into, the folder on the old host (its start folder by default) and the destination application tree and folder, such as wordpress/wp-content. The destination must name a file tree owned by that application; / alone is not accepted.
  4. When. Once copies now. To keep the folder up to date, choose Keep in sync on a schedule. Mirror is under Advanced.
  5. Preview. Review the proposed source, destination, old-host limits and when it runs. Choose Start to begin.

An import adds files that are missing and updates files that changed on the old host. A file that is newer on Hosting is kept, so your own changes here survive, and nothing is deleted on either side. Running it again later skips files that already match.

The current preview describes the request and whether its storage supports an undo point; it does not count the source files or scan free space. Older destination files can be replaced, and Stop does not put them back. Check the preview's undo information before you start.

Progress​

Each import shows its state, a progress bar, files and bytes copied out of the total, the current rate and an estimated finish. The Timeline lists what happened: each attempt, any limit the old host applied, and the finish.

An import keeps running on our servers after you close the page. If an attempt ends with files left, for example because the old host dropped the connection, the next attempt starts by itself and skips the files already copied. It stops when a pass has nothing left to copy.

One import per folder​

Only one import at a time may write into a folder. Starting another into the same folder, or into a folder inside it, is refused with the folder that is busy and a link to the running import. An import into a different folder starts normally.

Stop​

Choose Stop on a running import and confirm. No further attempt runs. Files already copied stay where they are, and starting again later skips them.

Undo an import​

When the preview offers an undo point, Hosting keeps a copy of the application's files before the import first writes into a folder that already has files. This currently requires single-node RBD storage; shared CephFS storage does not offer an undo point. The preview says whether one is taken, how large it can grow and how long it is kept (seven days, or until the next import into the same files).

Once the import has ended, choose Undo this import on it and confirm. The folder goes back to how it was: files the import changed are restored and files it added are removed. Nothing outside that folder changes.

When there is not enough room for an undo point, the preview says so. Tick Start without an undo point to go ahead anyway; that import cannot be undone.

Keep in sync on a schedule​

On the When step, choose Keep in sync on a schedule to repeat the import until you stop it, or Keep in sync until a date to stop after Run until. A schedule needs a saved connection, because a login used once is deleted after its first run.

For each time, pick how often it repeats: every hour, every few hours (2 to 12), every day, every week on the days you tick, or every month on a day from 1 to 28. The cron pattern it writes is shown under it. Custom cron takes your own five-field pattern. Choose Add another time for up to five times; one Timezone applies to all of them. Runs must be at least 15 minutes apart, so the old host is not overloaded. The preview reads the schedule aloud and lists the next runs, so you can check it before you start.

Each run is an import of its own, with its own progress and undo point. A run that is due while the previous one is still going is skipped, and runs missed while Hosting was down are not caught up. After three failed runs in a row the schedule pauses itself and emails you.

The schedule's card shows it in plain words, the next run, why it is paused, and the latest runs. Choose Run now to start a run outside the schedule, Pause and Resume to hold it, and Edit schedule to change its times, timezone or end. Stop ends the schedule and stops a run that is going.

Mirror​

A copy never deletes. To make the folder here match the old host, open Advanced on the When step and tick Also delete files on Hosting that were deleted on the old host. A file that is not on the old host is then deleted here, including files you added or changed here. Nothing is changed or deleted on the old host.

Set Most files one run may delete (100 unless you change it). A run that would delete more stops at that limit, so pointing at the wrong folder cannot empty your site.

A mirror always has a way back. On single-node storage it takes an undo point first; when there is no room for one you must tick Start without an undo point. On shared CephFS storage, every file a run deletes or replaces is kept in a dated recovery folder beside the application's files, outside the web root, for 7 days after the run ends, then removed. The preview says which applies. Tick Delete files here that are not on the old host to confirm, then choose Start.

Work on a local copy​

hostingctl can also keep a folder on your computer in step with an environment folder, over the environment's SFTP login:

# See what a sync would change first; --preview changes nothing.
hostingctl files sync env:/wordpress ./site --two-way --environment <environment-uuid> \
--user <login> --key-file ~/.ssh/id_ed25519 --company my-company --preview

# Two-way: changes and deletions on either side reach the other. The first run deletes nothing.
hostingctl files sync env:/wordpress ./site --two-way --environment <environment-uuid> \
--user <login> --key-file ~/.ssh/id_ed25519 --company my-company --confirm

# Read-only view of the environment folder in an empty local folder; Ctrl-C unmounts it.
hostingctl files mount env:/wordpress ./view --environment <environment-uuid> \
--user <login> --company my-company

A file changed on both sides keeps both copies (name.conflict1, name.conflict2) and the report lists them for you to choose. A sync stops before deleting more than half of either side's files unless you pass a higher --max-delete-percent. wp-config.php is left alone unless --with-wp-config. Mounting needs macFUSE or FUSE-T on macOS, or FUSE on Linux; it is not available on Windows yet.

From the terminal​

The same steps are available in hostingctl. Every command and flag is in the command reference.

For the commands below, replace my-company with your company slug and the UUID placeholders with the values shown by Hosting. In an interactive terminal, guided setup asks for the environment, old-host address and sign-in method. Passwords stay hidden as you type.

# Guided setup: password, generated SSH key, or your existing private-key file.
hostingctl provider-connections add --company my-company --confirm

# Read saved connections and run a check from an environment.
hostingctl provider-connections list --company my-company
hostingctl provider-connections check <connection-uuid> --environment <environment-uuid> \
--company my-company --confirm
hostingctl provider-connections check-show <check-uuid> --company my-company

# Replace a password using a private JSON request file.
hostingctl provider-connections rotate <connection-uuid> --file private-rotation.json \
--company my-company --confirm
hostingctl provider-connections revoke <connection-uuid> --company my-company --confirm
hostingctl provider-connections remove <connection-uuid> --company my-company --confirm

# Describe the proposed copy settings, then start. The dry run does not count or copy files.
hostingctl files import start --environment <environment-uuid> --application <application-uuid> \
--connection <connection-uuid> --from /public_html/wp-content --to wordpress/wp-content \
--company my-company --dry-run
hostingctl files import start --environment <environment-uuid> --application <application-uuid> \
--connection <connection-uuid> --from /public_html/wp-content --to wordpress/wp-content \
--company my-company --confirm

# Follow, stop and undo imports.
hostingctl files import list --environment <environment-uuid> --company my-company
hostingctl files import status <import-uuid> --environment <environment-uuid> \
--company my-company --wait --timeout 1800
hostingctl files import stop <import-uuid> --environment <environment-uuid> \
--company my-company --confirm
hostingctl files import undo <import-uuid> --environment <environment-uuid> \
--company my-company --confirm

# Keep in sync: weekdays at 02:00 and Saturdays at 14:00 until a date. Repeat --schedule for up to
# five cron patterns; --timezone is an IANA zone (UTC when left out). Leave out --until to run until stopped.
hostingctl files import start --environment <environment-uuid> --application <application-uuid> \
--connection <connection-uuid> --from /public_html/wp-content --to wordpress/wp-content \
--schedule '0 2 * * 1-5' --schedule '0 14 * * 6' --timezone Africa/Johannesburg \
--until 2026-12-01T18:00Z --company my-company --confirm

# Run a schedule now, pause and resume it, or change its times, timezone or end date.
hostingctl files import run-now <import-uuid> --environment <environment-uuid> \
--company my-company --confirm
hostingctl files import pause <import-uuid> --environment <environment-uuid> \
--company my-company --confirm
hostingctl files import resume <import-uuid> --environment <environment-uuid> \
--company my-company --confirm
hostingctl files import schedule <import-uuid> --environment <environment-uuid> \
--schedule '0 3 * * *' --no-until --company my-company --confirm

# Mirror (advanced): also delete files here that are gone from the old host, at most --max-delete
# a run. The dry run shows the cap and the undo point or recovery folder that keeps deleted files.
hostingctl files import start --environment <environment-uuid> --application <application-uuid> \
--connection <connection-uuid> --from /public_html/wp-content --to wordpress/wp-content \
--mirror --max-delete 100 --company my-company --dry-run

For automation, provider-connections add --file private-request.json or --stdin accepts the complete API request as private JSON. A request with retention set to single-use keeps the connection for one run, like Use once, don't save in the panel. Include --company my-company --confirm when submitting it. The private file or input contains the request fields, not a bare password. Passwords and keys never go in a command-line argument.