Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk12 min

How to Migrate a Website from cPanel to an Ubuntu VPS (Without Losing Data or Downtime)

A safe cPanel-to-Ubuntu migration builds the VPS in parallel, copies files and databases, tests every site privately, then changes DNS and configures TLS while the old server remains ready for rollback.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The safest cPanel-to-Ubuntu migration is a parallel build, not a one-click move. Keep the cPanel server online while you provision and secure the Ubuntu VPS, reproduce the web and database stack, copy files and data, test the new host privately, then change DNS and issue certificates. Retain the old server until traffic, transactions, mail and TLS checks are clean so you can roll back quickly.

A plain Ubuntu VPS does not provide cPanel’s account management, mail configuration, backups or service defaults. You either install cPanel on a supported Ubuntu release or deliberately rebuild each service yourself. The steps below cover both choices, with commands for a conventional Ubuntu stack.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the destination architecture first

Your migration plan depends on whether the VPS will continue running cPanel.

Choice What you receive Main advantages Main trade-offs
Install cPanel on the VPS A cPanel and WHM environment with account, DNS, mail, database and backup interfaces. Familiar workflows and supported cPanel-to-cPanel transfers; less manual recreation of accounts. License cost, more software overhead and continued dependence on cPanel’s supported versions and layout.
Run a plain Ubuntu stack Ubuntu plus your selected web server, runtime, database, firewall, users, cron, logging, mail and backup tools. Maximum control, potentially lower overhead and freedom to choose Apache, nginx and application components. Every service must be configured, secured, backed up, monitored and maintained manually; cPanel’s account archive is not a complete server image.

Requirements when retaining cPanel

cPanel’s 2026 requirements list Ubuntu 24.04 LTS as a supported Ubuntu target, with at least 2 GB of RAM and 20 GB of disk. cPanel recommends 4 GB of RAM and 40 GB of disk. The installer also requires root access, a registered and resolvable fully qualified hostname and IPv4 connectivity. Confirm the current requirements before provisioning because support can change between releases.

#1 Best Overall
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

What a plain Ubuntu VPS must replace

Without cPanel, create a service inventory rather than assuming the operating system will reproduce the old account. Ubuntu’s server documentation treats Apache2, nginx, DNS, databases, backups and security as separate administration areas. You must select and configure each one, including virtual hosts or server blocks, PHP or another application runtime, extensions, database users and privileges, mail transport and delivery, firewall rules, log rotation, scheduled jobs and backup retention.

Inventory the cPanel account before touching DNS

Make a written inventory for every account and domain. This is the migration’s control document and your rollback checklist.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • List every primary domain, addon domain, parked domain, subdomain and hostname, with its current document root.
  • Record redirects, canonical-host rules, rewrite files, custom error pages and any forced HTTP-to-HTTPS behavior.
  • Write down the PHP version, enabled extensions, upload and memory limits, application runtime versions and any web-server modules.
  • Identify every database, database user, password location, charset, collation, privilege and connection string.
  • Locate uploads, media, generated files, private storage, symbolic links and directories that must be writable by the application.
  • Export environment variables and application secrets to a secure password manager or encrypted file; do not leave them in public web roots.
  • Capture all cron entries, queue workers, scheduled scripts, webhook endpoints, API integrations and background tasks.
  • List mailboxes, aliases, forwarders, catch-all behavior, SMTP credentials and any application that sends mail through the old host.
  • Export DNS records, including A, AAAA, CNAME, MX, TXT, SPF, DKIM, DMARC, verification and service-discovery records.
  • Record certificate names, wildcard coverage, renewal method and which services terminate TLS.
  • Confirm who controls the DNS zone and nameservers. You cannot complete a reliable cutover if you cannot edit the authoritative records.

Compare the source software versions with the destination before copying data. cPanel advises matching target software and transferring service configurations before moving accounts; a different PHP major version or database collation can turn a file copy into an application outage.

Create independent backups and a rollback point

Take a provider snapshot or full-server image when the VPS host offers one, but do not rely on it as your only copy. Keep independent copies of website files, configuration and database dumps. A cPanel account backup protects data managed by cPanel, but it may not contain programs, operating-system settings or other state installed outside cPanel. A VPS-level image protects the destination’s configuration and gives you a fast recovery path.

Export MySQL or MariaDB databases

Ubuntu documents the basic logical export and restore pattern:

mysqldump [database name] > dump.sql

Use the appropriate database account and options for your environment. For a production database, include routines, triggers and events when the application uses them, and store the dump outside the public document root. Inspect the resulting file and test that it can be read before the migration window. A dump that was never validated is not a backup you can trust.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Plan the final consistency window

The first copy can run while the site remains live, but database writes made during that copy may be absent from the destination. Schedule a short maintenance window or temporarily freeze writes for the final dump. Put the application in maintenance mode, stop queue workers that write to the database, take the final export, copy any files uploaded since the first sync, import the final dump and then test before reopening traffic.

