Back up and restore your website
A backup is your site's safety net: after a bad edit, failed update or hack, you can be back to a working version in minutes.
Manual backup
- Log in to cPanel and open Backup.
- Files: click Home Directory to download a copy.
- Databases: click each database name under MySQL Databases.
- Store the copies on your computer or cloud storage.
Two-command backup (over SSH)
If SSH is enabled on your plan, these two commands back up the files and database with today's date:
# Files: compress public_html into a dated archive
tar -czf site-$(date +%F).tar.gz public_html
# Database: export to a dated .sql file (you will be asked for the password)
mysqldump -u account_dbuser -p account_dbname > db-$(date +%F).sql

Restore
Use the Restore section on the same page to upload a files or database backup. If your plan includes automatic backups, cPanel may offer point-in-time restore, or open a ticket to request one.
Best practices
- Back up before any major update or redesign.
- Always keep an off-server copy (3-2-1 rule: three copies, two media, one off-site).
- Test a restore now and then to make sure backups work.
Was this article helpful?