How to Restore a WordPress Backup
A WordPress backup is one of the most important safety measures for a website. It allows you to recover your website when something goes wrong, such as a failed update, accidental deletion, hacking, database problems, or server failure.
Restoring a backup means replacing the current website files and/or database with a previously saved version. The exact restoration process depends on how the backup was created and where it is stored.
In this guide, you will learn how to restore a WordPress backup using a hosting backup system, a WordPress backup plugin, or manual methods.
What Is a WordPress Backup?
A complete WordPress backup normally contains two major components:
1. WordPress Files
These include:
- WordPress core files
- Themes
- Plugins
- Media uploads
wp-config.php- Custom files
- Other website configuration files
The wp-content directory is particularly important because it contains your themes, plugins, and uploaded media.
2. WordPress Database
The database stores much of your website’s dynamic content, including:
- Posts
- Pages
- Comments
- Users
- Categories
- Tags
- Plugin settings
- Theme settings
- WooCommerce data
- Website configuration
A database-only backup cannot normally restore missing images, plugins, or themes. For a complete recovery, you generally need both the files and database.
When Should You Restore a WordPress Backup?
You may need to restore a backup when:
- A WordPress update breaks the website
- A plugin causes a fatal error
- A theme update damages the layout
- Important files are accidentally deleted
- The website has been hacked
- The database becomes corrupted
- A migration fails
- The server experiences a serious problem
- Website content is accidentally removed
- A configuration change makes the site inaccessible
If the problem occurred recently, restoring a backup from before the problem happened can often return the website to an earlier working state.
Before Restoring a WordPress Backup
Restoring a backup can overwrite existing website data. Before starting, take a few precautions.
1. Identify the Correct Backup
Choose a backup created before the problem occurred.
For example:
Website working correctly: September 20
Website problem discovered: September 24
A backup from September 19 or September 20 may be more appropriate than a backup created after the problem appeared.
2. Create a Backup of the Current Website
If the website is still accessible, create a backup of the current state before restoring an older version.
This gives you a way to recover recent content if necessary.
3. Check What the Backup Contains
Determine whether your backup contains:
- Website files
- Database
- Both files and database
- Only selected directories
- Only selected database tables
4. Consider Recent Data
Restoring an older database can remove information created after the backup date.
For example, you could lose:
- New blog posts
- New comments
- New user accounts
- WooCommerce orders
- Form submissions
- Customer information
Make sure important recent data is preserved before performing a full restore.
5. Check Your Hosting Environment
If you are restoring to a different server, verify:
- PHP version compatibility
- Database availability
- Database credentials
- Domain configuration
- SSL certificate
- Required PHP extensions
- Website document root
Method 1: Restore WordPress Using Your Hosting Backup System
Many hosting providers offer backup and restore functionality through their hosting control panel.
The exact interface varies between hosting providers and control panels.
Step 1: Log In to Your Hosting Panel
Log in to your hosting control panel.
Depending on your hosting provider, you may have access to:
- cPanel
- DirectAdmin
- Plesk
- A custom hosting backup system
Look for options such as:
Backup
Backup Manager
Restore
Restore Backup
Account Backup
or a similar option.
Step 2: Select the Backup Date
Choose the backup containing the version of the website you want to restore.
Some hosting systems provide multiple restore points.
For example:
September 20
September 21
September 22
September 23
September 24
Select the appropriate restore point.
Step 3: Select What to Restore
Depending on your hosting system, you may be able to restore:
- Entire account
- Website files
- Database
- Email accounts
- DNS settings
- Individual files or directories
If both website files and the database were damaged, restoring both may be necessary.
Step 4: Start the Restoration
Confirm the restore operation.
The hosting system will replace the selected data with the backup version.
Large websites may take some time to restore.
Step 5: Test the Website
After the restoration finishes, open:
https://example.com
Then test:
https://example.com/wp-admin/
Check your pages, posts, images, plugins, forms, and other important functionality.
Method 2: Restore WordPress Using a Backup Plugin
WordPress backup plugins can make restoration easier when the backup was created through the same plugin.
Popular backup solutions may provide features for:
- Creating backups
- Scheduling backups
- Storing backups remotely
- Downloading backups
- Restoring files
- Restoring databases
- Migrating websites
Examples include backup solutions such as UpdraftPlus, Jetpack Backup, and other WordPress backup services.
The exact restore procedure varies between plugins.
Step 1: Log In to WordPress
Go to:
https://example.com/wp-admin/
Log in with an administrator account.
Step 2: Open Your Backup Plugin
Find the backup plugin from the WordPress dashboard.
The menu name depends on the plugin you installed.
Look for options such as:
Backups
Restore
Existing Backups
or Backup/Restore.
Step 3: Select a Backup
Choose the backup created before the website problem occurred.
Check the backup date carefully.
Step 4: Select Components
Depending on the plugin, you may be able to restore:
- Plugins
- Themes
- Uploads
- Other files
- Database
For a complete restoration, you may need to restore all available components.
Step 5: Start the Restore
Confirm the restoration.
The plugin will restore the selected files and database information.
Do not close the browser or interrupt the process unless the plugin specifically allows you to do so.
Step 6: Check the Website
After the restore completes, check the front end and WordPress dashboard.
Test important functionality before considering the restoration complete.
Method 3: Manually Restore WordPress Files
Manual restoration is useful when you cannot access the WordPress dashboard or when your hosting provider does not provide a suitable restoration tool.
You can restore files using:
- Hosting File Manager
- FTP
- SFTP
- SSH
For larger websites, SFTP or SSH can be more efficient than uploading thousands of files through a browser.
Step 1: Extract the Backup
If your backup is compressed, such as:
wordpress-backup.zip
or:
wordpress-backup.tar.gz
extract it on your computer or server.
Step 2: Open the Website Directory
Locate the directory containing your WordPress installation.
A typical installation may contain:
wp-admin/
wp-content/
wp-includes/
index.php
wp-config.php
.htaccess
The exact directory depends on your hosting configuration.
Step 3: Upload the Backup Files
Upload the required files from your backup to the WordPress installation directory.
If you are performing a complete restoration, restore the WordPress files from the backup rather than mixing random versions of files from different backups.
Pay particular attention to:
wp-content/
because it contains your:
- Plugins
- Themes
- Media uploads
Step 4: Check wp-config.php
The backup may contain an older wp-config.php.
If you are restoring to the same server, the backup configuration may work as-is.
If you are restoring to a different server, you may need to update database settings such as:
define( 'DB_NAME', 'database_name' );
define( 'DB_USER', 'database_user' );
define( 'DB_PASSWORD', 'database_password' );
define( 'DB_HOST', 'localhost' );
Use the database credentials provided by your hosting environment.
Method 4: Restore the WordPress Database Using phpMyAdmin
If your backup includes an SQL database file, you can restore it through phpMyAdmin.
A typical database backup might look like:
wordpress.sql
or:
wordpress-backup.sql
Step 1: Open phpMyAdmin
Log in to your hosting panel and open:
phpMyAdmin
Step 2: Select the Correct Database
Select the database used by your WordPress installation.
If you are unsure which database WordPress uses, check:
wp-config.php
Look for:
define( 'DB_NAME', 'database_name' );
Be extremely careful to select the correct database.
Step 3: Back Up the Current Database
Before replacing the database, export the current database if it is still accessible.
This provides a fallback if you need information from the current version later.
Step 4: Prepare the Database
Depending on the backup and restoration method, you may need to import into an empty database.
If you remove existing tables, make sure you have a valid backup first and that you are working with the correct WordPress database.
Step 5: Import the SQL File
In phpMyAdmin:
- Select the WordPress database.
- Open Import.
- Choose the SQL backup file.
- Start the import.
- Wait until the process completes.
Large SQL files may exceed phpMyAdmin’s upload limits. In that situation, your hosting provider may provide another import method, or you can use the MySQL command line.
Restore a Database Using WP-CLI
Advanced users can restore a WordPress database using WP-CLI.
For example:
wp db import wordpress.sql
After importing the database, you can clear WordPress cache with:
wp cache flush
If you are moving the website to a different domain, WP-CLI can also be useful for updating URLs.
For example:
wp search-replace 'https://old-example.com' 'https://new-example.com' --all-tables
Always verify the old and new URLs before running a search-and-replace operation.
WP-CLI is especially useful for large websites because it avoids some of the browser upload limitations associated with phpMyAdmin.
Restoring WordPress to a New Server
Sometimes you need to restore a backup on a completely different hosting server.
The general process is:
- Create the required database.
- Upload WordPress files.
- Import the database.
- Update
wp-config.php. - Update the website URL if the domain changed.
- Configure the domain and DNS.
- Install or configure SSL.
- Test the website.
- Update permalinks.
- Clear caches.
If the domain remains the same, the process is generally simpler because you may not need to replace the site’s URLs.
How to Restore WordPress When the Domain Changes
If you restore a website from:
oldsite.com
to:
newsite.com
the database may still contain references to the old domain.
You may need to update the URLs.
For example, with WP-CLI:
wp search-replace 'https://oldsite.com' 'https://newsite.com' --all-tables
WP-CLI handles serialized WordPress data more safely than a simple text replacement.
After changing the domain, also check:
- WordPress Address
- Site Address
- Internal links
- Image URLs
- Theme settings
- Plugin settings
- SSL
- Redirects
- Sitemap
- Canonical URLs
Update WordPress Permalinks After Restoration
After restoring a website, your URLs may sometimes return 404 errors.
Log in to:
WordPress Dashboard → Settings → Permalinks
You can review your current permalink structure and save the settings again.
For example:
Settings → Permalinks → Save Changes
This can regenerate WordPress rewrite rules.
If your server uses Apache, also check that the appropriate .htaccess configuration is present.
What to Check After Restoring WordPress
Do not assume that the website is fully restored just because the homepage loads.
Perform a complete check.
Website Front End
Check:
- Homepage
- Important pages
- Blog posts
- Categories
- Navigation menus
- Images
- Internal links
WordPress Dashboard
Check:
- Login
- Users
- Plugins
- Themes
- Settings
- Media Library
Forms
Submit your important contact and inquiry forms.
Verify that email notifications are working.
WooCommerce Websites
If your website uses WooCommerce, check:
- Products
- Orders
- Customers
- Cart
- Checkout
- Payment gateway
- Shipping settings
- Tax configuration
- Order emails
SSL
Make sure the website loads correctly over:
https://
and that there are no unexpected certificate or mixed-content problems.
Performance
Clear:
- WordPress cache
- Plugin cache
- Server cache
- CDN cache
Then test the website again.
Common Problems After Restoring WordPress
1. Error Establishing a Database Connection
This usually indicates that WordPress cannot connect to the database.
Check:
DB_NAME
DB_USER
DB_PASSWORD
DB_HOST
in wp-config.php.
Also verify that the database server is running and the database user has appropriate permissions.
2. 500 Internal Server Error
A 500 error can result from:
- Incorrect
.htaccess - Plugin problems
- Theme problems
- PHP compatibility issues
- Incorrect file permissions
- Server configuration problems
Check your hosting error logs for more information.
3. White Screen or Fatal Error
A plugin or theme may be incompatible with the restored WordPress version or PHP version.
If you cannot access WordPress, you can temporarily disable plugins through the hosting File Manager or database, depending on the situation.
A common file-based approach is renaming:
wp-content/plugins
to something such as:
plugins-disabled
This can help determine whether a plugin is responsible.
4. Images Are Missing
If posts are restored but images are missing, your database may have been restored without the corresponding uploads directory.
Check:
wp-content/uploads/
Make sure the media files were restored.
5. Redirect Loop
A redirect loop can be caused by:
- Incorrect HTTPS configuration
- Incorrect site URL
- CDN settings
- Reverse proxy configuration
- Redirect rules
- SSL configuration
Check the website URL and server/CDN redirect settings.
6. The Old Website Is Still Showing
If you have restored the website but still see the previous version, caching or DNS may be responsible.
Clear:
- Browser cache
- WordPress cache
- Server cache
- CDN cache
If DNS was recently changed, allow the DNS changes to propagate.
Restoring a WordPress Website After a Hack
Restoring a backup after a security incident requires additional care.
Do not automatically restore the newest backup because it may already contain malicious code.
Instead:
- Identify when the compromise occurred.
- Choose a backup from before the compromise.
- Verify that the backup is clean.
- Restore the website.
- Update WordPress.
- Update plugins and themes.
- Remove unused software.
- Change all important passwords.
- Rotate WordPress security salts.
- Scan the restored website for malware.
- Review administrator accounts.
- Check suspicious files and scheduled tasks.
Change credentials for:
- WordPress administrators
- Hosting accounts
- FTP/SFTP
- SSH
- Database users
- Email accounts
A backup should not be treated as clean simply because it successfully restores.
Should You Restore the Entire Website or Only the Database?
It depends on the problem.
Restore the Database Only
A database restoration may be appropriate when:
- Website files are intact
- Only content or database settings were damaged
- A database-specific problem occurred
Restore Files Only
A file restoration may be appropriate when:
- Files were deleted
- A theme or plugin was damaged
- Media files are missing
Restore Files and Database
A complete restoration is generally appropriate when:
- The entire website is damaged
- A migration failed
- The server was compromised
- Both files and database are corrupted
Always consider what data may be lost before performing a full restore.
Best Practices for WordPress Backups
A good backup strategy is more than simply creating one backup.
Keep Multiple Backup Versions
Maintain several restore points rather than only the newest backup.
For example:
Daily backups
Weekly backups
Monthly backups
The exact retention period should depend on how frequently your website changes.
Store Backups Off-Site
Do not keep the only copy of your backup on the same server as your website.
Consider storing backups in a separate location such as:
- Remote storage
- Cloud storage
- Another server
- Dedicated backup storage
Automate Backups
Automated backups reduce the chance of forgetting to back up the website.
Test Your Backups
A backup is only useful if it can actually be restored.
Periodically perform a test restoration on a staging server or separate environment.
Keep Backups Before Major Changes
Create a fresh backup before:
- WordPress updates
- Plugin updates
- Theme changes
- PHP version changes
- Server migrations
- Major configuration changes
WordPress Backup Restoration Checklist
Before considering your website fully restored, use this checklist:
- Correct backup selected
- Current website backed up if possible
- Website files restored
- Database restored
wp-config.phpchecked- Domain configuration checked
- SSL working
- Homepage tested
- WordPress dashboard tested
- Posts and pages checked
- Images checked
- Plugins checked
- Theme checked
- Forms tested
- WooCommerce tested if applicable
- Permalinks checked
- Cache cleared
- Website security reviewed
- Administrator accounts reviewed
Frequently Asked Questions
Can I restore WordPress without accessing the WordPress dashboard?
Yes. If the WordPress dashboard is unavailable, you can often restore the website through your hosting backup system, File Manager, SFTP, SSH, phpMyAdmin, or WP-CLI.
Will restoring a backup delete my new content?
It can. If you restore an older database or overwrite current files, information created after the backup date may be lost.
Always preserve important recent data before restoring an older backup.
Can I restore only WordPress files?
Yes. You can restore files without restoring the database when the database is still correct and only files have been damaged.
Can I restore only the database?
Yes. A database-only restoration is possible when the website files are still intact.
Can I restore a WordPress backup to another hosting provider?
Yes. WordPress backups can generally be restored to another hosting provider, provided the new environment meets the website’s requirements and the database, files, configuration, and domain settings are properly migrated.
How long does a WordPress restoration take?
The time depends on the website size, backup method, server speed, database size, and restoration method. Small websites can restore quickly, while large websites containing many files and databases can take considerably longer.
Should I restore a backup after my website has been hacked?
You can restore a backup after a hack, but use a backup from before the compromise and verify it is clean. After restoration, update the website and change credentials before putting the site fully back into service.
Is one backup enough?
It is safer to maintain multiple backup versions and keep copies in a separate storage location. Regularly testing restoration is also important.
Conclusion
Knowing how to restore a WordPress backup can save significant time when a website experiences a serious problem. The restoration method depends on where your backup is stored and whether you need to restore the database, website files, or both.
For most users, a hosting backup system or a reputable WordPress backup solution is the simplest approach. Advanced users can restore files and databases manually using File Manager, SFTP, SSH, phpMyAdmin, or WP-CLI.
Most importantly, do not wait until your website fails to think about backups. Maintain multiple backup versions, store copies outside your web server, and periodically test that your backups can actually be restored.