Rank #2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Provision and secure the Ubuntu VPS

  1. Choose a supported Ubuntu LTS image and size it for the inventory, not just the current traffic. Leave room for database growth, logs, temporary dumps and future releases. If cPanel is the destination, meet its 24.04 LTS, RAM, disk, root, hostname and IPv4 prerequisites.
  2. Log in with the provider’s initial access, create a named administrative user and grant sudo privileges. Create and test an SSH key for that user before disabling password login or root SSH access.
  3. Apply security updates, set the correct timezone and hostname, and verify that the fully qualified hostname resolves to the VPS address.
  4. Configure the host firewall to allow only required services. A typical web host needs SSH, HTTP on port 80 and HTTPS on port 443; open database or mail ports only when the architecture actually requires public access.
  5. Install the selected web server, runtime, extensions and database versions that match the source application. Do not upgrade PHP or the database merely because a newer package is available until compatibility has been tested.
  6. Set up monitoring, log rotation, scheduled backups and disk-space alerts before cutover. A migration that works but fills its disk or loses logs is not operationally complete.

Keep administrative keys, database passwords and API secrets out of shell history and web-accessible files. Use least-privilege service accounts and file ownership that lets the web process write only to directories that genuinely require it.

Recreate websites and application configuration

Create a host definition for every hostname

For Apache, create a virtual host; for nginx, create a server block. Set the exact server name(s), document root, index files, access and error logs, TLS configuration and application handler. Repeat this for each primary domain, subdomain and addon domain rather than pointing every name at one default site.

Preserve redirect and canonical-host behavior. A rule that sends www to the apex domain, or HTTP to HTTPS, must be tested for loops after the new TLS certificate is installed. Keep private configuration outside the document root and load environment variables through the method supported by the application.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Match runtime behavior

Install the same PHP major and minor version, extensions and limits recorded during inventory. Confirm settings such as memory limit, maximum upload size, execution time, timezone and OPcache behavior. For a non-PHP application, reproduce its runtime version, process manager, socket or port, environment variables and restart policy. A page that loads while a worker, queue or scheduled command is missing is only a partial migration.

Restore ownership and writable paths

Copy files with ownership and permissions appropriate for the new service account. Keep code read-only where practical and grant write access only to uploads, caches, compiled templates, sessions or other documented paths. Check symbolic links after copying; links that pointed to a cPanel-specific path often break on Ubuntu.

Recreate cron and workers

Translate each cPanel cron entry into the Ubuntu user’s crontab or a systemd timer. Use absolute paths, the correct working directory and an explicit environment. Redirect output to a controlled log or monitoring destination so failures are visible. Start queue workers under a supervisor or systemd unit and verify that they restart after a reboot.

Copy files and import databases

Transfer website files securely

Use an authenticated SSH transfer such as rsync or scp over a protected account. Copy the initial dataset while the source remains live, then compare file counts and sizes. Exclude caches, temporary sessions and generated logs when they can be safely recreated, but include user uploads, media and any files the application treats as data.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

After the final write freeze, run a second synchronization for files changed since the first copy. Preserve timestamps where useful for troubleshooting, and verify that the destination account can read code and write only to intended directories.

Import SQL and recreate privileges

Create the destination database with a compatible character set and collation, create the application user, grant only required privileges, and import the dump:

mysql [database name] < dump.sql

Use the actual database name in place of the bracketed example. Check table counts, views, triggers, routines and event schedules after import. Update the application’s connection host, database name, username and password, then test both reads and writes. If the source uses a socket or a non-default port, make that difference explicit in the destination configuration.

When the destination also runs cPanel

For cPanel-to-cPanel moves, WHM’s Transfer Tool or an account archive (often called a cpmove archive) is the supported path. The cPanel restore interface accepts an account backup or cpmove archive. Even with that automation, verify domains, DNS, mail, certificates, cron jobs and custom software afterward; an account transfer does not prove that every unmanaged daemon or provider-level setting was reproduced.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test privately before changing public DNS

Do not use DNS propagation as your first test. Point a temporary staging hostname at the VPS or add a local hosts-file entry that maps the production hostname to the new IP. Only your test machine will use that mapping, so the public site remains on cPanel.

Application checklist

  • Request the home page and representative deep URLs; confirm expected status codes and absence of redirect loops.
  • Test both the apex and www hostnames, HTTP-to-HTTPS redirects and any alternate domains.
  • Log in, log out, reset a password and submit every important form.
  • Create, edit and delete a representative record to prove database writes, not just reads.
  • Upload and retrieve images, documents and other media; test filenames with spaces and non-ASCII characters if users can create them.
  • Exercise search, checkout or other transaction paths, webhooks, API calls and background jobs.
  • Check email generation, SMTP authentication, mailbox delivery and bounce handling if mail remains on this host.
  • Review web-server, PHP/application, database and system logs while performing the tests.
  • Check CPU, memory, disk, database connections and firewall logs under a realistic test load.

Fix failures on the destination and repeat the tests. Do not switch DNS to make a broken application easier to observe.

Lower TTL, change DNS and issue TLS certificates

