cPanel is a Linux-based web hosting dashboard website owners can, among many things, use to send and receive e-mails. The software provides direct access to the webmail server. Plus, they get to use any domain name they own as a portion of the e-mail address. This makes them look professional, knowledgeable, and trustworthy. But as with any online service, a brief lapse in attention can have serious consequences, and erased e-mail correspondence is one of several. Luckily, the software developers considered this, and we’ll show you how to recover deleted emails from cPanel. Let’s dive in.
1. Recover deleted emails from cPanel Trash
Trash or Junk is a feature we’ve all gotten accustomed to. Its application makes it a primary candidate for implementation into web or software applications and cPanel is no different. It represents the first line of defense: instead of getting permanently deleted, data remains available for a period, commonly 30 days. With that said, you can look for the Trash folder in two places:
1. Third-party webmail software
cPanel comes pre-installed with two free open-source webmail software – Roundcube and Horde, which you’ll find as options in the “Email” section. We went over this procedure when we taught you to recover removed emails on Roundcube, under the headline “Check the Trash folder”. The steps are very similar to Horde. There’s also a chance that your web hosting provider uses proprietary webmail software or has licensed someone else’s. In that case, you must do a bit of research on your own.
2. File Manager
The problem with the sub-method above is that e-mails must be erased within the webmail software to appear in its Trash. But what if you accidentally deleted a folder containing the emails or suffered data loss unbeknownst to you? In that case, do the following to recover deleted cPanel emails:
- Open File Manager under “Files”.
- Click on your home folder in the left sidebar.
- Click on View Trash in the toolbar at the top.
- You’ll see a list of files. Highlight them, then click on Restore in the top menu.
- Note. It’s unlikely that all files are emails. Therefore, make sure each file you select has “mail” written in the “Type” column.
- On the pop-up window, click the Restore File(s) button.
- They’ll be back to the original folder (check file path below), but most importantly, reappear in the webmail software.
Note. If you put a checkmark in front of “Skip the trash and permanently delete the files” when erasing emails, this method won’t work.
2. Restore erased emails from a cPanel backup
Web hosting providers usually keep regular backups. However, they are habitually limited to crucial but lightweight files whereas full website backups are created infrequently, if at all. That’s why they recommend users keep backups of their own: whether the whole website or some folders. In both instances, backups are downloaded as “.zip”, or “.tar.gz” files to reduce their file size through compression. With that, let’s jump straight into 3 methods to recover erased emails using a cPanel backup:
1. Default backup
The explanation above was meant to jog your memory about whether you created a backup and if it included mail data. If the answer is yes to both, do this:
- Open cPanel File Manager and create a new folder anywhere.
- Click on Upload in the top menu, select the archive, and when it uploads, highlight it and click on Extract in the top menu.
- The extracted file contains multiple folders. Navigate to this location within the folder you created:
- Now, depending on what you want to restore, highlight the following:
- All folders inside “your-domain-name.com” to get email data for all accounts.
- The folder with your “email username”, i.e., firstname.lastname@example.org to get emails for one account.
- Click on Move in the top menu.
- Now go to the actual file path we mentioned in step 3, not inside the extracted folder.
- Move the files there, and check whether emails regenerated in webmail software.
Webmail doesn’t recognize emails. What do I do?
If your webmail software fails to load data, it likely doesn’t recognize email account(s). Here’s how to solve this quickly:
- Rename the folder that exists after step 7 from username to username-old.
- In cPanel, click on Email Accounts under “Email”.
- Click on Add Email Account.
- Finish setting up, making sure to use username. Follow step 6 again.
- Copy or move the contents of username-old to a newly created (and empty) username folder.
Many web hosting services utilize JetBackup, a cPanel-compatible disaster recovery software. Besides emails, it automatically stores accounts, cron jobs, files, DNS zones, databases, SSL certificates, snapshots, and more, usually going back 7 to 30 days. Therefore, you can do the following to retrieve email data:
- Find the JetBackup tab in cPanel.
- Click on E-Mail Backups.
- You’ll see a list of e-mail accounts on your webserver.
- Tip. The accounts will repeat because every backup is a separate “entity” on the list, which is sorted by date from the newest to the oldest.
- Once you find the fitting one, click on Restore under “Actions”.
- Log in to your cPanel webmail software to see if the emails are back.
If your hosting provider uses a cPanel-based software named R1Soft Backups (also known as ConnectWise) to create automatic backups, do this:
- Click on R1Soft Restore Backups or ConnectWise Restore Backups under Files.
- Click the folder icon next to the restore point that matches the closest date.
- You must now choose which folder to restore go to the file path in sub-method 1.
- Like in sub-method 1, put a checkmark in front of:
- “your-domain-name.com” folder to restore emails for all accounts.
- “email username” folder inside the one above for one email account only.
- Click on Restore Selected, then on the pop-up, the Restore button.
- You’ll see a success message if everything went according to plan.
3. Contact your web hosting provider
This one is straightforward. Get in touch with your web hosting Customer Service via e-mail, messaging app, ticket, webchat, or contact form, and describe your situation. The representative can check whether company backups exist, and how old and exhaustive they are. They may even perform the cPanel email data recovery procedure in your stead.