Backup & Restore

45-90 minIntermediate

A complete WordPress backup requires TWO components: website files and the MySQL database. Unlike static HTML sites, WordPress pages are generated dynamically from both. This guide covers manual backup methods (FTP, cPanel, phpMyAdmin), automated solutions (WP-DBManager, UpdraftPlus), and complete restoration procedures.

Prerequisites

  • FTP/SFTP credentials or cPanel access
  • phpMyAdmin access for database operations
  • Sufficient local storage for backup files

Step-by-Step Guide

1

Understand What Must Be Backed Up

1

A WordPress site has two critical components:

2

WEBSITE FILES: Located on server, accessed via FTP or cPanel File Manager

3

MYSQL DATABASE: Accessed via phpMyAdmin, stores all content and settings

4

BOTH are required for a complete, restorable backup

5

Files without database = empty site structure

6

Database without files = no themes, plugins, or media

Backing up only one component results in a non-restorable site
2

Identify Essential Files for Backup

1

/wp-content/ folder (HIGHEST PRIORITY): Contains uploads, plugins, themes

2

wp-config.php (CRITICAL): Database credentials, security keys, cannot be regenerated

3

.htaccess (ESSENTIAL): Permalink rules, redirects, security rules

4

WordPress core files (/wp-admin/, /wp-includes/) can be re-downloaded and are optional

5

The wp-content folder contains everything unique to YOUR site

3

Manual File Backup via FTP (FileZilla)

1

Connect to your web host using FTP client (FileZilla)

2

Create a local folder: Website Backups > [site-name] > [date]

3

Navigate to WordPress root directory (usually public_html)

4

Download: .htaccess, wp-config.php, and entire wp-content folder

5

Verify all files exist locally before proceeding

This method offers maximum transparency and control
4

Manual File Backup via cPanel

1

Log in to cPanel > File Manager

2

Navigate to WordPress installation directory

3

Right-click wp-content > Compress > Create zip archive

4

Select and download: .htaccess, wp-config.php, wp-content.zip

5

Important: Downloaded .htaccess may be renamed to "htaccess" - fix during restore

5

Database Backup via phpMyAdmin

1

Log in to cPanel > phpMyAdmin

2

Identify correct database (check DB_NAME in wp-config.php)

3

Click the database name in the left panel

4

Click Export tab > Quick export method > Format: SQL

5

Click Go to download the .sql file

6

Store in your backup folder alongside the files

Example
// To find your database name, check wp-config.php for:
define( 'DB_NAME', 'your_database_name' );
6

Set Up Automated Database Backups (WP-DBManager)

1

Install plugin: WP-DBManager by Lester Chan

2

Go to Database > DB Options

3

Configure backup schedule (weekly recommended)

4

Enable email delivery of backups

5

Database backups are small (2-10MB) and easy to store

6

This is your safety net even if nothing else is backed up

Database-only backups do not include media files
7

Set Up Full Automated Backups (UpdraftPlus)

1

Install plugin: UpdraftPlus (free version)

2

Go to Settings > UpdraftPlus Backups

3

Click "Backup Now" for immediate backup

4

Configure remote storage: Dropbox, Google Drive, etc.

5

Set schedule matching your update frequency

6

Note: wp-config.php is NOT included - backup manually once

8

Restore Files via FTP

1

Connect to server via FTP

2

Navigate to WordPress root directory

3

Upload backup files: wp-content, .htaccess, wp-config.php

4

Choose Overwrite when prompted

5

After restore: plugins may appear but be inactive (normal)

6

Media Library will be empty until database is restored

File restore without database restore = partially working site
9

Restore Database via phpMyAdmin

1

Log in to cPanel > phpMyAdmin

2

Select the correct database

3

Click "Check all" to select all tables

4

From dropdown, choose "Empty" to clear existing data

5

Click Import tab > Choose File > select your .sql backup

6

Click Go and wait for success message

7

Site should now be fully restored to backup state

Restoring database also restores old usernames and passwords

Verification Checklist

  • Backup includes: wp-content, wp-config.php, .htaccess, and .sql database
  • Backup files are stored in multiple locations (local + cloud)
  • Automated backups are scheduled and running
  • Test restore on staging site to verify backup integrity
  • Media Library and plugins fully functional after restore

Pro Tips

  • Follow the 3-2-1 rule: 3 copies, 2 different media, 1 offsite
  • Match backup frequency to update frequency: daily updates = daily backups
  • Keep backups for at least 3 months
  • Use WP-DBManager for emailed database backups + UpdraftPlus for full cloud backups
  • Test your restore process before you actually need it
  • WordPress reinstall + restore is the nuclear option for infected sites

Common Issues & Fixes

Problem: .htaccess file missing or renamed after cPanel download
Solution: Rename "htaccess" back to ".htaccess" before uploading during restore
Problem: Plugins inactive after file restore
Solution: This is normal. Plugin activation states are in the database. Restore database to fix.
Problem: Media Library empty but images show on pages
Solution: Files exist in /uploads/ but database records are missing. Restore database.
Problem: Cannot log in after database restore
Solution: The restored database has old credentials. Use the username/password from when backup was made.