When practical, lower the relevant DNS TTL before the migration so resolvers do not retain the old address longer than necessary. There is no universal propagation time: caches honor their own remaining TTL, and different resolvers can update at different times. Keep the old host available during this period.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Perform the cutover

  1. Confirm the final database dump and file synchronization are complete, and place the source application in maintenance mode if writes cannot be paused safely.
  2. Update authoritative A and, where used, AAAA records to the VPS addresses. Leave unrelated MX, TXT and verification records unchanged unless the mail design is also moving.
  3. Query the authoritative nameservers and several public resolvers to verify the new answers. Test from more than one network rather than trusting a single cached result.
  4. Watch destination access logs, application errors, database health, mail queues and resource usage as requests arrive.

Obtain or reinstall HTTPS

For a new Ubuntu web server, Let’s Encrypt certificates are free, automated and trusted by major browsers and clients. The domain’s DNS must point to the VPS, and the HTTP-01 challenge requires port 80 to be reachable.

With nginx, Certbot can configure a certificate with:

sudo certbot --nginx -d example.com -d www.example.com

For Apache, use the corresponding command:

sudo certbot --apache -d example.com -d www.example.com

Replace the example names with the hostnames covered by the certificate. Certbot stores live certificate links under /etc/letsencrypt/live/<domain>/. Verify that the web server presents the correct names, intermediate chain and redirect behavior, then test renewal without replacing the live certificate:

sudo certbot renew --dry-run

Certificates issued by Let’s Encrypt are valid for 90 days, so automated renewal and a successful dry run are operational requirements, not optional cleanup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Monitor the new VPS and keep rollback possible

cPanel warns that a migration can cause downtime. Define a rollback trigger before the cutover, such as failed logins, lost transactions, broken mail, sustained 5xx responses, certificate errors or resource exhaustion. Keep the cPanel host unchanged until the new VPS has passed that observation period.

If the destination fails

  1. Restore the old A and AAAA records at the authoritative DNS provider.
  2. Confirm the old site is serving the expected certificate and application version.
  3. Preserve destination logs, database errors and request samples before changing anything; they identify the failure faster than a blind rebuild.
  4. Fix the destination configuration and repeat the final database and file synchronization so new writes are not lost.
  5. Re-run the private test suite, announce a new maintenance window if needed, and cut over again only after the rollback trigger is cleared.

Do not delete the source account or revoke its certificate immediately after DNS changes. DNS caches, mail senders and API clients can continue using the old address for a while, and the old server is your simplest recovery path.

Common migration failures and their fixes

The site shows a default page or the wrong domain

The virtual host or server block is missing, disabled or ordered incorrectly. Confirm the requested hostname, document root and enabled configuration, then reload the web server and retest with the private hosts-file mapping.

Best Value
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0 | for PC, Mac, Laptop, PS4, Xbox one, Xbox 360-(Black)
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.

PHP downloads instead of executing

The PHP handler, socket or module is not installed or does not match the web server configuration. Install the required runtime and extension set, point the host definition at the correct handler, and check the error log for permission or socket errors.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Database authentication or collation errors appear

Verify the database name, user, password, host, port, character set and collation. Recreate missing privileges and inspect the import for truncated tables, routines or triggers. Test a write through the application rather than relying on a successful command-line login.

Uploads fail with permission or size errors

Check ownership of the upload directory, its write permission, PHP or runtime upload limits, reverse-proxy limits and available disk space. Grant write access only to the required directory; do not make the entire document root writable.

Cron jobs run manually but not on schedule

Cron has a minimal environment. Use absolute executable paths, set the working directory, load required variables explicitly and capture stderr. Confirm the job runs as the intended user and that its output is visible in a log.

HTTPS works for one name but not another

The certificate may not include every hostname, or DNS may still resolve one name to cPanel. Check A and AAAA answers, the certificate’s subject names, the server’s TLS host mapping and any redirect rules. Issue a certificate covering all required names.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Mail stops after the web cutover

Web hosting and mail hosting are separate decisions. Verify MX, SPF, DKIM and DMARC records and confirm whether mailboxes actually moved. If mail remains on the cPanel host or another provider, leave its MX records unchanged and test application SMTP credentials separately.

Quick Recap

Bestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$129.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$219.99
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
Bestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$189.99

Final migration checklist

  • All domains, redirects, runtime versions, extensions, secrets, cron jobs, databases, uploads, mail dependencies and DNS records are inventoried.
  • Independent file and database backups exist, and a provider snapshot or image is available where possible.
  • The VPS is patched, access-controlled, firewalled, monitored and backed up.
  • Web-server hosts, runtime handlers, database users, permissions, workers and scheduled jobs are recreated.
  • Initial and final file synchronizations are complete; the final database export includes every last write.
  • The destination passes private tests for pages, redirects, authentication, writes, uploads, mail, webhooks, jobs, logs and resource usage.
  • DNS control, TTL settings and the rollback trigger are confirmed before changing records.
  • A/AAAA records point to the VPS, authoritative and public resolver answers are checked, and TLS is issued for every hostname.
  • Certificate renewal passes sudo certbot renew --dry-run where Certbot is used.
  • The cPanel source remains intact until traffic and business-critical transactions are verified on the VPS.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.