This guide moves a PHP or WordPress site from cPanel hosting to Container Hosting. You copy the files and database, test the site on its preview address, then point the domain. Keep the cPanel account until the new site has run well for a few days.
In cPanel, download a zip of public_html and export the database. In the container: add the domain, upload and extract the files, create a database, import the dump, update wp-config.php, test with Preview site, then change the A records. Leave MX records alone.
Before you start: check these
- PHP version. Containers run PHP 8.2, 8.3 or 8.4. Older code that needs PHP 7.x must be updated first.
.htaccess. Containers run nginx, which ignores.htaccess. WordPress pretty links work. Custom rewrite or password rules in.htaccessmust be handled another way.- Email. Container Hosting has no mailboxes. If your email is on the cPanel account, keep it there, or move it to Business Email before you close cPanel. See Sending Email from Your Website.
- Size. Check your plan's disk; see Container Hosting Plans and Limits.
1. Export from cPanel
- In cPanel File Manager, open
public_html, select everything, click Compress and choose Zip Archive. Download the zip. - In phpMyAdmin, select your database, click Export, choose Quick and SQL, and download the file.
- For WordPress, open
wp-config.phpand note the table prefix ($table_prefix).
2. Prepare the container
- Log in to the client area, open Hosting, choose the Container hosting tab and click Manage next to your site.
- Add your domain on the Domains tab. Do not change DNS yet. See Add a Domain and HTTPS.
- On the Databases tab, click New database. Copy the database name, username, host and password shown; the password is shown once.
3. Upload the files
- On the Files tab, open
public_htmland delete the placeholderindex.html. - Upload the zip (up to 512 MB per file) and Extract it there. For bigger sites, upload over SFTP; see Upload Files with SFTP.
- Make sure your
index.phpsits directly inpublic_html, not in a subfolder.
4. Import the database
Open Database manager on the Databases tab. It signs you in to your database; use its import to load the .sql file you exported.
5. Update the config
In wp-config.php set the new values from the Databases tab:
define( 'DB_NAME', 'the full database name shown' );
define( 'DB_USER', 'the username shown' );
define( 'DB_PASSWORD', 'the password shown' );
define( 'DB_HOST', 'the host shown' );Use the host exactly as the panel shows it. Other applications have the same four values in their own config file, for example .env in Laravel.
6. Test before switching DNS
Click Preview site on the overview. Log in, open a few pages, submit a form. Check the Logs tab for PHP errors.
7. Point the domain
- Change the A records for
@andwwwto the address on the Domains tab. Leave MX and email records as they are. - Wait for the DNS badge to show Pointed here. HTTPS is issued on the first secure visit.
- Add an SMTP plugin so WordPress can send email.
8. Finish
- Take a backup on the Backups tab.
- Add the WordPress cron job on the Cron jobs tab (
wp-cron.phpevery 15 minutes). - Keep the cPanel account for a few days, then cancel it, but only after email has been moved if it lived there.
For a WordPress site you can also start fresh with the one-click WordPress installer and import your content with a migration plugin.
Frequently asked questions
Will my email stop when I move?
Not if you change only the A records and leave MX records alone. Email keeps working where it is. Close the cPanel account only after email has a new home.
Does .htaccess work on Container Hosting?
No. Containers run nginx, which ignores .htaccess. WordPress pretty links work without it.
Can I test before changing DNS?
Yes. Use Preview site on the container overview.
My upload is larger than 512 MB. What now?
Upload it over SFTP instead of the Files tab, or split it into smaller archives.
Is there phpMyAdmin?
The Databases tab has its own Database manager for browsing tables, running SQL and importing or exporting.