Skip to main content
This guide moves a live WordPress site onto the Compose stack from Self-host WordPress on a VPS. Read the migration overview first. You need two things from the old host: the WordPress files under the document root, and a dump of the database. Everything else is rebuilt on the new server.
Arct Cloud provides the unmanaged Linux VPS. WordPress administration, plugins, themes, and updates remain yours. Arct Cloud does not provide WordPress application support.

Export from the Old Host

1

Put the Site in Maintenance Mode

Anything a visitor writes after you take the dump is lost. Enable maintenance mode, or take the export during your quietest hour and repeat it at cutover.
2

Dump the Database

Read the database name, user, and password out of wp-config.php, then:
On shared hosting without shell access, export the database from phpMyAdmin instead: select the database, choose Export, keep the Quick method and SQL format.
3

Archive the Files

From the document root:
The archive must contain wp-content/ in full. Core files are replaced by the container image, but your uploads, themes, plugins, and any mu-plugins live only here.
4

Note the Site URL

Write down the exact scheme and host currently stored. You need it in the search and replace step below.

Stand Up the Target Stack

Follow Self-host WordPress on a VPS through Start the Stack, with two changes:
  1. Do not complete the WordPress installer. You are importing a database, so a fresh install would be overwritten anyway.
  2. Stage the site with an internal certificate. DNS still points at the old host, so Caddy cannot complete an ACME challenge for your domain yet. Add tls internal to the site block in /opt/wordpress/Caddyfile:
Caddyfile
Caddy then issues a certificate from its own local authority. Your browser will warn that it is untrusted, which is expected while staging. You remove the line after cutover.

Add a WP-CLI Service

The search and replace step needs WP-CLI against the same volume and database. Add this service to /opt/wordpress/compose.yaml, alongside the existing ones:
compose.yaml
The tools profile keeps it out of docker compose up. It runs only when you ask for it by name.

Import

1

Copy the Export Across

From the Arct Cloud server:
2

Restore wp-content

Unpack only wp-content into the running container. Core files come from the image and should not be overwritten by the old host’s copies:
3

Import the Database

The dump carries its own table prefix. If the old site used a prefix other than wp_, add the matching $table_prefix line to the WordPress config through WORDPRESS_CONFIG_EXTRA in compose.yaml, then recreate the container.
4

Update the Site URL

Only if the domain or scheme changed. Serialized values are stored with byte-length prefixes, so a plain sed over the dump corrupts widget and plugin settings. WP-CLI rewrites them correctly:
Leave guid alone. Feed readers key off it, and rewriting it makes every post look new.
5

Flush Permalinks and Caches

Verify Before DNS

Add the new server’s IP to your own machine’s hosts file, /etc/hosts on Linux and macOS or C:\Windows\System32\drivers\etc\hosts on Windows:
Load the site, accept the staging certificate warning, and clear the temporary Basic Authentication prompt. Then check:
  • The homepage, a post, a category archive, and a page all load
  • Media in wp-content/uploads resolves rather than 404s
  • The admin dashboard signs in and Settings shows the expected site address
  • Permalinks work on a deep URL, not only the homepage
  • Contact forms, search, and any commerce checkout still function
  • Tools > Site Health reports no new critical issues
Remove the hosts entry when you are done.

Cut Over

1

Take a Final Export

Repeat the database dump and the wp-content archive from the old host, then re-import. Comments, orders, and posts written since your first export live only there.
2

Update DNS

Point the A and AAAA records at the new server. See Website and DNS Migration for TTL handling and propagation checks.
3

Issue the Real Certificate

Once DNS resolves to the new server, remove both tls internal and the basic_auth block from /opt/wordpress/Caddyfile, then reload:
Caddy completes the ACME challenge and replaces the staging certificate.
4

Set Up Backups

Follow Back Up and Restore in the WordPress deployment guide. The old host’s backup schedule does not follow the site.
5

Decommission the Old Host

Keep it for a few days, then run the checks before you delete it.

Troubleshooting

The import ran but the table prefix does not match. Check with sudo docker compose run --rm wpcli wp db tables, then set $table_prefix through WORDPRESS_CONFIG_EXTRA to match what the dump created.
siteurl and home still hold the old value. Confirm with wp option get siteurl, then re-run the search and replace step.
Permalink rules were not rebuilt. Run wp rewrite flush. The Compose stack proxies through Caddy to Apache, so .htaccess from the old host still applies inside the container.
File ownership did not survive the copy. Re-run chown -R www-data:www-data /var/www/html/wp-content inside the WordPress container, then check free disk space with df -h.
Plugins that write server-level config expect the old host’s stack. Disable them with wp plugin deactivate PLUGIN_NAME, load the site, then reconfigure them for a containerized Apache behind a reverse proxy.
The old site stored http:// URLs in post content. Re-run the search and replace with the http:// to https:// pair for the same host.