Skip to content

Migrate WordPress from Cloudways to cPanel: the full cutover runbook

Cloudways is a managed layer over a raw cloud VM. Leaving it means rebuilding Varnish, the object cache, Breeze and panel cron on cPanel — and running a cutover that keeps a WooCommerce store serving.

Moving a WordPress site from Cloudways to cPanel means leaving a managed layer that wraps a raw cloud VM you rented through them, usually a DigitalOcean, Vultr, Linode, AWS or Google Cloud instance. Under the panel sit Varnish as a full-page cache, Nginx in front of Apache, PHP-FPM, and often Redis or Memcached as an object cache. When you leave, WordPress comes with you and none of that does. Worse, the parts of the site that depended on it travel across and break on arrival: Breeze purging a Varnish layer that no longer answers, an object-cache.php drop-in you never installed by hand, absolute paths under /home/master/applications, and cron defined in their panel rather than in WordPress. This runbook covers pulling a portable archive off the VM, stripping that residue, rebuilding an equivalent on cPanel, and running the cutover in an order that keeps a store taking orders.

What you’ll accomplish

  • A portable archive — database and files — taken over SSH rather than out of a platform backup built to restore back into the platform.
  • A cPanel copy with every Cloudways artefact removed and a named replacement for each layer you gave up.
  • A smoke test against the real domain before a single DNS record changes.
  • A cutover with a short read-only window, and a written procedure for reconciling WooCommerce orders placed inside it.
  • A rollback you can run in minutes, and an honest statement of when it stops being free.

Prerequisites

You need SSH to the Cloudways server (master credentials, or the application user for that app), panel access to read the cron entries, a cPanel account with a shell, and control of the authoritative DNS zone. Cloudways ships WP-CLI on the server and most cPanel hosts expose it as wp.

Answer these while the site is still live:

  1. What PHP version is the application on? Confirm with wp --info. A PHP 8.2 codebase dropped onto a cPanel account defaulting to 7.4 fails in ways that look like file corruption. Set the target in MultiPHP Manager before importing.
  2. How big is the database? wp db size --tables --size_format=mb. Past a few hundred megabytes, both the import method and the length of your window change.
  3. Is an object cache switched on? Look for wp-content/object-cache.php. If it exists, the site reads from Redis or Memcached today, and cPanel may have neither.
  4. What runs on a schedule? Read the panel’s cron list and the crontab of the user your SSH session lands as. Neither travels with the files.
  5. Where does mail come from? Cloudways hosts no mailboxes, so MX already points at a third party — see step 9.
  6. What is today’s TTFB? Varnish was doing much of that work; measure now so you compare against a number.

Then drop the TTL on the A and AAAA records to 300 seconds, at least 24 hours ahead. That one change turns a bad cutover from a multi-hour problem into a five-minute one.

How it works

Each layer of the managed stack is either replaced on cPanel or consciously dropped. The map pairs them up and flags the two with no real equivalent.

Two-column map pairing each Cloudways stack layer with its cPanel replacement, with layers that have no equivalent flagged

Varnish. Most anonymous traffic never reaches PHP on Cloudways; Varnish answers it. Nothing on cPanel does that until you build it — LiteSpeed Cache on a LiteSpeed host, or a page cache plugin plus a CDN on Apache. Worth saying plainly: the theme performance you were happy with was measured with PHP largely bypassed. The other half is exclusions. Varnish was told never to cache cart, checkout and account pages; your new cache needs the same rules in its own syntax, because a store that caches its cart page hands one shopper another shopper’s basket.

Breeze. Their cache plugin cooperates with that Varnish layer; off the platform, half of it talks to nothing. It also writes an advanced-cache.php drop-in and a WP_CACHE constant, so leaving it alongside a second cache plugin gives you two page caches fighting over one request. Remove it before cutover.

The object cache. If object-cache.php exists, it points WordPress at a Redis or Memcached instance on that VM. Carried to cPanel it produces a fatal error or a site that hangs on every request. Check whether your cPanel server has Redis at all before planning around it; on many shared servers it does not, and for a modest site the honest answer is no object cache rather than a fake one.

Users and paths. Cloudways gives you a master user whose home holds every application, plus per-application SSH and SFTP users scoped to one app. Anything that stored an absolute path — a backup plugin’s settings, an image optimiser’s cache directory, a hardcoded require — stored it under /home/master/applications. On cPanel there is one user and one home, and every one of those strings is now wrong.

Staging is the fifth gap. The panel clones an application and pushes or pulls between the two; cPanel has no equivalent, so a staging subdomain and a promotion process become yours to define — the staging-to-production shape covers what that needs to contain.

Step-by-step

Everything before the freeze is rehearsal you can repeat as often as you like. Everything after it is live.

