WordPress Backup and Migration — UpdraftPlus and All-in-One WP Migration Guide
In this tutorial, you'll learn to back up and migrate WordPress sites using UpdraftPlus and All-in-One WP Migration, covering automated cloud backups, manual backup methods, domain migration, and complete restoration procedures.
What You'll Learn
- Why backups are critical — server failure, hacks, update breakage, and human error
- How to set up UpdraftPlus for automated scheduled backups
- What to include in backups: files and database
- How to configure backup destinations: Google Drive, Dropbox, Amazon S3, SFTP, and email
- How to restore your site from an UpdraftPlus backup
- How to use All-in-One WP Migration for full site export and import
- How to create a manual backup via phpMyAdmin (export SQL)
- How to create a manual backup via FTP (download wp-content/)
- How to migrate to a new domain including search and replace
- Why serialized data breaks during migration and how to handle it
- Migration plugins vs manual migration — pros and cons of each
- How to test backups with regular restore drills
- Backup frequency recommendations for different site types
Why It Matters
Every WordPress site will eventually need a backup. Servers fail. Hacks happen. Updates break things. Human error deletes content. Without a backup, any of these events means starting from scratch — losing months or years of content, SEO ranking, and customer trust. A proper backup strategy is not optional. It's like insurance: you hope you never need it, but when you do, you need it to work perfectly.
Real-World Use
You run a WooCommerce store with 2,000 products and 15,000 customer orders. During a routine plugin update, the site crashes with a white screen. The hosting provider says the latest snapshot is 3 days old — you'd lose 3 days of orders. But because you configured UpdraftPlus to back up to Google Drive every 6 hours, you restore a backup from 2 hours ago. You lose nothing. The backup paid for itself a hundred times over in that one moment.
Learning Path
flowchart LR
A[Security Plugins] --> B[Backup & Migration]
B --> C[Page Builders]
B --> D[Caching Plugins]
Why Backups Are Critical
Think of backups like a safety net for a tightrope walker. You walk the rope (run your site) hoping you never fall. But if you do fall, the net catches you. Without a net, one mistake destroys everything.
What Can Go Wrong
flowchart TD
A[What Can Destroy Your Site] --> B[Server Crash]
A --> C[Hacker Attack]
A --> D[Update Breakage]
A --> E[Human Error]
A --> F[Plugin Conflict]
B --> G[Hourly/Daily Backups
Restore in minutes]
C --> H[Pre-hack backups
Clean restore point]
D --> I[Pre-update backup
Roll back immediately]
E --> J[Deleted content?
Restore from backup]
F --> K[Deactivate problematic
plugin, restore data]
UpdraftPlus — Automated Backups
UpdraftPlus is the most popular free backup plugin with over 3 million active installations.
Initial Setup
- Install and activate UpdraftPlus.
- Go to Settings > UpdraftPlus.
- Configure the backup schedule.
// UpdraftPlus stores settings in WordPress options
// You can set schedule via the UI or programmatically
// Recommended schedule for active sites:
// Files: Daily
// Database: Daily
// Backup retention: 4 weekly, 4 monthly
What to Include in a Backup
A complete backup includes two parts:
Files:
- WordPress core (wp-admin, wp-includes)
- Themes (wp-content/themes/)
- Plugins (wp-content/plugins/)
- Uploads (wp-content/uploads/)
- Configuration files (wp-config.php, .htaccess)
Database:
- All posts, pages, and content
- User accounts and permissions
- Plugin settings and options
- Theme customization data
- Comments and metadata
// UpdraftPlus backup components:
// - wp-content/updraft/ contains backup files
// - Each backup creates one .zip for files
// - Each backup creates one .gz for database
// - Filename format: backup_2026-06-27-1234_MySite_XXXXXX.zip
Configuring Backup Destinations
UpdraftPlus can send backups to multiple cloud storage services.
Google Drive:
- Go to UpdraftPlus Settings > Remote Storage
- Choose Google Drive
- Click "Authenticate with Google"
- Follow the authorization flow
- Backups will now upload to Google Drive
Dropbox:
- Choose Dropbox as remote storage
- Authorize with Dropbox
- Backups appear in /Apps/UpdraftPlus/
Amazon S3:
// Requires: S3 bucket name, Access Key, Secret Key, Region
// Cost: ~$0.023 per GB per month (minimal)
// Best for: Enterprise sites, long-term retention
SFTP:
For self-hosted storage:
// Requires: SFTP host, username, password or key, path
// Best for: Sites with dedicated backup servers
Email:
// WARNING: Only for small backups (<10MB)
// Most email servers reject large attachments
// Database-only backups can work via email
// Never send full file backups via email
Multiple Destinations
Best practice: store backups in two locations. For example, Google Drive (primary) and Amazon S3 (secondary). If one service fails, the other has your backup.
Restoring from UpdraftPlus
Restoring is where backups prove their value.
Restoration Steps
- Go to Settings > UpdraftPlus > Existing Backups.
- You'll see a list of all backups.
- Click Restore on the backup you want to use.
- Select which components to restore (files, database, or both).
- Click Restore again.
- Wait for the process to complete.
// UpdraftPlus restoration process:
// 1. Downloads backup files from remote storage (if stored remotely)
// 2. Extracts the archives
// 3. Restores files to their original locations
// 4. Imports the database, replacing existing data
// 5. Runs post-restore cleanup
// 6. Reports success or error
Partial Restore
You don't always need to restore everything:
- Database only: If you accidentally deleted content but files are fine
- Files only: If a theme or plugin update broke the site
- Uploads only: If you lost media files but everything else works
All-in-One WP Migration
All-in-One WP Migration is the easiest tool for moving a WordPress site between domains or hosts.
Export Process
- Install and activate All-in-One WP Migration.
- Go to All-in-One WP Migration > Export.
- Choose export destination (File, Dropbox, Google Drive, etc.).
- Click Export To.
- Download the .wpress file.
// The .wpress file contains:
// - Complete database export
// - All media files from uploads
// - Plugin and theme files
// - WordPress core files (optional)
// - .htaccess and wp-config.php (optional)
// WARNING: File size limit is usually 2GB by default
// Can be increased with the unlimited extension
Import Process
- Install All-in-One WP Migration on the new site (clean WordPress installation).
- Go to All-in-One WP Migration > Import.
- Upload the .wpress file.
- Click Apply.
- The plugin replaces all data and files.
- Go to Settings > Permalinks and click Save Changes.
- Log in with your old credentials (URL may have changed).
What All-in-One WP Migration Handles
- Database search and replace (domain, file paths)
- Serialized data (more on this below)
- Media files, plugins, themes
- WordPress configuration
- User accounts and roles
Manual Backup via phpMyAdmin
When plugins aren't available (site is down), you need manual backups.
Exporting the Database
- Log into your hosting control panel (cPanel, Plesk).
- Open phpMyAdmin.
- Select your WordPress database.
- Click the Export tab.
- Choose Quick or Custom export.
- Select SQL format.
- Click Go.
-- phpMyAdmin exports the entire database as SQL statements
-- CREATE TABLE, INSERT INTO, etc.
-- To restore: Import this SQL file into a new database
-- Example of what the export contains:
-- INSERT INTO `wp_posts` (`ID`, `post_title`, `post_content`, ...) VALUES
-- (1, 'Hello World', 'Welcome to WordPress.', ...);
Custom Export Options
For more control:
- Disable foreign key checks: Add
SET FOREIGN_KEY_CHECKS=0;at the start - Add DROP TABLE: Drops tables before recreating (clean import)
- Compression: gzipped (.sql.gz) for smaller files
Manual Backup via FTP
For file backups when the admin dashboard is inaccessible.
Steps
- Connect to your server via FTP (FileZilla, CyberDuck).
- Navigate to the WordPress root directory.
- Download these critical folders:
# Critical folders to download:
wp-content/themes/ (Your active theme)
wp-content/plugins/ (All your plugins)
wp-content/uploads/ (Media files, typically largest)
# Optional but recommended:
wp-config.php (Configuration file)
.htaccess (Server configuration)
- Store the downloaded files in a secure off-server location.
- If the site is fully available, also backup the database via phpMyAdmin.
Migrating to a New Domain
Moving a WordPress site to a new domain involves more than copying files.
The Search and Replace Problem
WordPress stores the site URL in the database — not just in one place, but in many:
-- These are just a few places the domain appears:
-- wp_options: siteurl, home
-- wp_posts: post_content (links within content)
-- wp_postmeta: various meta values
-- wp_usermeta: user profile URLs
-- wp_comments: comment author URLs
Simply searching and replacing the URL works... until you hit serialized data.
Serialized Data
PHP serialized data stores the string length of each value. If you change a URL from oldsite.com (10 chars) to newsite.com (10 chars of different length), the string length is wrong:
// Before search and replace:
s:10:"oldsite.com"; // "s:10" means string of 10 characters
// After naive search and replace:
s:10:"newsitelong"; // WRONG! "newsitelong" is 11 chars, not 10
// PHP will fail to unserialize this data
Proper Migration Tools
Both UpdraftPlus and All-in-One WP Migration handle serialized data correctly. For manual migrations, use a search-and-replace tool that understands Serialization:
// The database search and replace function from WordPress core
// wp-config.php defines the old and new URLs:
define('WP_HOME', 'https://newsite.com');
define('WP_SITEURL', 'https://newsite.com');
// Or use the Search and Replace tool from InterconnectIT
// This tool correctly handles serialized data lengths
Migration Steps for a New Domain
- Back up the old site (files + database).
- Set up the new hosting and domain.
- Install WordPress fresh on the new server.
- Import the database into the new database.
- Upload files to the new server.
- Update wp-config.php with new database credentials.
- Run search and replace (olddomain.com to newdomain.com).
- Update permalinks: go to Settings > Permalinks, click Save.
- Test everything: pages, posts, forms, login, links.
Migration Plugins vs Manual Migration
| Factor | Migration Plugin | Manual Migration |
|---|---|---|
| Ease of use | A few clicks | Many steps, technical skill required |
| Serialized data | Handled automatically | Must use special tool |
| File size limits | Some plugins have 2GB limit | No limit (FTP everything) |
| Downtime | Minimal | Longer during file transfer |
| Control | Less control over each step | Full control over process |
| Required for | Beginners, frequent migrations | Developers, large sites |
Testing Backups
A backup you never test is a backup that might not work.
The Monthly Restore Drill
- Set up a staging environment or a clean WordPress installation.
- Restore your most recent backup there.
- Verify: can you log in? Are all pages there? Do forms work? Is everything styled correctly?
- Check: is the database complete? Are recent comments and orders present?
- Fix any issues you find in the backup process.
// Track your backup tests
// Create a simple log in wp-config.php or a separate file:
// 2026-06-27: Full restore test passed (2.3 min, all data intact)
// 2026-06-20: Full restore test passed (2.1 min, 3 images missing - fixed upload path)
What to Check During a Restore Test
- Admin login works
- All pages load without errors
- Forms submit correctly
- Links point to the correct domain
- Media files display
- Plugin settings are preserved
- User accounts are intact
- Comments are present
- Custom post types (products, courses) are there
Backup Frequency Recommendations
Different sites need different backup frequencies:
| Site Type | Database | Files | Recommendation |
|---|---|---|---|
| Personal blog | Weekly | Weekly | Keep 4 backups |
| Business site | Daily | Weekly | Keep 7 daily, 4 weekly |
| E-commerce store | Every 6 hours | Weekly | Keep 7 daily, 4 weekly, 12 monthly |
| Membership site | Every 6 hours | Weekly | Keep daily for 14 days |
| High-traffic news | Hourly | Weekly | Keep 24 hourly, 7 daily |
| Client sites | Daily | Weekly | Keep 14 daily backups |
Common Mistakes
Never testing backups. The most common backup mistake. You set up automated backups and assume they work. Six months later, you need to restore and discover the backup is corrupted or incomplete. Test every backup immediately after creation, then monthly.
Storing backups on the same server as your site. If the server crashes, you lose both the site and the backups. Always store backups off-server: Google Drive, Dropbox, Amazon S3, or a different hosting provider. On-server backups are not real backups.
Only backing up files or only backing up the database. A complete restore needs both. Files without the database gives you a theme and plugins but no content. Database without files gives you content but no design or media. Always back up both.
Using search and replace without serialization handling. If you migrate manually and do a simple find-and-replace in the database, you'll corrupt serialized data. Use a proper search-and-replace tool that checks and updates serialized string lengths.
Forgetting to update URLs after migration. After migrating to a new domain, the old URLs remain in the database. Links within your content, menus, widgets, and theme settings all point to the old domain. Without search and replace, your migrated site is broken.
Practice Questions
Why should you store backups in two different locations? Give an example of a scenario where a single backup destination fails.
What is serialized data and why does it break during a naive search-and-replace migration? How do migration plugins handle this correctly?
A client's e-commerce site was hacked. You have a backup from 3 days ago. Walk through the restore process step by step. What additional steps would you take after restoring?
Challenge: On a staging WordPress site, install UpdraftPlus, configure daily backups to Google Drive, and manually trigger a backup. Then, create a completely fresh WordPress installation on a subdomain. Use UpdraftPlus to restore the backup to the new installation. Document every step, including any errors encountered. Verify that all content, settings, and users migrated correctly.
FAQ
Mini Project
Build a complete backup and disaster recovery plan.
- Install UpdraftPlus and configure: daily database + files backup, store on Google Drive, keep 7 daily backups.
- Create a manual database backup via phpMyAdmin and save it to your local computer.
- Download your wp-content/uploads/ folder via FTP as an additional backup.
- Create a new subdomain (or local installation) and restore the UpdraftPlus backup there.
- Verify the restored site: log in, check pages, test forms, confirm media loads.
- Create a step-by-step disaster recovery document with instructions for:
- Restoring from UpdraftPlus (when admin dashboard is accessible)
- Restoring manually via FTP + phpMyAdmin (when dashboard is down)
- Who to contact, where passwords are stored, how long recovery should take
What's Next
Now that your data is safe, learn to build custom layouts with page builders:
Continue to Lesson 32: Page Builders — Design custom layouts with Elementor, Beaver Builder, and Divi.
Related lessons:
- Security Plugins — Protect your backups from unauthorized access
- Essential Plugins — The backup plugin's place in your stack
- PHP Basics — Understand WP CLI for command-line backup automation
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro