What You Should Know About Website Backup
A wise person once said, your WordPress site is only as secure as your last backup. Well, I’m not sure someone actually said that, but even so, the sentiment is true. If you have a WordPress site and you want to ensure you’ll keep having that WordPress site in the future, keeping it backed up is key. Which is why you’re watching this course. WordPress backups have evolved a lot over the years and thanks to new services and innovations in hosting and plugins you now have a long list of reliable options to choose from when backing up your site. In this course, we’ll take a deep dive into what backing up a WordPress site really means by looking at four different methods for backup. That way, you’ll have a solid understanding of the benefits and drawbacks of each. What they offer. How they work. Most importantly, how to use them to restore your site if something goes wrong. Backups are an integral part of WordPress site maintenance.
Why is backing up your site necessary?
Why is backing up your WordPress site necessary in the first place? And that’s a question in need of an answer. After all, once you pay a company to host your site on the web, they should be responsible for keeping your site secure, keeping hackers out, and making sure nothing goes wrong. Right? Well, the realities are a bit more complicated. While any reputable host will do everything in their power to protect your site, they cannot guarantee nothing will ever go wrong, or that if something does go wrong, they’ll actually be able to fix it.
Setting up a proper backup routine give you agency and a sense of security that if and when something does go wrong, you’re able to restore your site to the date and time you want. There are some other less obvious reasons as well. First, just like your computer might break down due to a technical or software malfunction, so can your host. After all, web servers are just large computers. If your web host’s server breaks down, there’s a good chance your backups disappear along with your site. I’ve seen this happen. If this catastrophe should come to pass, the only way to get your content back online is to rely on a third-party backup on a third-party service you set up yourself.
Second, no matter how secure your site is, there’s always a chance it will get hacked or fall victim to some form of malicious incursion, either through your fault, or through the host’s fault, or something else. When this happens, you can’t trust any of your files or the content in your database, and the safest thing to do is to revert back to an earlier version of your site that was backed up before the incursion occurred. Sometimes this means restoring your site to what it was a couple of days ago.
Sometimes you have to go back weeks, or even months. It all depends on how the malicious incursion came in, and what it did. The challenging thing is sometimes the hack or incursion also encompasses your server backups. In this situation, having a secondary backup stored on a third-party service ensures you have unhacked backups to return to.
The third reason may seem less likely but it’s still something to consider. Your hosting provider may choose to either discontinue your service. It might get bought by a different company, or even close-up shop. In these cases, it’s your responsibility to move your site and all its contents to another location before the site goes offline. In some cases, you’ll only get a couple of weeks or maybe only a couple of days to do this. And in some extreme cases, you may only learn that your host is no longer available after it went offline.
Having proper backups and a secondary backup on a third-party service, allows you to restore your site to a new location with ease. And that brings us to the final reason, which is not really about backups, but more about data portability. Some of the plugins featured in this course allow you to migrate your site to a new host. After all, if you think about it, that’s really just restoring your site from a backup to a new location.
What needs backing up
In a standard WordPress site, there are four main components working together to form the site as we know it. WordPress the application, the active theme in plugins, the database holding all the data and the uploads. When backing up a WordPress site, each of these different components need to be backed up, but they don’t need to be backed up at the same frequency. First, WordPress the application doesn’t technically have to be backed up at all. You can always download and install a fresh copy from WordPress.org. However, the core install of WordPress includes custom configuration files like .htaccess and .wpconfig which control how WordPress operates on this specific server and these need to be backed up to get everything working smoothly.
That said, WordPress core and its configuration files rarely change so these can be backed up at a cadence of once a month or even once a quarter without running the risk of anything getting lost. In this process you also have to keep in mind WordPress updates quite frequently so any old backups will hold older versions of WordPress. Second, the active theme is what controls the appearance of your WordPress site, and active plugins control extended functionality. These are core elements that need to be backed up to ensure the site runs smoothly and consistently even after being restored from a backup. Themes and plugins should be backed up once a month, and any time you make a configuration change or add new themes or plugins. The database on the other hand, is where all the data sits, including posts, pages, comments and all other entries as well as references to any media elements uploaded to the site. Depending on how much usage the site gets, this database needs to be backed up on a weekly, daily, or even hourly basis to ensure no data is lost.
Finally, any uploads made to the site, be it images, video, audio or documents, end up in the wp-content/uploads folder, unless some other non-standard location has been introduced via a plugin or a custom development. All these uploads, need to be backed up to ensure they remain available even after the site is restored from a backup. Over time, the uploads folder can get really large, but the files uploaded usually don’t change once they’re uploaded. For this reason, it may be worth the effort to find a backup solution that only backs up the changed files in the upload folder on an ongoing basis so you don’t end up with multiple full backups of the same media files. As for the database, depending on how much content is published on the site, the uploads folder might need to be backed up on a weekly, daily or even hourly basis, to ensure no data is lost.
The 4 methods of backup
In general, the 4 common ways that a WordPress site can be backed up include:
- Manually backing up your site
- Backup and Restore via Hosting Tools
- Backup Using Third-Party Plugins
- Backup using Migration Plugins
For each method, there will be multiple alternative tools to do the same thing. The method you choose largely depends on your skill and comfort level in preforming the task yourself or outsourcing it to someone else. The key takeaway point here is to have more than one backup solution running on your site. Having both hosting-provided backup and backup on a third-party service ensures redundancy. That way, any one of your backups can fail without your site being lost in the process.
Manually backing up your site
A quick and hopefully obvious warning. Do not randomly backup and restore live sites just to learn how this works. Especially not sites you care about. Things can go very wrong during this process. I recommend you set up a dummy site like this one to work with, so if something goes wrong, it doesn’t matter. All right, the first thing we’ll do is back up the database for the site. Now, If your site is with SiteGround, Media Temple, WP Engine or any other hosting provider, they will generally offer you an admin interface such as cPanel so you can access the services back end. cPanel is ubiquitous and one that’s used by a lot of shared hosting providers. It showcases all the features that go into hosting. Although, many hosting providers now put a design layer on top of this to make it look fancy, or take away a lot of the functionality. What you should look for in this case is the database for your site.
First of all, you need to know which database your current site is using and that can only be done by looking at the wp-config file for the current site. In most cases you only have one site, under one host, so there’s no problem, but in a circumstance where you have many sites under one host, you have many databases, you need to know which database you’re targeting. Under databases here, you can go into the MySQL databases list and see all the available MySQL databases that are set up. You can also create new databases, or administer existing ones, but what to look for is this application called phpMyAdmin. phpMyAdmin, allows you to administer a database directly, so you can see what’s in the database and you can manipulate the contents within the database and you can also run backups and import content to the database, which is what we’ll be doing. After opening phpMyAdmin, you can see there are a ton of table entries for the database and for the site. Once you have access to the database, the next step is to dump all this out into a file you can save on your computer.
Backup and Restore via Hosting Tools
Most reputable hosting providers run automatic backup routines as part of their standard process. And most of them offer you as a client direct access to those backups. As examples, here is the backup tool for Media Temple’s managed work press hosting, and the backup tool for SiteGround’s GoGeek plan. Depending on hosting services and how they’re configured, you may have a one-click solution to restore the entire site including database, files, and everything else. That’s what you get here under Media Temple where you just choose a backup and then restore everything. Or you may have the ability to roll back just the database, just your files, or even individual files and folders like you can here under SiteGround.
While hosting dashboards like this vary greatly, rolling back your sites to an earlier backup using the hosting managed backups typically involves the same three steps. First, finding the backup and restore option in the hosting admin panel. Second, selecting the date of the backup you want to restore your site to. And third, clicking a button to confirm. The rest of the process is handled automatically behind the scenes by the host. And restoring your site to an earlier backup is usually a very quick process, because you’re basically swapping files on the server.
Backup Using Third-Party Plugins
When it comes to backing up data, redundancy is key. Just like your main data store can be hacked or corrupted, so can your backups, so you always have both on-site backups, via host managed backup and backups on a third-party host. If you go to wordpress.org’s plugin repository and search for backups, if you go to wordpress.org’s plugin repository and search for backup, you’ll see tons of options available and that’s because backup plugins have always been one of the mainstays of the WordPress community, and over the years, they’ve evolved from simple plugins that allow you to download backups to your computer, to advanced solutions that let you store backups in the cloud or even at a dedicated service for easy retrieval. Currently, there are some great SaaS offerings, like UpdraftPlus, or WP Time Capsule, or BlogVault, or Vault Press, or maybe even Backup Buddy, or even BoldGrid Backup.
All of these services work mostly the same way. They give you a plugin to manage and run and automate the backup and restore procedure and allow you store those backups either on a cloud service of your choosing or in their custom environment. As with most of these plugins, there’s a free version, with most of the features you need for a small site and a premium version for more advanced functionality. It’s a good idea before picking a plugin of your own, to list the features you need for your site, and then check out all the free and premium offerings from different service providers before making a decision. There are no wrong choices really, but depending on your circumstances, some plugins will be better suited to fit with your process than others.
Backup using Migration Plugins
Backing up a WordPress site and migrating a WordPress site are closely related, and for that reason, a lot of the backup plugins that now exist also have migrator capability. Case in point, if you get the premium version of let’s say Updraft Plus, it comes with an extension called Updraft Migrator which allows you to move your work from one location on the web to another location on the web, or from your local computer to the web, or from the web to your local computer, and does all the database rewrites and reconfigurations that are necessary for that migration to work. This is a feature that you get with a lot of the backup plugins, and interestingly it’s also a feature you get with a lot of the old migration plugins.
As an example, the duplicator plugin from Snapcreek, which, traditionally, was used to just duplicate a work for a site and move it to a new location. Again, either from a computer to the web, or from one location on the web to another, and do all the database rewrites and everything that’s necessary. But these duplicators plugins now also often feature backup functionality, and that’s because backing up the sites and duplicating a site, involves the same steps. You have to make a copy of the entire database, and all the files and everything, then you have to store it somewhere, and then you have to reboot it, either in the same location or in a new location. So, the backing up and restoring part is actually just a simplified version of the migration part, because you just take out the migration point.
You may need to get the duplicator pro plugin because the free duplicator plugin only allows for site migration. It doesn’t allow you to run scheduled backups. The pro plugin does, so I’ve purchased the pro plugin, and installed it on my site. You’re going to see it down here in the main admin menu, as its own button. Whether the task is manual or automated, you should decide on a backup schedule, and then restore the site to that backup, only this time with the duplicator pro plugin.
Key Lesson: Backup Matters
Now that you know the four different methods for backing up your WordPress site, you should take away two things. One, backing up and restoring your WordPress site is a relatively straightforward process once you have the tools and know-how. And two, make sure you have redundancy in your backups using both host-provided backups and a third-party plugin, like the ones previously mentioned.
Bryon Daily
Reach out if you have any questions or need assistance with your current website. Our team is ready to help!