You already know that running an online backup for WordPress websites is important. They can save you from losing your website and get you back up and running quickly in the event of a crash or loss of data. But did you know that just running those backups isn’t enough?
Sometimes backups can become corrupt or can be missing files. Or worse, sometimes a backup just doesn’t work at all. Imagine a virus taking down your website and then not being able to restore because your backup isn’t actually there. Ouch!
That’s why testing WordPress backups should be a part of your regular backup strategy.
Not sure how to test backups? In this post, we’ll walk you through the basics so you can run your own tests quickly and easily (and rest assured in the knowledge that your data is safe).
Why is Testing Backups Important?
Although it’s not a common occurrence, a number of things can and do go wrong with regular WordPress backups including:
- Running out of storage space
- Leaving out important files
- Backup software malfunctions or bugs
- A loss of Internet connection
- The backup itself gets intercepted by a hacker
Even if you receive notification that a backup has successfully completed, there’s really no way of knowing that it contains all of the files you need or that it even worked correctly. That’s why testing backups is necessary to see when things have gone wrong and fix the issue before it becomes a real problem.
How to Test WordPress Backups
There are two methods you can use to test your online backup for WordPress: you can either do it manually or install a WordPress plugin that will do it for you. Manual backup can be a laborious and time-consuming process, and a little difficult if you don’t have the prerequisite background knowledge. Still, some users prefer to test a backup on their own for greater peace of mind.
Here’s a basic overview of how it works:
Manually Testing Your WordPress Backup
Once you have your local environment set up, you can uncompress your backup and locate the wp-config.php file. Within that file, you should be able to locate both a backup of your database (usually as an SQL, ZIP or GZIP file) and your WordPress core and custom files.
It is worth noting that sometimes you need to install the same backup software you used to create the backup into your local environment, otherwise you won’t be able to open the files. Check the specifications for your program or plugin for details.
Once you’ve uncompressed your WordPress backup, follow these steps:
- Find your database credentials such as database name, username, and password. The lines they’re contained in should look like /** MySQL database.
- Write down all of the necessary information and open up phpMyAdmin.
- Create a new database by clicking the “New” button in the menu.
- Create a new database user by clicking on Privileges > Add user.
- Once you see a message indicating that your user was successfully created, click on the Import tab at the top.
- Click Choose file and select your database backup from your computer, then click Go
- Next, copy the uncompressed files from earlier to the folder where your test site is held
- Type “localhost” into your browser to see your site (if that doesn’t work, check your software’s documentation for the correct link)
Sound complicated? It is! That’s why we always recommend using a WordPress plugin to test backups. Keep reading for more information.
Testing Your Backups with a WordPress Plugin
There are several different plugins you can use to test your WordPress backups, but one we especially like is Snapshot Pro. It’s a premium plugin, which means you have to pay for it, but if you take your security seriously, it’s worth it.
SnapShot Pro can backup multiple sites, store them in the cloud, provide one-click restoration and (obviously) test those backups.
To run a test using the plugin, follow these steps:
- On your live site, install, activate, and setup Snapshot Pro, then run a backup.
- Create a fresh install of WordPress on a local site, then install and setup Snapshot Pro there.
- Go to Snapshot > Import and enter the URL where your snapshot is located
- Click Scan / Import Snapshots.
- When you see a message that the import was successful, go to Snapshot > All Snapshots.
- Hover over the name of your snapshot and click on the restore link.
- Go through all of the options (like where to restore) and make sure they’re correct.
- Finally, click on the Restore Snapshot button and make sure everything works the way that it should.
While it’s still a bit of a process, it’s much faster and easier than running a manual test.
How Often Should I Test My WordPress Backup?
Consider this: how long could you go without losing vital content on your website? If you only update or add new content sporadically, it might be quite a while. But if you add new content daily, receive lots of customer interactions, or frequently change the look of your site, it’s probably a lot more often.
Whatever timeframe you come up with is the maximum amount of time you should go before running a backup – and testing it.
It may add a few minutes to your day, but in the long run, testing your online backup for WordPress is well worth the effort.