For all the work that you’ve put into your WordPress site, it is a terrifying reality that everything can be lost in an instant due to hardware failure or some other misfortune. Imagine how difficult it would be to lose a website that has consumed so much of your time, dedication, and money.
It could be even worse than that, especially if your website is generating income. You can lose it all simply because of a malicious hacker or because you installed a faulty add-on, plus a number of other reasons — such is life sometimes.
On the bright side, all that can be prevented by learning how to backup your WordPress site, and doing so regularly. In this article, we cover the basics of backing up WordPress so keep reading and you’ll have your content safely stored in minutes.
If you are not familiarized with the concept of backing up, we’ll explain it as simply as possible. When something happens to cause your site to become inaccessible, you won’t be able to get a hold on your content unless you’ve created a duplicate version of all your work.
This duplicate version contains your website’s theme, the site files you used (add-ons), as well as all the data behind it (posts, users, comments).
A WordPress backup should be done regularly, and especially right before you make any big changes to your site. If something goes wrong when you make the change, you can simply revert your site to its previous state by restoring the backup files.
The causes behind having your website compromised are numerous and include:
A normal WordPress website is composed of a few basic files. According to the WordPress documentation provided by the developers, these components are present on all sites:
All these files are required to make your WordPress website work. When one missing or becomes unusable, your whole site or at least a big part of it will fail to load.
A WordPress website’s database includes the data generated by the site, as well as all the posts that you’ve published, but nothing more. Backing up the database alone doesn’t mean that your website is safe.
You need to back up every single core file of WordPress to get everything back once you reupload them. The database is responsible for storing plugin and theme settings, widgets, sidebar content, and user accounts.
Learning how to backup a WordPress site can be very easy if you use a plugin. To name a few, you can use:
This is one of the most popular WordPress backup plugins out there. Currently, around 2 million websites are backed up via Updraft Plus. It has the simplest interface out of all plugins listed here, but it’s powerful enough to respect all your needs and expectations.
It backs up your website automatically, without affecting your website load speed.
If you want to deep further into the subject, you can Backup WordPress to Google Drive easily as well.
This plugin can’t easily be compared with Updraft Plus. The aforementioned plugin is the simplest option you have, but Jetpack Backups is the real deal. It brings some additional security features to the table that helps give you total peace of mind.
It’s hard to pass this one up, though it does have one downside — it works as a separate dashboard and you’ll have to move from that one to your site for making each and every change.
BackupBuddy is one of the most expensive WordPress backup plugins out there, so be prepared to drop at least$80 per year on it. It’s not cheap, but it’s a competent plugin that gets the job done professionally. Don’t be too quick to jump on the BackupBuddy bandwagon, however, as some of the free plugins may be more suitable for simple backup operations.
Of course, BackupBuddy comes equipped with a few functionalities that you won’t find in other plugins. Especially notable is the ability to backup your site directly to a hard disk or other external service devices or services (Dropbox, FTP, etc.).
It’s a good choice for those who really care about their site’s security and want every file stored and ready for reuploading in the eventuality of an unfortunate event.
Another complete WordPress backup plugin, BackWPup can save your files to a remote location of your preference. You can choose between Amazon S3, Dropbox, and other cloud storage providers.
Why is this convenient? Because you’ll have the files whenever, by simply accessing your cloud account. If you decide to pay for the premium version, you’ll get access to Google Drive and Amazon Glacier.
Duplicator currently has no less than 1 million active installs. Isn’t that crazy? This happened because Duplicator is much more than a simple backup plugin. It helps you clone your website entirely and move it to a different location all with one plugin.
It’s a powerful backup solution, but it can also be used by those who want to replicate their websites and tweak them for another purpose.
To backup your WordPress site easily without spending a fortune on it, use this plugin. It’s easy to use and it doesn’t involve a long configuration process. When you activate it, you’ll get the backup files in an instant.
Once you get your files, it’s your job to store them safely and in multiple locations.
If you’re brave enough, you can learn how to backup WordPress on your own, without the help of a plugin. We’ve selected the best tips and wrote a tutorial below:
Download the entire WordPress directory by logging in to your server using cPanel or an SFTP program. Once you’ve done that, it’s time to use the command-line to backup your database. Even though it’s not the easiest task in the world, you’ll get a good grip on it after a while.
Mysqldump is a command-line client that can generate a .sql file after inserting a few commands. To access it, log in to your server with SSH:
You will need some details of your WordPress database: its name and the user credentials for that database. If you don’t know these, refer to the “wp-config.php” file. Here’s how it should look:
/** The name of the database for WordPress */ define('DB_NAME', 'my_db_name'); /** MySQL database username */ define('DB_USER', 'my_db_user'); /** MySQL database password */ define('DB_PASSWORD', 'my_db_password');
Then, run the mysqldump command to have your files generated:
mysqldump -u my_db_user -p my_db_name> /path/to/save/backup_file.sql
You can now find the file in the specified location (pay attention to where you save it). In this case is /path/to/save/backup_file_sql. You can use your FTP client for grabbing the file, using this local command line:
And that’s about it! You just learned how to backup WordPress manually. It is more complicated, but after you do it once or twice you’ll remember the process easily. Remember to repeat the steps whenever you are planning a chance and every other couple of months.
You might be wondering how often you should back your website up, and the best answer is that you do it as often as you think is safe. If your website is very important and you fear losing it because of various errors, it’s best to back it up as often as possible, perhaps daily or weekly.
Be careful to replace the files in the backup destination with the new ones and re-upload the correct ones when putting your website back together. Ensure that you set up a regular schedule for backing up or simply use a plugin that does the job for you automatically.
Free cheat sheets available
Subscribe to download a set of cheat sheets for CSS, JS, and HTML
You'll receive an email with the cheat sheets in an instant.