In the WordPress community, the importance of regular website backups is stressed routinely. Still, many people don’t realize just how critical they are until they’re dealing with a broken site.
When this happens, there’s no better feeling than knowing you have a copy of your site you can use to recover your work. So long as you have your database and files backed up, you have a way to manually restore your WordPress website.
Editor’s note: It is advisable to always have a secondary backup copy saved on an external destination. Just in case 😉
In this post, we’ll explain when you may need to restore your site from a backup and the methods available for doing so. Then we’ll walk you through how to do so manually in five steps. Let’s get into it!
Why you would want to restore your WordPress site from a backup
Backing up your WordPress files and database lets you restore them in the event something goes wrong with your site. If your website is hacked and defaced by a cybercriminal, for example, having a recent copy lets you salvage your site and return it to its previous state.
You could be well-versed in web development and programming yet still have something unexpected happen to your site. Incompatibilities with themes, a plugin vulnerability, or even a user messing with your site’s code could result in a website that’s beyond basic troubleshooting.
Regardless of what happens to your site, the important thing is resolving the issue and making sure your content is available to users. Restoring a recent backup is often the fastest way to recover from a WordPress disaster. This can then give you time to go about fixing the root of the problem.
Common methods for restoring WordPress backups
There are various ways you can create and restore WordPress backups. One method is to use a plugin such as UpdraftPlus, BlogVault or ManageWP. While these tools can be useful, they’re also sometimes limiting.
For example, you’ll only be able to save your backups using storage options supported by your plugin. Additionally, you may not be able to use the automatic restore option if you’re unable to access the back end of your site.
Another method is to go through your hosting provider. Many web hosts include backups as part of their plans, while others offer this service as an add-on. It often includes a ‘one-click’ restore option.
However, your host may save site backups to the same server that stores your site. If it becomes compromised in some way, both your website and your latest copy could be lost.
For this reason, it’s always wise to save your most recent backup to your own computer or cloud storage account. Then, if all else fails, you’ll always be able to manually restore your WordPress website.
This process is a bit complicated compared to restoring your site with a plugin or through your hosting account. However, manually recovering a broken site is sometimes the most reliable (or only) route available.
How to manually restore a WordPress website from a backup (In 5 steps)
In order to manually restore your WordPress website, you’ll need backups of your WordPress files and database saved to your local computer. Some basic knowledge of File Transfer Protocol (FTP) and phpMyAdmin is also handy, but you’re not overly familiar with these tools you should still be able to follow the steps below.
Step 1: Log in to your hosting account and open phpMyAdmin
First, you’ll need to log in to your hosting account and access phpMyAdmin, the database manager WordPress uses. If your host uses cPanel, you can click on the phpMyAdmin icon under Databases:
Hosts that use other control panel interfaces should still provide easy access to this platform. You may have to check your provider’s documentation to find it. Once you’ve opened phpMyAdmin, navigate to the Databases tab.
Step 2: Import your backup database
When you begin restoring your database, you’ll have the option to either empty your existing one and import your backup to it, or delete it and create a new one for this purpose. If you choose the latter route, remember to add your new credentials to your wp-config.php file.
After you’ve located the database where you want to restore your WordPress backup, click on the Import tab at the top of the screen:
Under File to Import section, click on the Choose File button and select your backup database from where you’ve saved it:
Next, under the Format section, click on the dropdown and select SQL:
Then, click on the Go button. It may take some time for phpMyAdmin to import your backup database, but once it’s finished this part of your site (which includes your posts and pages) should be restored.
Step 3: Install and log in to your FTP client
Now that your database is back in business, it’s time to turn your attention to your WordPress files. To restore them, you’ll either need your hosting provider’s file manager tool, or an FTP client such as FileZilla:
For the latter option, you’ll need to retrieve your FTP credentials from your hosting account. Like the link to open phpMyAdmin, the location of this information will vary based on your provider’s control panel interface.
In cPanel, you can find your credentials by clicking on FTP Accounts under Files:
Once you download and launch FileZilla, log in using your credentials and click on the Quickconnect button:
This should establish a connection to your server. You’ll know it worked when the Status updates to Directory listing of “/” successful.
Step 4: Upload your WordPress backup files
In FileZilla, you’ll see your local files on the left side of the screen. It’s important to make sure that your backup is in an unzipped file and saved on your computer so that it’s accessible here. The ‘remote site’ (your server) will be on the right side:
Now you’ll need to delete the old files from your server. Make sure your backup includes any custom code you want to save before you do this, as you won’t be able to recover it if not. In FileZilla, you can simply right-click on the old files and select Delete.
Next, upload your backup. FileZilla enables you to simply drag and drop the files from your local computer to your server. Other platforms should have an obvious Upload option.
If you’re using FileZilla, there will be three tabs at the bottom of the screen: Queued files, Failed transfers, and Successful transfers. Queued files are the ones in the process of uploading from your local computer to your server.
Once they’re uploaded, your backup files will appear listed under the Successful transfers tab. Depending on the size of your site, this process could take a while. Once the Queued files count reaches zero, your restoration should be complete.
Step 5: Check to verify that your site was safely restored
Hopefully, you’ve made it this far without issue. Once your files are done transferring, you’ll want to visit your website to make sure everything is functioning properly.
Start by checking to confirm your plugins were transferred successfully. You may need to re-install and/or reactive some of them.
There’s also a chance that your permalink structure has changed, which can cause your page and posts links to break. To verify they’re working correctly, you can go to Settings > Permalinks in your WordPress dashboard:
We recommend changing your WordPress admin password as well. You may also want to consider requiring new passwords for all users, including for Multisite networks. This is particularly important if you’re dealing with a hacked website.
Finally, now is a good time to install multiple security and backup measures. Hopefully, you’ll never need to restore your WordPress website again. If you do, however, you’ll have the necessary knowledge on hand.
Whether your site is defaced by a hacker or a compatibility issue brings it down, knowing how to restore a backup of it is crucial. There are different ways you can go about this. However, manual restoration gives you a bit more control than some of the alternatives.
As we discussed in this article, there are five steps you can follow to manually restore a WordPress website backup:
- Log in to your hosting account and open phpMyAdmin.
- Import your backup MySQL database.
- Install and log in to an FTP client such as FileZilla.
- Upload your WordPress backup files.
- Check to make sure everything is working correctly.
Do you have any questions about how to manually restore a WordPress website from a backup? Let us know in the comments section below!
Image credit: Unsplash.