How to back up your website and restore it in an emergency
10 min read · 06-Feb-2026
villagehosting.in team
6 February 2026
Everyone knows they should back up. Almost nobody tests their restore. This guide walks through both — so you are never caught without a working backup.
A backup on the same server is not a backup
If your hosting account is suspended, hacked, or the server suffers hardware failure, backups stored on the same server are inaccessible or compromised too. Your backups must be stored somewhere independent: a separate cloud storage account, a different hosting provider, or a local drive. This is the single most important backup principle.
Why most backups fail when you need them
The backup ran. The file is there. But the restore fails because:
- The backup file is corrupted (common with large files on slow connections)
- The database dump is missing a table
- File permissions were not preserved
- The backup is 3 weeks old because the cron job silently stopped
A backup you have never tested is not a backup. It is a hope.
Three types of backup you need
1. cPanel account backup (everything)
This backs up the entire cPanel account — files, databases, email accounts, cPanel settings, DNS zones.
How to take a manual backup:
- Log into cPanel → Backup Wizard
- Click "Back Up" → "Full Backup"
- Set destination to "Home Directory"
- Enter your email, click Generate Backup
- Download the .tar.gz file to your local machine when the email arrives
Do this at least once a month, and always before major changes.
2. Database-only backup
Your WordPress database changes constantly. A full account backup taken weekly leaves you with up to 7 days of post data, orders, and comments at risk.
How to back up your database:
- cPanel → phpMyAdmin
- Select your database
- Click Export → Quick → SQL → Go
- Save the .sql file
Do this daily for active sites.
3. Files-only backup (public_html)
Faster than a full backup. Useful before plugin updates or theme changes.
- cPanel → File Manager → public_html
- Select all → Compress → Zip archive
- Download the zip
Automated daily backups
Manual backups are a safety net. Automated backups are the system.
Using JetBackup (if your host provides it)
Most cPanel hosts include JetBackup or a similar tool:
- cPanel → JetBackup
- Check the backup schedule (look for "Daily Backups")
- Verify the retention period (7 days minimum, 30 days preferred)
- Check the destination — it must be off-server (a different storage location, not the same disk)
Critical: An on-server backup does not protect you from disk failure.
Using VillageHosting automated backups
Every VillageHosting plan includes daily automated backups stored off-server:
- Log into your portal → Services → your service → Backups
- You will see a list of restore points with dates
- Each restore point includes files, databases, and email data
You can restore with one click from the portal.
Testing your restore (the part everyone skips)
A restore test once every 3 months takes 30 minutes and saves days of panic.
How to test on a staging subdomain
- Create a subdomain:
staging.yourdomain.comin cPanel → Subdomains - Create a new database: cPanel → MySQL Databases
- From your backup, extract the database dump and import it to the new database
- Copy your files to the staging directory
- Edit
wp-config.phpto point to the new database - Visit
staging.yourdomain.comand confirm the site loads
If the staging site loads correctly, your backup is good.
What to do when something goes wrong
If your site is hacked or corrupted
- Do not delete anything immediately — document what you see
- Check your cPanel error logs (Logs → Error Log) for clues
- Go to your backup tool and find the most recent clean restore point
- Before restoring, take a current backup (even of the broken state — useful for forensics)
- Restore from the clean point
- After restoring, change all passwords and investigate the cause before going live
If your database is corrupted
Signs: WordPress shows "Error establishing a database connection"
- Try phpMyAdmin → select the database → Operations → "Repair database"
- If repair fails, restore the last good database backup
- Use wp-content/uploads and your theme files from the current site + the restored database
If you accidentally deleted a file
- If you have JetBackup: Home Directory → Restore → select the file from the date before deletion
- If you have VillageHosting backups: portal → Backups → partial restore → select the specific file
If the file was deleted more than your retention window ago — this is why off-site backups matter.
Off-site backup: the last line of defence
Your host's backups can disappear with the host. A catastrophic data centre incident, a billing dispute that locks your account, or a provider shutdown can leave you with nothing.
Keep a monthly backup on Google Drive, Dropbox, or an external hard drive. Not as your primary backup — as your disaster backup.
How:
- Take a full cPanel backup → download it to your computer
- Upload to Google Drive
- Keep 3 months of archives
It takes 20 minutes. It has saved businesses.
Backup checklist
- Automated daily backup enabled with off-server storage
- Retention: at least 7 days (30 days preferred)
- Manual full backup taken before every major change
- Restore test completed in the last 90 days
- Monthly backup downloaded and stored off-site
- All admin passwords changed after any security incident
If you are on VillageHosting, your automated backups are already running. Log into your portal to confirm the schedule and test a restore.