Backing Up Your WordPress Site
Backups are an important part of running a website, but many people don’t have them. What happens if your site gets hacked? What happens if you update a plugin, and your website stops working? What happens if your website hosting provider has a hardware failure, and your content is deleted?
All of these questions and more should point you in the direction of regularly backing up your website.
Types of Backups
Your WordPress site can be separated into two broad categories – files and database. When deciding on a backup solution, you should make sure your tool can fully backup both. If you are using backups through your hosting provider, it should cover both of these. If you are using a backup plugin, be sure it supports both types, and test to make sure it does! Your hosting provider may restrict functionality a backup plugin needs to properly create backup files.
The easiest way to get started with backing up your WordPress site is to use a plugin like BackupWordPress. These plugins will let you more easily recover from an update failure, but they are not ideal. First, they are often limited in how they backup your files. The backups are usually stored in an insecure manner, so if a hacker has taken over your site there’s a good chance they also have control over your backups. Second, if all of your backups are on the same server, you don’t really have a backup!
As mentioned earlier, a hardware failure can strike at any time, wiping out all of your hard work. You are also vulnerable to fires and natural disasters.
Off-site backups are stored in completely different data center from your primary server. This can be as simple as manually downloading a backup to your personal computer, or as complex as an automated service to backup your site to another location.
Most website hosting providers will give you access to tools that will allow you to make your own backups. Files can be downloaded via FTP. Simply create a new folder on your computer, and download the entire WordPress site contents from your server to your personal computer. Contact your hosting provider for details on setting up FTP if you do not have access already. We recommend using the FileZilla FTP client.
Manual backups of the database are less common, but vitally important. The database, after all, houses all of site’s posts, pages, and more. Many web hosts provide access to a database management tool called phpMyAdmin. This is a powerful tool which lets you inspect and modify your database using SQL queries directly. Care should be taken when using this tool if you are unfamiliar with it. However, one if the key features it offers is a way to export your entire database so it can be easily moved and re-imported later.
After opening up phpMyAdmin, we’ll have a list of database on the left. Click on your WordPress site’s database.
After selecting a database, it will display all of the tables in that database. To backup the database, click on the “Export” tab at the top
From this screen, select the SQL format, then click the “Go” button to begin downloading your site’s database as a file. Depending on how large your site’s database is, the website may appear to hang for a bit while it generates the backup file before the download begins. Don’t close your browser tab if you can help it!
Use Your Web Host’s Tools
If it isn’t obvious by now, doing backups yourself can be quite a bit of work. Most reputable web hosts will provide an automatic backup solution (often for an extra charge). This can be an easy first step to making sure you have backups of some sort. It is still important to investigate how they are backing up your website. In particular, are they using off-site backups? How often are they backing up your site?
WP Engine is a hosting provider that specializes in WordPress sites. It has a number of handy features, one of which is built-in easy backups. Log in to your WP Engine dashboard, and click “Sites” at the top. Then select the site you’d like to manage from the list of sites on your account. Now click “Backup Points” on the left to view the backups for this site.
This page will list all of your backups. By default, you’ll have a daily backup. If you want force a new backup – maybe you’re about to do some large site changes – you can press the “Back up now” button to create a new backup in WP Engine. If you select a backup from the list, you can choose to press “Restore” to overwrite your site with the saved backup version, or you can choose “Download ZIP” to download a ZIP file containing your website’s complete files and database. Easy manual backup, with no waiting on slower FTP.
If you have WordPress hosting through GoDaddy, you also get access to free daily backups. Log in to your GoDaddy account, and manage your WordPress hosting. Then click the “Backups” tab, or the “Manage” button in the “Backups” panel.
GoDaddy keeps 30 days of daily backups. You can choose if you want to only restore the files, the database, or both. Then you can select which date’s backup you’d like to restore. Click “Restore” and you’re done!
How Often Should I Back Up?
This is a question with a simple answer – as often as it needs! I have a personal website that I might not change for six months or more. As long as I know I have a safe, working backup from the last time I changed the website, I’m happy.
This becomes more complex depending on your website’s function. If you have a popular blog with new posts published regularly, backing up at least daily is recommended. A popular e-commerce site might need even more frequent updates – up to hourly.
Another option is to look into automatic fail-over servers. This method has two servers with the exact content online and running. You have a third server which is the server people actually connect to. This server then detects if your primary server has failed, and if so, seamlessly redirects all traffic to your backup server.
Keep in mind that automatic fail-over is not really a backup, but an additional method of redundancy against a single server failure. This is often not done unless you’re making enough money to hire a system administrator / IT professional to manage your server(s) full-time.
Backup Before Updates
There are many items that can be updated on your WordPress site, and any update may cause an unexpected problem. Plugins, Themes, and the WordPress core can all be updated. Since these different systems are often interconnected and dependent on each other, one of these updating may cause a different one to stop functioning. If you backup before you update, you can revert to the backup if something stops working right after the update.
Test Your Backups
A backup is no good if it cannot be restored. Testing backups is critical to ensure your backup and restore process is functional. It is best if your hosting provider has a “staging” environment for you to test with. This lets you make destructive changes in an essentially duplicate installation without impacting your main website. When testing the restoration of backups, you don’t want your main site to go down if there’s a problem either.
[ccc_inline_callout title=”Tired of manual backups?” content=”We can set you up with hosting with automatic backups!”]