Cutover timeline showing the rehearsal stage, the read-only window, the DNS flip, and where rollback stops being free

  1. Take your own archive over SSH. Platform backups restore back into the platform, so make a portable copy yourself. Find the application directory rather than guessing its name.

    ls ~/applications/
    cd ~/applications/APPNAME/public_html
    wp --info

    wp --info prints the PHP binary and version, the WP-CLI version, and the wp-config.php path it found. No config found means the wrong directory.

  2. Export the database and verify the dump from the shell, not a browser tool that times out.

    wp db export ~/cloudways-dump.sql --default-character-set=utf8mb4 --single-transaction
    ls -lh ~/cloudways-dump.sql
    tail -3 ~/cloudways-dump.sql

    WP-CLI prints Success: Exported to '...'. The tail must end on a completed statement — a truncated dump imports without complaint and silently loses the end of your largest table.

  3. Pull the files. With a large uploads/ directory, rsync from the cPanel side beats downloading and re-uploading a tarball, and it makes the delta copy during the freeze cheap.

    rsync -avz master_user@203.0.113.20:applications/APPNAME/public_html/ ~/public_html/
    du -sh ~/public_html

    rsync ends with a transferred-bytes summary; the size should be close to what the application used on Cloudways.

  4. Create the destination and import at real size. Build the database and user with cPanel’s MySQL Database Wizard, set the PHP version to match step 1, then import inside screen or tmux so a dropped session cannot abort it.

    mysql --max-allowed-packet=512M --default-character-set=utf8mb4 -u DBUSER -p DBNAME < ~/cloudways-dump.sql
    mysql -u DBUSER -p -e 'SELECT COUNT(*) FROM information_schema.tables WHERE table_schema="DBNAME";'

    A clean import prints nothing. The table count should match the source — run the same query there before you leave.

  5. Write a fresh wp-config.php. Do not reuse theirs. Copy your own constants by hand, add the cPanel credentials, generate new salts, and set WP_CACHE to false until you have chosen a replacement cache.

    grep -n 'WP_CACHE\|DB_NAME\|DB_HOST\|/home/master' ~/public_html/wp-config.php

    The only matches you want are your own DB_NAME, DB_HOST and WP_CACHE lines. A surviving /home/master path means you copied rather than rewrote.

  6. Strip the platform residue. Breeze and the drop-ins reference infrastructure that no longer exists.

    rm -f ~/public_html/wp-content/object-cache.php ~/public_html/wp-content/advanced-cache.php
    rm -rf ~/public_html/wp-content/plugins/breeze ~/public_html/wp-content/cache
    grep -rn '/home/master' ~/public_html --include=*.php | grep -v '/vendor/'

    An empty grep result is the goal. Then check the database — absolute paths hide in serialised options far more often than in code:

    wp db search '/home/master' --all-tables

    Every row it returns is a setting now pointing at nothing. Fix them through the plugin’s own settings screen where you can, not with raw SQL.

  7. Search-replace the application hostname. Every Cloudways application also answers on a temporary platform hostname, and that string is baked into the database. Take it verbatim from the application’s settings screen rather than typing what you think it looks like.

    wp search-replace 'your-app-hostname.example' 'example.com' --all-tables --dry-run --report-changed-only
    wp search-replace 'your-app-hostname.example' 'example.com' --all-tables --precise

    The dry run prints counts and a replacements line; read them before running it for real. wp search-replace walks serialised data correctly where hand-written SQL corrupts it — the serialisation problem explains what breaks otherwise, and the WP-CLI reference documents every flag. Repeat the pair for http:// to https://, and for a CDN hostname if you used one.

  8. Rebuild the cache layer before cutover. On LiteSpeed, install LiteSpeed Cache — the Enterprise versus OpenLiteSpeed distinction matters, since only the commercial build supports the full page-cache feature set. On Apache, pick a page cache plugin. Either way, re-enter the exclusions Varnish applied: cart, checkout, my-account, and any URL carrying a WooCommerce session. Then find out whether an object cache is possible at all:

    redis-cli ping

    PONG means a local Redis exists and you can install the Redis Object Cache plugin against it. Connection refused means that layer simply goes away.

  9. Fix cron and mail routing. WP-Cron fires on traffic, which was fine while the panel called a real cron entry. Add one in cPanel’s Cron Jobs and set DISABLE_WP_CRON to true.

    command -v wp
    wp cron event list --fields=hook,next_run_relative | head -20

    Use the path command -v wp returns in the cron line. Then mail: Cloudways hosts no mailboxes, so MX points at a third party, while cPanel assumes by default that it is the mail exchanger for any domain it hosts.

    dig +short MX example.com
    grep -x 'example.com' /etc/localdomains /etc/remotedomains

    If dig returns an external provider, the domain belongs in /etc/remotedomains — set it on cPanel’s Email Routing screen as a remote mail exchanger. Otherwise Exim swallows inbound mail into local mailboxes nobody reads.

  10. Smoke test on the real domain without touching DNS.

    curl -sI --resolve example.com:443:203.0.113.10 https://example.com/

    You want HTTP/2 200 from the cPanel IP. The certificate will not match yet; step 12 fixes that. Then walk it in a browser: login, a test-gateway checkout, a contact form, the sitemap, and one example of every custom post type.

  11. Freeze writes, sync the delta, flip DNS. Put the store into maintenance mode so it stops taking orders and comments. Re-export the database, re-import, re-run the search-replace, then repeat the rsync from step 3; a second run should report almost nothing. Only then change the A record. During propagation both hosts answer, which is exactly why the freeze exists.

  12. Run AutoSSL once the domain resolves at cPanel. AutoSSL validates over HTTP against the live name, so it cannot issue before DNS moves. Open SSL/TLS Status, select every domain and subdomain, and run it.

    uapi SSL installed_hosts | grep -A2 'domains'

    Apex, www and every subdomain must appear; a certificate covering example.com but not www.example.com throws a warning at half your traffic. cPanel’s documentation portal covers the provider options if the default refuses a name.

