UnderHost
Knowledgebase Docs

WordPress backup and restore-complete guide

How to backup WordPress files and database. Automated backup plugins, manual backups, full restoration, testing backups, and disaster recovery.

On this page

A complete backup of your WordPress site is your insurance policy against data loss, hacking, corruption, or accidental deletion. You should have automated backups running daily or at least weekly. Without backups, recovery from a hack or server failure is difficult or impossible.

Why WordPress backups are critical

Backups protect you from:

  • Hacking and malware - If your site is compromised, restore from a clean backup
  • Accidental deletion - Deleted a post, page, or theme file? Restore it
  • Plugin conflicts - A broken plugin crashes your site? Restore to the last working state
  • Database corruption - WordPress or MySQL errors corrupt your database? Restore from backup
  • Server failure - Your host loses your data? You have a copy
  • Failed upgrades - A WordPress or plugin update breaks your site? Roll back to the previous backup

You should have backups before:

  • Updating WordPress core
  • Updating or installing plugins
  • Changing themes
  • Making custom code changes
  • Testing new functionality

Types of backups: Files, database, full

Files Backup

Backs up everything in your public_html folder: WordPress core, plugins, themes, media uploads, and .htaccess.

  • What it includes: /wp-content, /wp-includes, wp-config.php, all theme files
  • What it doesn't include: Your database content (posts, pages, settings)
  • Size: 100MB - 10GB typically
  • Time to restore: 5-30 minutes via FTP or File Manager

Database Backup

Backs up your MySQL or MariaDB database containing all posts, pages, comments, settings, and user accounts.

  • What it includes: All WordPress content and configuration
  • What it doesn't include: Uploaded media files (those are in the files backup)
  • Size: 10MB - 500MB typically
  • Time to restore: 2-10 minutes via phpMyAdmin

Full Backup (Best option)

Backs up both files AND database. This is a complete copy of your entire WordPress installation.

  • What it includes: Everything (files + database)
  • Allows: Complete restoration or to another server
  • Size: Sum of files + database (usually 150MB - 15GB)
  • Recommended frequency: Daily or before major changes

Automated backup plugins (recommended)

Automated backup plugins handle backups daily on a schedule. You set it once and backups happen automatically. This is the easiest and most reliable approach.

PluginBest ForCostBackup Frequency
UpdraftPlus Easy setup, cloud storage support Free / Premium Daily / Hourly
BackWPup Free, self-hosted, lots of options Free Daily / Custom
Duplicator Site and backup Free / Premium Manual / Scheduled
All-in-One WP Migration Simple backup and Free / Premium Manual / Scheduled
cPanel Backups Server-level backups (if available on your plan) Included with hosting Daily (server-managed)

Setting up UpdraftPlus (easiest option)

  1. From WordPress dashboard, go to Plugins → Add New
  2. Search for UpdraftPlus and install it
  3. Go to UpdraftPlus → Settings
  4. Choose backup frequency: Database (daily), Files (weekly)
  5. Choose where to store backups:
    • Dropbox (recommended for shared hosting - free 2GB)
    • Google Drive (free, integrated into Gmail)
    • Amazon S3 (cheap cloud storage)
    • Email (receives backup files via email)
  6. Click Save Changes
  7. Click Backup Now to test immediately
  8. Verify that the backup was stored in your cloud storage
Pro tip: Store backups off-site

Always store at least one backup outside your hosting account. If your server fails or is hacked, backups stored on the same server might also be compromised. Use Dropbox, Google Drive, or Amazon S3.

Manual backup via cPanel

If you prefer to manage backups manually, you can backup through cPanel:

Backup via cPanel Backup Wizard

  1. Log in to CustomerPanel
  2. Go to Services → My Services → Your Hosting Plan
  3. Click Manage
  4. Look for cPanel and log in
  5. Go to Files → Backup
  6. Select Home Directory Backup (backs up everything)
  7. Click Generate Backup
  8. The backup is created and stored on the server (download it or store it)
  9. Download the backup file to your computer and save it in a safe location

