Moving from cPanel
Move a PHP or WordPress site from cPanel hosting by hand: its files as a ZIP, its database as a .sql file, then its domain. Your email stays where it is.
Updated 17 Oct 20265 min read
You move a cPanel site in four steps: download its public_html folder as a ZIP and its database as a .sql file, add a PHP site from the ZIP, import the database, then point your domain here. Your email stays with your old host, and keeps working, until mailboxes come to Tanzahost.
This works for WordPress and for any PHP site that runs on cPanel: Apache with .htaccess, as you're used to.
1. Take your files out of cPanel
In cPanel, open File Manager.
Right-click the
public_htmlfolder and compress it to a.ziparchive.Select the ZIP and download it.
Keep the folder itself in the ZIP: when the top of a ZIP is a public_html folder, we recognise it and make its contents the site. Anything else in the ZIP is kept aside in a from-zip folder for you to look at.
One ZIP can be up to 2 GB. For a bigger site, leave out large folders you can upload separately later, like old backups or wp-content/uploads, and upload them with the file manager afterwards.
2. Take your database out of cPanel
Use either of cPanel's own tools:
Backup Wizard: choose a partial backup of MySQL Databases, and download your database as a
.sqlfile.phpMyAdmin: choose your database, then Export, and save the
.sqlfile.
If you don't know which database your site uses, open its settings file. For WordPress that's wp-config.php, where DB_NAME names it.
3. Add the site
Open your project. In the Add a service card, choose PHP site.
Give it a Site name, like
blog, and choose its PHP version. Pick the version your site used on cPanel, or the newest one it supports.Under Start with, choose A ZIP file, and drop your ZIP. If the connection drops, choose the same file again: it carries on where it stopped.
Choose Create site.
If your site needs a PHP extension or a setting like a bigger upload_max_filesize, set it on the site's PHP settings. See PHP sites.
4. Bring the database
In the same Add a service card, choose Database. Pick MySQL or MariaDB. For a small site, Shared is enough; Its own gets its own memory and processor, with limits you set.
Open the new database. Under Import and export, drop your
.sqlfile. A.sql.gzworks too, and uploads faster.Watch it import, table by table. When it's done, the page says how many tables came in.
Under Connect, note the Host, Database, User and Password. The database is reachable only from your project's own apps. An own database can also be opened to your own computer, encrypted, if you switch that on: see Connect from your own computer.
More on imports, and what to do when one fails: import and export.
5. Point the site at its new database
Open the site's file manager (Open the file manager on the site's page).
Open your settings file. For WordPress, it's
wp-config.php.Replace the database's name, user, password and host with the ones from Connect. In
wp-config.phpthey areDB_NAME,DB_USER,DB_PASSWORDandDB_HOST. Leave$table_prefixas it is.Save. The version before your save is kept for 7 days, if you need it back.
Then check the site on its free address. A moved WordPress site still keeps your domain as its address in its database, so its links may lead to your domain, which still shows the old host. That's expected until the next step.
6. Move your domain
On your project's Domains tab, choose Add a domain, and pick how to connect it:
| Choice | What happens to your email |
|---|---|
| Use our nameservers | Before you switch, we read your domain's current records, its email records (MX) included, and copy the ones you tick. Email keeps going where it goes today. |
| Connect Cloudflare | If your DNS is at Cloudflare. Your other records, email included, stay in your Cloudflare account. |
| Add records yourself | Your DNS stays where it is. You add the records we show; your email records stay as they are. |
We check your domain every minute. When it points here, its SSL certificate follows by itself, and the site is live on your domain. See add a domain.
Your email
Tanzahost has no mailboxes yet. Your email stays with your current host until they come:
Keep your cPanel account while your email lives there. Cancelling it would stop your email.
Your email records stay the same, whichever way you connect your domain, so mail keeps arriving at your old host.
Cron jobs
cPanel's cron jobs become scheduled tasks. On your site's page, under Scheduled tasks, choose Add a scheduled task, and give it the same command and timetable, like php scripts/report.php every 5 minutes. Times are in UTC. A WordPress site's own cron doesn't need a task of yours: WordPress runs it on each visit, as it did on cPanel.
Example: Asha moves her blog
Asha's shop, duka, already runs on Tanzahost at duka.co.tz. Her old WordPress blog was still on cPanel at blog.duka.co.tz.
In cPanel's File Manager she compressed
public_htmlintopublic_html.zipand downloaded it. With the Backup Wizard she downloadedasha_blog.sql.In duka, she added a PHP site named
blogfrom the ZIP.She added a shared MySQL named
blog, and droppedasha_blog.sqlunder Import and export: 12 tables.In the file manager she opened
wp-config.phpand put in the host, database, user and password from Connect.On the Domains tab she added blog.duka.co.tz. As duka.co.tz already uses our nameservers, it needed no proof of its own, and its certificate followed by itself.
Her email, at her old host, didn't change.
Moving many sites
Today each site moves by hand, as above. Moving whole cPanel accounts for you isn't built yet.