Reconciling orders, and the rollback

If the store took payments after your final dump — the freeze slipped, or a gateway posted a delayed callback — those rows exist on Cloudways and not on cPanel. Find them before deleting anything. Under WooCommerce’s high-performance order storage orders live in wp_wc_orders; on post storage they are shop_order rows in wp_posts. Compare the highest order number on each host, export the gap, re-enter it on the new site, then repoint the gateway’s webhook URL.

Keep the Cloudways server running and paid for until you are certain. Reverting the A record at a 300-second TTL restores traffic within minutes — but only while the cPanel copy has taken no writes. The first real order, comment or form submission on the new host is the point of no return, not the DNS change.

Validate it works

wp option get siteurl && wp option get home
wp core verify-checksums
wp db check
wp plugin list --status=active --fields=name,version

siteurl and home must be your final domain, never the platform hostname. verify-checksums should report success; anything flagged did not transfer cleanly. wp db check should return OK for every table, and Breeze should be gone from the list.

Then the view from outside:

curl -sI https://example.com/ | head -20
curl -sI https://example.com/ | grep -i 'x-varnish\|x-litespeed-cache\|cache-control'
dig +short example.com @1.1.1.1

Look for a 200, a hit or miss header from the cache you installed, no Varnish header, and the cPanel IP from a public resolver. Then test transactional mail properly — a password reset, a contact form and an order confirmation, not one of the three — and place one real low-value order end to end.

Troubleshooting

Fatal error naming a Redis or Memcached class. The object-cache.php drop-in survived the copy and is reaching for a backend that is not here. Delete it as in step 6. If you need an object cache, confirm Redis is installed first, then install the plugin that writes its own drop-in.

Every page is stale, or shoppers see each other’s carts. Two causes, both from step 8: Breeze’s advanced-cache.php is still present and fighting your new cache plugin, or the new cache has no exclusions for cart, checkout and account pages. Varnish had those and nothing carried them over. Related mini-cart symptoms are in the cart fragments guide.

A plugin’s settings page throws a path error, or uploads land in the wrong place. Something recorded /home/master/applications/... in the database. Run the wp db search from step 6, then re-save that plugin’s settings so it writes the new path itself.

Scheduled posts, subscription renewals or report emails stop. The panel’s cron entries did not travel. Add the cPanel cron job and DISABLE_WP_CRON from step 9, then confirm with wp cron event list that events show sane next-run times.

Mixed content warnings after the certificate issues. Asset URLs in the database still say http:// or name the old hostname. Re-run the pairs from step 7; fixing mixed content after an SSL move covers what a database pass does not reach.

When this is the wrong approach

If the only motivation is the monthly bill, price the replacement work first. Cloudways was bundling a page cache, an object cache, backups, patching, staging and a support desk. On an unmanaged cPanel box each becomes somebody’s job, and for a store that takes orders with nobody assigned to own them, you are trading a predictable bill for an unpredictable outage.

If what you want is a faster or cheaper VM, you are already on one and can usually resize the instance without migrating anywhere. Moving to cPanel earns its keep when you want what cPanel is better at: mailboxes on the same account, per-account isolation across many sites, or a direct relationship with the host. And if the site is a busy store with no plan for the page cache layer, do not move until that plan exists.

The shape rhymes with the other managed-host exits — WP Engine, Kinsta and SiteGround — which differ mainly in how you get the archive out and what platform code you strip on arrival.

Running WordPress that earns real money deserves an operator — Stack Harbor runs that stack under Enterprise WordPress; book an infrastructure consult.