Database Restore
15-45 minIntermediate
Restore a WordPress database from a backup file using phpMyAdmin, WP-CLI, or hosting tools. This guide covers safe restoration procedures and post-restore verification.
Prerequisites
- A valid .sql backup file
- Access to phpMyAdmin, hosting panel, or WP-CLI
- Backup of current database (before overwriting)
Intermediate
phpMyAdmin Restore
Upload and import via phpMyAdmin.
1
Access phpMyAdmin
1
Log into your hosting control panel (cPanel, Plesk, etc.)
2
Navigate to Databases > phpMyAdmin
3
Select your WordPress database from the left sidebar
2
Drop Existing Tables (Optional)
1
If doing a full restore, select all tables using 'Check All'
2
From the dropdown, select 'Drop' to delete existing tables
3
Confirm the action
3
Import Backup
1
Click the 'Import' tab at the top
2
Click 'Choose File' and select your .sql backup
3
Leave default settings (SQL format, utf8mb4)
4
Click 'Go' to start import
4
Verify
1
Check that all tables are present in the left sidebar
2
Test your site frontend and wp-admin
Verification Checklist
Pro Tips
- Always backup the current database before restoring an older one
- If restoring to a different domain, run search-replace: `wp search-replace 'old-domain.com' 'new-domain.com'`
- Large imports may timeout in phpMyAdmin - use WP-CLI for databases over 50MB
Common Issues & Fixes
Problem:
Solution: Use WP-CLI or split the SQL file into smaller chunks
Problem:
Solution: Ensure wp-config.php $table_prefix matches the backup's prefix
Problem:
Solution: Ensure both backup and database use utf8mb4 collation