Backup database only via phpMyAdmin

  1. In cPanel, go to Databases → phpMyAdmin
  2. Click your WordPress database name in the left sidebar
  3. Click the Export tab
  4. Choose Quick export type
  5. Click Go (saves a .sql file)
  6. Save the SQL file to your computer

How to restore from a backup

Restore using UpdraftPlus

  1. Go to UpdraftPlus → Backups
  2. Find the backup you want to restore from
  3. Click the Restore button next to it
  4. Select what to restore: Database and/or Files
  5. Click Restore
  6. UpdraftPlus will restore your site (takes 5-15 minutes)
  7. You'll be logged out; log back in and verify everything is restored

Restore files via FTP or File Manager

If you have a backup of your files:

  1. Download the backup to your computer
  2. Connect to your server via FTP or SFTP (or use cPanel File Manager)
  3. Delete the corrupted or hacked files
  4. Upload the clean files from your backup
  5. Test your site to ensure it's working

Restore database via phpMyAdmin

  1. In cPanel, go to Databases → phpMyAdmin
  2. Click your WordPress database
  3. Click the Import tab
  4. Click Choose File and select your SQL backup file
  5. Click Import
  6. phpMyAdmin will restore the database (takes 1-5 minutes)
  7. Visit your website to verify the restoration was successful

Testing your backups

A backup is only good if it actually works. You should test your backups at least quarterly:

  • Every quarter (3 months): Restore a backup to a test subdomain and verify all content is there
  • Verify file integrity: Check that all plugins and themes are present
  • Test the database: Verify posts, pages, and user accounts are intact
  • Check images: Ensure all media uploads are present
  • Test functionality: Click through your site, submit forms, log in

If you're restoring after a live incident, test on a staging/test domain first before restoring to production.

Backup schedule and retention

Recommended backup schedule:

  • Database: Daily backups (stores posts, pages, settings)
  • Files: Weekly backups (stores plugins, themes, uploads)
  • Before major changes: Manual backup before WordPress updates, plugin updates, theme changes

Retention policy (how long to keep backups):

  • Keep the last 4 weeks of daily backups (older ones auto-delete)
  • Keep at least 2-3 monthly backups (for disaster recovery)
  • Keep yearly backups archived indefinitely (for compliance or historical reasons)

Where to store backups

Best practices for backup storage:

  • Primary location: Cloud storage (Dropbox, Google Drive, Amazon S3)
  • Secondary location: Your computer (for critical backups)
  • Never store only on: The same server your site runs on (if the server fails, your backups are lost too)
  • Encrypt sensitive backups: If backups contain customer data, encrypt them before uploading

Troubleshooting restore issues

Site shows blank page or 500 error after restore

Cause: WordPress files were restored but database wasn't (or vice versa).

Solution: Verify both files and database were restored. Check that wp-config.php has the correct database name, username, and password.

Backup is too large to restore via web interface

Cause: Large backups (5GB+) timeout via browser upload.

Solution: Use FTP to upload the backup file directly to the server, then restore via phpMyAdmin or command line. Contact support for assistance.

Backup file is corrupted or won't import

Cause: The backup file was damaged during download or transfer.

Solution: Try a different backup. Verify the file size matches what's shown in phpMyAdmin. If all backups are corrupted, contact UnderHost support.

I can't find my backups in my cloud storage account

Cause: The backup plugin never successfully authenticated with your cloud storage.

Solution: In UpdraftPlus settings, disconnect and re-authorize your Dropbox/Google Drive account. Test with "Backup Now" immediately after.

Backup before major changes

Always backup before updating WordPress core, plugins, or themes. Automated backups are good for ongoing protection, but manual pre-update backups give you an easy rollback point if something breaks.

Next steps: Set up automated backups today using UpdraftPlus or BackWPup, then test the restore process to make sure it works when you need it.

Related: Backup strategy | WordPress troubleshooting-common issues and fixes | Backup and restore in cPanel | Website migration guide

Was this article helpful?

Need managed WordPress hosting?

Run WordPress on UnderHost managed hosting with performance tuning, SSL, backups, security guidance, and expert support.

Related articles

Back to WordPress