Shared hosting is where most WordPress sites start: cheap, managed, a cPanel or Plesk login. Sites outgrow it — slow pages under load, a PHP version you can't choose, neighbours you can't see, limits on cron and memory. A VPS of your own fixes all of that, and with Cipi it doesn't mean learning to run a server.
This guide moves a site called example.com from any shared host to a Cipi server, without downtime: the old host keeps serving until the new server has the files, the database and its certificate, and only then does the DNS change.
Key ideas, in plain words#
| Term | Meaning |
|---|---|
| Custom app | How Cipi hosts a WordPress run from its dashboard: files in ~/htdocs, its own Linux user, PHP pool and database |
| DNS record | What tells browsers which server answers for your domain. Moving a site is mostly changing the A record |
| TTL | How long the world caches a DNS answer. Lower it a day before, and the switch takes minutes |
| Nginx | The web server Cipi uses. Faster than Apache, but it ignores .htaccess |
1. Take an inventory#
On the old host, a day before:
| Check | Where | Why |
|---|---|---|
| PHP version | cPanel Select PHP Version, Plesk PHP Settings | Start the new server on the same one |
| Database size and name | phpMyAdmin | How long the copy takes |
Size of wp-content/uploads | File Manager | How long the copy takes |
| Table prefix | wp-config.php, $table_prefix | Keep it |
Custom rules in .htaccess | File Manager, at the root of the site | Redirects to carry over (step 4) |
| Where your e-mail lives | DNS zone: the MX records | Mail must keep working (step 6) |
| Cron jobs | cPanel Cron Jobs | Carry them over |
| The DNS TTL | Your DNS provider | Lower it to 300 seconds now, so the switch is quick tomorrow |
Take a full backup on the old host too (cPanel Backup, or your backup plugin). It is the way back if anything goes wrong.
2. Prepare the server#
A VPS with Ubuntu 24.04 or 26.04 (choose one), then Cipi:
wget -O - https://cipi.sh/setup.sh | bash
The PHP the site runs today, if it isn't the server's default, and the app with its database:
sudo cipi php install 8.2 sudo cipi app create --custom --user=site --domain=example.com --php=8.2 --db=site sudo cipi alias add site www.example.com
Save the summary: the SSH password of the app user site and the database password are shown once. The web panel does the same in one form — Apps → New app → Custom PHP, New database ticked.
3. Copy the files and the database#
The database. Export it on the old host — phpMyAdmin → Export → Quick, SQL; or mysqldump over SSH if the host offers it — and compress it (site.sql.gz).
The files. In cPanel's File Manager, select everything in the site's folder (usually public_html) and Compress it as site.tar.gz. Download both files.
Then upload them to the new server as the app's user — any SFTP client (FileZilla, Cyberduck, Transmit) with site@your-server and the password from the summary — and unpack:
ssh site@your-server
cd ~/htdocs && tar xzf ~/site.tar.gz && rm ~/site.tar.gz
ls ~/htdocs # wp-config.php, wp-admin, wp-content, wp-includes…Then import the database, from the cipi user:
sudo cipi db restore site /home/site/site.sql.gz
sudo cipi db restore reads .sql and .sql.gz, stops at the first error instead of leaving half a database, and converts the collations a MySQL 8 host writes (utf8mb4_0900_ai_ci) to their MariaDB equivalents.
The host has SSH? Copy straight from server to server, with no download in between: as the app user, rsync -az olduser@old-host:public_html/ ~/htdocs/ — and the database with ssh olduser@old-host "mysqldump --single-transaction dbname | gzip" > ~/site.sql.gz.
4. Configure it for the new server#
wp-config.php. Point it at the new database, as the app user (nano ~/htdocs/wp-config.php):
define( 'DB_NAME', 'site' ); define( 'DB_USER', 'site' ); define( 'DB_PASSWORD', 'the password from the summary' ); define( 'DB_HOST', '127.0.0.1' ); define( 'DISABLE_WP_CRON', true ); // a real cron instead, in step 7
Leave $table_prefix as it was. Remove lines a host may have added that point at its own paths or caches (a WP_CACHE drop-in of the host's, a WPCACHEHOME).
.htaccess. Nginx doesn't read it. WordPress's own block (# BEGIN WordPress) is not needed: Cipi's site already sends every pretty permalink to index.php. Anything else in it moves:
In .htaccess | On Cipi |
|---|---|
Redirect 301 /old-page /new-page | sudo cipi redirect add site /old-page /new-page --301 |
| A whole old domain to the new one | An alias and sudo cipi www force-from-root site (or force-to-root) |
http → https | sudo cipi ssl force site |
| Blocking a path or an address | sudo cipi nginx edit site (directives of your own) |
php_value upload_max_filesize 64M | sudo cipi ini set upload_max_filesize=64M --app=site (and post_max_size) |
| Rules a security or cache plugin wrote | Nothing to carry: they were Apache's. The firewall, Fail2ban and the nightly scan guard the server, and the page cache replaces cache rewrites |
Permissions. Files unpacked by the app user already belong to it; if you copied them another way, sudo cipi app fix-permissions site.
5. Test before anyone else sees it#
The DNS still points at the old host, so test the new copy from the server first, with WP-CLI:
sudo cipi package install wp-cli sudo cipi app run site wp core verify-checksums # WordPress's own files intact sudo cipi app run site wp option get siteurl # the URL the database expects sudo cipi app run site wp plugin list sudo cipi app run site wp db check
Then in a browser: point the domain at the new server on your computer only, with a line in your hosts file (/etc/hosts on macOS and Linux, C:\Windows\System32\drivers\etc\hosts on Windows):
203.0.113.10 example.com www.example.com
The site has no certificate yet, so open it over http:// — or, if your DNS is on Cloudflare, issue the certificate now through Cloudflare's API, which doesn't need the DNS to point here: sudo cipi ssl dns set --token=… once, then sudo cipi ssl install site --dns=cloudflare (DNS validation). Click through the pages, sign in to wp-admin, upload an image. Remove the hosts line when you are done.
6. Switch#
At a quiet hour — and, for a shop or a busy blog, with edits frozen:
- Copy the database again if the site changed since step 3 (comments, orders): export, upload,
sudo cipi db restore site …once more. - Change the DNS: the
Arecords ofexample.comandwwwto the new server's IP (andAAAAif it has IPv6). Leave theMXrecords alone: your mailboxes stay where they are. - HTTPS, as soon as the domain answers from the new server:
sudo cipi ssl install site sudo cipi ssl force site
The certificate covers the domain and its aliases and renews by itself. With the TTL at 300 seconds, most visitors are on the new server within minutes; the rest within the old TTL.
E-mail. Shared hosting often runs your mailboxes, and a website-only VPS doesn't. Moving the website doesn't move them: keep the MX (and SPF, DKIM) records as they are, or move the mail to a provider (Fastmail, Google Workspace, Microsoft 365, Zoho) before you cancel the old plan. Forms and order e-mails from WordPress go out through an SMTP plugin with a sending provider (Postmark, Mailgun, SES, Brevo).
7. After the move#
sudo cipi cache site on # Nginx answers pages without running PHP sudo cipi backup profile add site-nightly --scope=all --apps=site --databases=site \ --cron='0 3 * * *' --keep-days=14 --dest=local,offsite --encrypt sudo cipi health set site --url=https://example.com/ --expect=200 sudo cipi scan enable # nightly malware scan of uploads
| Cron | WordPress's scheduler, every minute, as the app user (crontab -e): * * * * * php ~/htdocs/wp-cron.php >/dev/null 2>&1 — with DISABLE_WP_CRON from step 4. Carry over the host's other cron jobs the same way |
| Speed | The page cache above, the Cipi Cache plugin to purge only what changed, and an object cache for wp-admin and carts: cache WordPress, layer by layer. Remove a caching plugin of the old host's |
| Backups | offsite is a destination you add once — an S3 bucket or an SFTP server (backups) |
| Alerts | Telegram, Slack or e-mail when the site stops answering or the disk fills: notifications |
| The old plan | Keep it a week, untouched, as a way back. Then cancel it — after the mailboxes are sorted |
8. Optional: into Git#
A site that a developer maintains is easier to keep safe in a repository: plugins and updates tried on a copy, deployed as releases, undone in one step. The WordPress app type does that — and gives any branch a live preview with a copy of the database. Moving there later is another, smaller move: put the code in a repository, create the WordPress app beside this one, bring the database and the uploads over, swap the domains.
Troubleshooting#
| Problem | Fix |
|---|---|
| Error establishing a database connection | wp-config.php: DB_HOST is 127.0.0.1, and the name, user and password are the ones of the summary |
sudo cipi db restore stops with an error | It names the statement. A dump cut short (the download broke): export again. A DEFINER of the old host's user: export without views and triggers, or remove the DEFINER= clauses |
| The home page works, every other page is a 404 | Permalinks are fine on Nginx: re-save them once in Settings → Permalinks to rebuild WordPress's rules |
| Redirect loop after HTTPS | A plugin or wp-config.php forces HTTPS a second way, or Cloudflare is on Flexible: use Full (strict) |
| Images missing | wp-content/uploads didn't come along: copy it into ~/htdocs/wp-content/uploads as the app user |
| Old URLs inside posts | The domain changed during the move: sudo cipi app run site wp search-replace 'https://old.example.com' 'https://example.com' --all-tables |
| Mail stopped | The MX records were changed with the website's: point them back at your mail service |
| Uploads over 2 MB fail | sudo cipi ini set upload_max_filesize=64M --app=site and post_max_size=64M |
Questions
Will the site go down during the move?
No. The old host keeps serving until the DNS changes, and the new server is ready before it does. Plan the switch at a quiet hour and freeze edits (or orders) for the hour it takes.
What about my e-mail?
Shared hosting usually holds your mailboxes too, and Cipi doesn't host mail. Keep the MX records pointing where your mail is (or move it to a mail provider first); change only the records of the website. WordPress's own messages go out through an SMTP or API provider.
My site uses .htaccess rules.
The new server runs Nginx, which doesn't read .htaccess. WordPress's permalinks work as they are; redirects and blocks of your own become sudo cipi redirect rules or Nginx directives.
Which PHP version?
The one the site runs today, at first. Install it with sudo cipi php install 8.2 if it isn't the server's default, move, then upgrade on a quiet day.
Can I move several sites?
Yes: each is an app of its own, with its own user, PHP pool and database. Repeat the steps per site.
And WooCommerce?
The same steps, plus a freeze on orders during the switch and the shop's own settings: WooCommerce on a VPS.
What does it cost?
A VPS — a few euros or dollars a month for one site, often less than the shared plan — and nothing for Cipi, which is free and open source.