Stay up to date with our newest WordPress themes, WordPress plugins, WordPress tutorials, and other announcements.
This should really go without saying, but backing up your any website (not just a WordPress site) on a regular basis is extremely important. Although a lot of web hosts may offer free backups, it is still your responsibility to keep recent backups yourself, preferably hosted on a local hard drive. So many things can go wrong, I’m not going to get into specifics. In this tutorial I’ll go over several methods of backing up your WordPress sites.
- The difference of a database backup and a “full” backup
- How to manually backup your WordPress database
- How to manually backup your WordPress files
- How to backup your WordPress site with WordPress plugins
If you want to have peace of mind and start taking backups regularly, read on to learn how.
Database Backup vs. Full Backup
WordPress is run on a MySQL database. This is what stores all of your blog posts, all of your pages, all of your links, and all of your settings (blog name, description, etc.). Backing up this database on a regular basis is very important, especially if you frequently publish content.
The full backup consists of this database, plus all of your site files. This includes all of your WordPress core files, the admin panel, your themes, your plugins, and other media – like images or video. Depending on the function of your site, this may or may not be as important as a database backup.
Manual Database Backup
Manually backing up your database involves logging into your web host control panel (like cPanel) and accessing your database through phpMyAdmin. Once inside phpMyAdmin, select your database, and navigate over to the Export tab. You should be on a page that looks something like this:
Once you’re on this page, scroll down, check the “Save as file” box, and go. You should be prompted to download a file. This is your database dump. Keep it in a safe place.
Manual Directory Backup
Now that you have your database dump, you’ll need to save the rest of your files. In most cases, the contents of the /wp-content/ directory is everything you need to back up. This includes your plugins, your theme, and your uploads. In case you have additional files outside of that directory or additional modifications to WordPress core files, it may be a good idea to backup the whole thing. You may have an area in your control panel to download a backup. In cPanel, the backup screen looks like this:
In fact, on this page, not only can you download a home directory backup, but a database backup, and a full/complete backup.
WordPress Backup Plugins
If you don’t feel comfortable in phpMyAdmin or cPanel, there are plugins available to take backups for you. These plugins can also schedule backups for you, and store them in a secure location on your server – or send an e-mail attachment with the backup files (assuming it’s a small site).
WordPress Database Backup
The WP-DB-Backup plugin is a great addon that will enable you to create database backups directly from your WordPress admin panel – without having to go into phpMyAdmin or cPanel. You can download the plugin over at WordPress.org. Please learn how to install a plugin if you don’t know already.
It recognizes all the core tables and backs those up automatically. You can select any additional tables if there are any present.
You can schedule your database backups here. These are automatically e-mailed to you at the selected time intervals. Databases are usually not too large (unless you have a lot of content) so they can be delivered via e-mail with ease.
Just a word of caution before installing – this plugin may have compatibility issues with your host. If you notice any fatal error messages, it’s best to completely remove this plugin from your site, which includes deleting the directory – not just deactivation.
Once you have made the initial configurations (and the plugin is compatible with your host), you can start making backups. In Advanced Mode you can choose to take either an SQL (database) backup, or full backup.
In the options menu you can also configure how many backups you want to store, schedule backups and (optional) have them sent via e-mail. Since this backs up all the files in your WordPress directory, you can also set to exclude certain files or directories.
Now you know how to backup your WordPress site. The manual methods can be used on any sort of site, not just WordPress – so hopefully you can put these tips to good use on all your websites. Please backup on a regular basis, weekly at the very least. With the tools and plugins provided in this guide, you shouldn’t have any excuse not to. Many unexpected things can happen with your site, and a recent backup can prove very handy in a time of website crisis.
That’s it. If you liked it, feel free to comment and share the article. Everyone should know how to backup their sites (WordPress or not). Thanks for reading.