How To Backup WordPress Sites For FREE
There are a few different ways to backup WordPress websites. The first, and easiest, is when your web hosting provider backs it up for you automatically. However, if your web host doesn’t offer this service, you’re left responsible for backing up your website on your own. Many bloggers turn to paid 3rd party plugins + services for this function. If you’re a new blogger, though, or a tightwad like me – you’ll want to keep your blog’s expenses to an absolute minimum. If that sounds like you, then you’ve come to the right place.
The basics of how to backup WordPress involves creating a backup of not just the site’s files, but also the site’s SQL database – which is where we’ll begin in a moment. But first …
Before We Begin
If you’re reading this on a mobile device, I highly recommend you pin this post and come back later when you can sit down in front of your computer. The screenshots used throughout the post will be difficult to view on small screens.
With that out of the way, Let’s start out by backing up your WordPress website’s database.
WordPress Database Backup Using phpMyAdmin
To backup your WordPress database, we’ll need access to phpMyAdmin – which is provided by your web host. Check inside your hosting control panel for a link. You’ll likely need either your control panel username and password to login here – though configurations between hosting companies can vary. I’ve included links below to resources from popular hosting companies to help you find this information. If you don’t see your hosting provider below, go to Google and search for “your hosting provider + phpMyAdmin” and you’ll quickly find the information you need. However, if you absolutely cannot find the information you need to get into phpMyAdmin, leave a comment below and I’ll do my best to help.
Once you’ve logged into phpMyAdmin, on the left hand side select your WordPress site’s database. Then at the top of the screen click where it says Export. You’ll then see the screen pictured here. Be sure that the export method selected is Quick and the format is set to SQL and click OK.
By default, the backup file will be named whatever your database is named followed by .sql. I recommend renaming the file to include the backup date. See the Best Practices section below for more.
If your browser asks you whether you want to open the .sql file or save it, be sure to choose to save the file.
Once the download is complete, be sure to copy the file from your Downloads folder and paste it where you intend to store your file backups. Again, be sure to read the Best Practices section below for suggestions on storing your backup files.
Congratulations! You’ve successfully backed up your WordPress site’s database. Now, let’s move on to the next step – backing up the files from your web server account.
WordPress File Backup Using FTP
To backup your WordPress files, you’ll need a FTP program. I recommend the open source program FileZilla. Additionally, you’ll need a username and password to connect into your web hosting server. Your hosting company may use the same username & password as you use to login to their control panel or they may use a separate account (that you should be able to configure in your web hosts’s control panel). As I mentioned previously, I’ve included links below to resources from popular hosting companies to help you find this information. If you don’t see your hosting provider listed below, go to Google and search for “your hosting provider + FTP access” to find the information you need. Again, if you absolutely cannot find the information you need, leave a comment below and I’ll do my best to help.
To connect to your hosting server, enter in the boxes across the top: your site’s domain where it says Host, your username and password in their fields, and then port – for standard FTP use port 21 – then click Quickconnect. If your web host allows shell access, you should be able to connect via Secure FTP or SFTP on port 22 – which is encrypted to prevent data snooping – instead of port 21.
In this situation, the first time FileZilla connects to a server via SFTP using port 22, it will ask you whether or not it should trust your host key. Be sure to check the box that says to “always trust this host and add this key to the cache” and then click the OK button. FileZilla will now complete the connection to your web hosting server account.
Finding Your Way Around
Once connected, you’ll see files on the left and right sides of the program. The left is the files on YOUR PC. The right is the files on the SERVER. On the left side, navigate to where you want to download the backup files to. On the right side, navigate through the folders to where your site’s files are stored. For most hosting providers, it should be relatively easy to find from the home directory. If you use a custom server, you may need to check under /var/www instead.
Once you’ve found your website’s folder, right click on it and choose Download. When finished the files will be in the folder you chose on the left side of the screen.
You’ll know the file transfer is complete when the file queue at the bottom of the screen is empty. Be sure to check that there weren’t any failed downloads. You’ll want to requeue / download any files that fail to transfer.
Once you’ve verified that all of your files have downloaded successfully, you can close out FileZilla. I recommend reading the Best Practices section below for information on how to go about storing your backup properly.
Web Host Specific Resources
As I referred to above, if you need to find information from your hosting provider regarding phpMyAdmin or FTP access, I’ve found links to resources from popular hosting companies to, hopefully, make this information easier for you to find.
Backup Best Practices
Your blog is your business. Let’s treat your file backups with the same seriousness that the IT world does with some best practices for managing your backups. First let’s talk about the backup files themselves.
With the way we backed up the files from the server, you should now have a folder full of PHP files, your website images, and other assorted things. It’s generally easier to manage this backup if you compress the entire folder into a ZIP archive. Here are directions for both Windows and MacOS on exactly how to compress a folder into a single file.
I mentioned above to consider renaming your backed up file to include the date the backup was made. This is a good idea for both the SQL backup and the file backup. Consider using filenames like this:
So as an example, the backup files for this site on April 2, 2018 would be:
Next, let’s consider the most important thing about managing your backups – the actual method of storing your files. In the IT world, when it comes to backups, you’ll find what we call the 3-2-1 rule – which means:
- THREE total copies of your data
- TWO copies stored locally
- ONE copy stored remotely
When it comes to backing up your WordPress site, I’d recommend following this same rule. The remote copy is the one that’s live on your website. You don’t have to do anything special here. For the two local copies, you have some options. You could store one on your computer’s hard drive and one on a USB flash drive. You could choose to get a USB hard drive to a copy of your backups. The choice is ultimately yours to decide. My personal preference is to store backups like this:
- Keep the most recent backup on your personal computer – making it available quickly if should you need it.
- Use a USB hard drive to hold the most recent FOUR weeks worth of backups. This drive gets stored in a fire-resistant box* when not in use. This is actually a good strategy for backing up ALL of your data.
The last thing we need to discuss regarding your backups is how often SHOULD you backup your WordPress site? The general rule of thumb is that the more frequently you backup, the less data you might lose in the event that there’s a problem. When it comes to your website, this doesn’t necessarily mean you need to backup everything everyday if you don’t want to. To help decide when to perform a backup, let’s consider how your site stores changes to it.
Let’s start with what happens when you create a new post. Your site consists of code (that includes your site content and any comments that are made on your posts) and images that you’ve uploaded into your media library. The code of the post is stored in your site’s SQL database and the media files are stored as files on the server in your upload folder.
Knowing all of this, it’s a good idea to perform a full site backup every day that you create a new post or update your site in any way with new images. This is the minimum frequency I would recommend backing up your site.
On days where you only edit the content without new images or if don’t make any edits to the site at all, you may want to at least perform a database backup to capture any comments that have been made to the site.
Now that your backup is complete, you have a kind of safety net should something go drastically wrong with your WordPress site. If you found this post helpful, be sure to pin it to Pinterest and subscribe to my email newsletter to stay updated on future blogging tech tips like this one. Also, be sure to let me know what you think in the comments below. Thanks for reading!