Taking Your Own Backup in cPanel: Files, Database and Email
On our plans, accounts are backed up automatically twice a week. Still, no backup replaces a copy you hold yourself. Before a major update, a redesign or a move to another host, taking your own backup takes only a few minutes.
What does a website backup include?
- Files:
public_htmland any addon domain folders. Images, themes and plugins live here. - Database: posts, settings, users and orders for applications like WordPress.
- Email: messages in your mailboxes and settings such as forwarders and filters.
Backing up only the files is as incomplete as backing up only the database. A site can't be restored without both.
Method 1: the cPanel Backup tool
If Files › Backup is enabled on your account, you can download the whole home directory as one file, or databases separately. Partial backups (just the home directory or a single database) are faster to create and easier to restore.
Method 2: File Manager and phpMyAdmin
- Open File Manager, select the
public_htmlfolder and use Compress to create a.ziparchive. - Download the archive to your computer, then delete it from the server. Archives left on the server are a risk for disk space and security.
- Open phpMyAdmin, select your site's database and download it in SQL format from the Export tab.
If you don't know which database your site uses, check the DB_NAME line in wp-config.php for WordPress.
Where to keep backups
A backup is only useful if it lives somewhere other than the server. Keeping a second copy in a cloud storage service or on an external drive, in addition to your computer, is a good habit. Database backups can contain customer data, so don't leave these files exposed in shared folders.
Taking a backup isn't enough; test it
A corrupt or incomplete backup is as good as none when you need it. Try opening your backup in a test environment now and then. Our guide to testing a backup by restoring it explains how.
When you should always back up
- Before WordPress, theme or plugin updates. See the safe update guide.
- Before changing the PHP version. See the PHP version checklist.
- Before moving the site to another host. See the rollback plan.
评论0
暂无评论
成为第一个分享想法的人。
请登录或注册后发表评论。