Migrate a cPanel mailbox to Gmail
Leaving shared-hosting webmail for Gmail is a common move, so this guide walks you through copying one cPanel IMAP mailbox with MailMigrata. Your cPanel folders become Gmail labels after the copy, so the structure you already know survives the migration intact. The hosting mailbox stays in place unless you later choose to delete it, which means the job never removes anything from your server.
What You’ll Learn
- You will learn where to find the real IMAP hostname rather than the webmail address shown in the browser.
- The next part explains how cPanel folders map onto Gmail labels once the copy finishes, so nothing loses its place.
- You also learn how to connect both sides and then run the whole job to completion.
- The guide notes what does not come across, including other accounts and forwarders that sit outside IMAP.
- Finally, this page covers fixes for login failures and timeouts, because either one can stop a migration early.
What you need
- You need the mailbox password from cPanel → Email Accounts, not the cPanel or WHM login, because a panel login does not open a mailbox.
- Find the IMAP hostname under Email Accounts → Connect Devices → Mail Client Manual Settings, which is often
mail.yourdomain.comor the server hostname. - Never paste the
:2096webmail URL into the host field, because the migration needs the real IMAP server address. - Prepare a Gmail address with IMAP turned on, so you will need an app password or Connect with Google.
MailMigrata copies one mailbox at a time, so a catch-all or “Default address” that only forwards is not a real mailbox to copy.
How folders map
Your Inbox goes straight to Gmail Inbox during the copy, so the most important mail arrives in the right place. Custom folders become Gmail labels, which means your existing organisation survives the move intact and stays easy to find. Skip All Mail on the Gmail side, because selecting it as well would duplicate every single message that you copy.
Other cPanel accounts under the same hosting plan are separate jobs, so plan one migration for each mailbox you own. Forwarders and filters do not travel with IMAP, which means you must recreate any you still need in Gmail after the copy.
Connect and migrate
- Connect the hosting mailbox using Connect cPanel / WHM mailbox IMAP, where the username is usually the full email address.
- Connect Gmail by following the Connect Gmail guide, because Gmail needs its own sign in before the copy can start.
- In MailMigrata, you can start a new migration, validate both sides, and pick the folders you want, because validation catches bad credentials early.
- Optionally apply a date range to that run, so only the messages inside that chosen window are copied across.
- Start the job, and you can keep using mail during the copy because MailMigrata supports zero downtime migrations by design.
- If you are keeping the same address, copy first and then point MX at Google, which is the safe order for same domain transfers.
Do not start a second job onto the same Gmail labels unless you want duplicates, so resume the first job instead.
Common problems
A LOGIN failure on cPanel usually means the mailbox password is wrong, so reset it before you try again. Then reset the password in Email Accounts rather than the cPanel user password, and paste the new value into MailMigrata.
The connection times out because the hostname is wrong, which usually means that :2096 or a webmail URL was used. Copy the Incoming Server from Connect Devices instead, which uses port 993 with SSL and therefore reaches the IMAP service directly.
When you want to keep the domain, change the MX records so new mail arrives at Google. Do this only after mail is safely in Gmail and you have checked a few folders, because the copy itself does not change DNS.
Wrap-up
Spot-check your Inbox and one custom folder on the Gmail side, because a quick manual check confirms that everything landed as expected. Only that mailbox’s IMAP folders arrive in Gmail during the job, so verify each folder individually before you rely on it. For more pairs beyond this mailbox, see common mailbox migrations and email migration made simple.