Have you ever heard the expression “Hope for the best, but prepare for the worst?”
WordPress powers almost a third of the internet, as it is the most popular content management system available today. It is easy to use, has a ton of plugins, even more features, and is highly customizable.
But like any website, your WordPress sites are vulnerable to hacking, malware, and even simple mistakes, which can lead to data loss. That’s why it’s essential to have a backup of your site.
This blog post will cover everything you need to know about WordPress backups: what they are, why you need them, and how to create them.
What is a WordPress Backup?
Let’s start with the basics. A WordPress backup is an exact copy of your WordPress site. This includes your database (including your content, posts, pages, comments, etc.) and your files (including themes and plugins).
Creating a WordPress backup is essential because it gives you the ability to restore your site if something goes wrong. For example, if your site is hacked, you can restore your backup and be up and running again in no time.
There are two main components to a WordPress backup: your database and your files.
First is the database. WordPress uses MySQL, a relational database management system (RDBMS). In other words, your WordPress database contains all your content, posts, pages, comments, etc., in separate tables.
MySQL is the most popular database system globally, so WordPress uses it. And because it’s so popular, there are many different ways to backup your MySQL database.
The rest of your WordPress files are installed on your server. They include your WordPress themes, plugins, and media files, such as images and videos.
Together, these two components make up the entirety of your WordPress site. In other words, if you have a backup of both your database and your files, you have a complete backup of your WordPress site.
How Does It Work?
When you backup your WordPress site, you create a duplicate of it, which can be done manually or automatically. In a complete or partial data loss, uploading the backup and restoring your website to its former glory becomes possible.
Ideally, a backup should enable you to minimize disruptions caused by the data loss in question. Your customer or client experience should not be compromised, as the user should not be able to tell that a problem has even occurred.
Why Do You Need a Backup?
Many amateur website owners mistake treating backups as unimportant, but it should be one of the first things you do during development. Why? The best way to understand is to look at some examples of why you might need to restore your WordPress backup.
As hackers become more and more sophisticated, it’s becoming increasingly important to have a WordPress backup. If your site is hacked, you can restore your most recent backup and be up and running again in no time.
Malware is software designed to damage or disable computers and computer systems. In other words, it’s a type of virus. And like any virus, it can spread quickly and do a lot of damage.
3. Simple Mistakes
We all make mistakes. And while some errors are harmless, others can have serious consequences. For example, let’s say you try to make a change to your theme, but you accidentally delete some crucial files. If you don’t have a backup, you could lose all of your theme’s customization. But if you do have a backup, you can restore it and be back to where you started.
4. Power Outages
Power outages are relatively common, especially during severe weather. And while they don’t usually last very long, they can still cause problems for your WordPress site. For example, if a power outage occurs while you’re in the middle of making changes to your site, those changes could be lost when the power comes back on. But if you have a backup, you can restore it and pick up where you left off.
5. Unexpected Downtime
Even if you take all the necessary precautions, there’s always a chance something could go wrong with your server or hosting account. If this happens, your WordPress site will likely go down as well.
Web service providers are usually pretty good about getting things back up and running as quickly as possible. But depending on the severity of the problem, your site could be down for a while. And if you don’t have a backup, all of your hard work could be lost.
6. Site Migration
If you ever need to migrate your WordPress site to a new domain or host, having a backup will make the process a lot easier. You can restore your backup on the new server, and you’ll be good to go.
Migrations can also be helpful if you ever need to move your WordPress site from a development environment to a live server.
7. Data Loss
Last but not least, backups can also help you recover from data loss. This can happen for several reasons, such as accidental deletion, hardware failure, or even software glitches.
If your company deals with sensitive data, it’s essential to have a backup.
How to Backup Your WordPress Site
As you can see, there are just too many ways you could lose valuable data. Backing up your WordPress site is a must. Now, let’s move on to how you can create a backup of your WordPress site.
There are a few ways to do this, both manually or automatically. Let’s take a look at these methods.
Backup Your WordPress Site Through Your Hosting
The first way to backup your WordPress site is by using your web hosting account. This method is usually the easiest, as most hosts will provide a backup tool. For example, if you’re using cPanel, you can use the Backup Wizard tool to create a full backup of your WordPress site.
You can choose to download a Full Backup or Partial Backup of your WordPress site. A Full Backup will include your website’s files and databases, while a Partial Backup will only include your website’s databases or files.
Once you’ve selected it, click on the “Generate Backup” button, and your backup will begin downloading to your computer.
Backing Up WordPress Manually
If you can’t use your web hosting account to create a backup, you can also do it manually. This method is more time-consuming, but it’s still relatively easy.
If using cPanel, here are the steps:
- Login to your hosting account’s cPanel dashboard and click on the “File Manager” icon.
- Click on the “Web Root (public_html/www)” option and then check the box next to the “Show Hidden Files (dotfiles)” option. Click on the “Go” button to continue.
- Find your WordPress Directory and open it. You should see a list of files and folders.
- Click on the “Select All” button at the top of the page and click on the “Compress” icon from the toolbar.
- A pop-up window will appear asking you to choose a compression method. Select the “Zip Archive” option and then click on the “Compress File(s)” button.
- Your WordPress site is now being compressed into a ZIP file. This may take a few minutes, depending on the size of your site. Once it’s finished, you’ll see a new ZIP file in your WordPress directory.
- You can now download this ZIP file to your computer for safekeeping. To do this, right-click on the file and select the “Download” option.
Alternatively, you can use an SFTP program. SFTP is a protocol that allows you to transfer files between your computer and your hosting account securely. If you’re using WordPress on a Windows computer, we recommend using the free FileZilla SFTP Client. If you’re using WordPress on a Mac, you can use the free Cyberduck SFTP Client.
Here are the steps:
- First, install the application of your choice on your computer. Then, open the program and click on the “Site Manager” option.
- In the “Site Manager” window, click on the “New Site” button and enter the following information:
- Host: Your domain name or server IP address
- Port: 2222
- Protocol: SFTP – SSH File Transfer Protocol
- Logon Type: Normal
- User: Your hosting account username
- Password: Your hosting account password
- Click on the “Connect” button, and you should now be connected to your hosting account.
- Find your WordPress Directory and open it. You should see a list of files and folders.
- Click on the “Select All” button at the top of the page and click on the “Download” button from the toolbar.
- A new window will appear asking you where you want to save the ZIP file on your computer. Choose a location and then click on the “OK” button.
- Your WordPress site is now being downloaded as a ZIP file to your computer. This may take a few minutes, depending on the size of your site. Once it’s finished, you’ll see the ZIP file in your selected location.
Note that both methods may vary depending on your web host and software. However, the basic process should be the same. You want to log into the backend of your account, find your WordPress files, and compress them into a ZIP file.
Backing Up Your Database
The methods mentioned above will only backup your WordPress files. If you want to backup your entire WordPress site, you’ll need to include your database in the backup.
Fortunately, backing up your database is relatively easy to do. In most cases, you can do it right from within your web hosting account’s dashboard. What you need to find is phpMyAdmin, which is a tool used for managing MySQL databases.
If you’re using cPanel, here are the steps:
- Login to your hosting account’s cPanel dashboard and click on the “phpMyAdmin” icon.
- In the left-hand column of phpMyAdmin, click on your WordPress database. If you don’t know your database name, you can find it in the
wp-config.phpfile located in your WordPress directory.
- Click on the “Export” tab at the top of the page.
- Select the “Quick” export method and click on the “Go” button on the next page.
Your WordPress database will start downloading to your computer as an SQL file. Once it’s finished, you can save this file to your local drive.
Putting It All Together
Now that your WordPress files and database are backed up, it’s time to put everything together. The easiest way to do this is to compress both the ZIP file and SQL file into a single ZIP file. That will make downloading and transferring your backup much more manageable.
To do this, select both files and right-click on them. Then, select the “Compress” option from the menu.
If you ever need to restore your WordPress site, all you need to do is follow these steps in reverse. First, you’ll uncompress the ZIP file and upload the WordPress files and database to your web server.
Keep in mind that restoring a WordPress backup is more complicated than creating one. If you’re not comfortable with doing it yourself, we recommend reaching out to your web host or a WordPress developer for help.
Backing Up WordPress Automatically
As you can see, backing up your WordPress site manually can be a bit of a hassle. The easiest way to complete this crucial task is to use a plugin. A WordPress backup plugin will create a compressed ZIP file of your entire site and store it in a safe location, usually on your server or in the cloud.
Many different WordPress backup plugins are available, each with its features. However, they all essentially perform the same task: automatically backing up your WordPress site. This functionality is usually available in both free and premium versions.
Some of the more popular WordPress backup plugins include:
Jetpack + VaultPress
If you use WordPress.com, then you’re probably already familiar with Jetpack. This plugin is developed by WordPress.com and is available for free to all WordPress.org users.
In addition to its vast array of features, Jetpack also includes a site backup tool called VaultPress. This premium service starts at $4.95 per month and can be used to back up your WordPress site in real-time automatically.
VaultPress will save your backups in the cloud (either on WordPress.com servers or on Amazon S3) and can even email you if it detects any security threats on your site.
BackupBuddy is a popular WordPress backup plugin developed by iThemes. It starts at only $52 per year (or from us for only $4.99) for blogging sites and goes up depending on the size of your database.
BackupBuddy also includes a “Database Reset” feature, allowing you to reset your WordPress database effortlessly with just a few clicks. This can come in handy if your website is ever hacked or compromised.
UpdraftPlus is a free WordPress backup plugin with over 2 million active installations. It can automatically back up your WordPress site to various locations, including your server, Amazon S3, Dropbox, Google Drive, SFTP, and email.
UpdraftPlus also includes a “Restore” feature which allows you to quickly restore your WordPress site from a backup with just a few clicks. This can come in handy if your website is ever hacked or compromised.
While UpdraftPlus is an excellent option for backing up your WordPress site, keep in mind that it’s also the priciest. With basic fees of $70 (or from us for only $4.99), only those with more significant or multiple sites should start with this.
How Often Should You Back Up Your WordPress Site?
The great thing about WordPress backup plugins is that they can be configured to back up your WordPress site on a schedule automatically. For example, you can set it to create a new backup every day, week, or month.
The frequency with which you should backup your WordPress site will depend on how often you update it. If you regularly publish new blog posts or update your Woocommerce products, you’ll want to back up your WordPress site daily.
On the other hand, if you rarely update your WordPress site, then you can get away with backing it up monthly.
Backing up your WordPress site is an integral part of website maintenance. You can rest assured knowing that you can quickly restore your website if something goes wrong.
While you can back up your WordPress site manually, a plugin is the easiest way to do it. Many different WordPress backup plugins are available, each with its features. However, they all essentially perform the same task: automatically backing up your WordPress site.
Contact us if you need help backing up your WordPress site. Our experts can help you choose the right backup solution for your needs and ensure that your website is adequately backed up.