Have you ever thought what it would be like losing your WordPress site? Let me make things scarier for you (this is the only time I’ll be doing this) – Having lost your WordPress site, you have no clue how to restore it…!! Sounds like a nightmare for someone with a love of blogging with WordPress. So, what is that one thing that would end your nightmare?
The answer is backup. And I am here to take you through a detailed tutorial, where you can see creating a backup for your WordPress site is easy.
What is a backup?
If you’re a beginner, you might probably want this question to be answered first. So, before we start backing up our WordPress site, let’s be clear on what a backup is. Backup involves creating a copy of your site and storing it someplace secure, from where you could restore your site, in case something goes wrong. A backup of your site comes handy in cases where worse things happen with your business site, and things are about to go down.
How do I backup my WordPress site?
Here comes the interesting part. There are two ways to backup your WordPress site.
#2 Using Plugins
Though I prefer backing up my WordPress site manually, in this tutorial I will show you how to backup your WordPress site manually and using plugins. Before we get to the actual thing, let me you tell a few things about your WordPress site.
A WordPress site has two parts. First, there are themes which are the actual design of your site. They are responsible for the way your site looks and functions. If you are someone who likes updating the themes and editing the stylesheets, then you got to create a backup for your themes. Second comes the most important part, being the MySQL database. This database contains your post, comments, and pages. In this tutorial, I will show you how to backup your files and your database. Let’s dive into these simple yet effective ways to backup your WordPress.
How to backup WordPress files manually?
If you browse through your WordPress directory (which I’ll be explaining next), you’ll find files like wp-config, plugins, and sub-folders like wp-admin, wp-content, wp-include. These folders/sub-folders contain the much-required data like themes, plugins, core files, code of your WordPress site. Losing the valuable and required data for proper functioning is not what you want. To backup these WordPress files, you need to get the entire WordPress downloaded to your computer. There are two ways to do this:
- Via cPanel
- FTP client such as FileZilla.
Creating a backup via cPanel
- Login to your hosting server and enter your cPanel.
- In the cPanel, click on File Manager.
Here’s a snapshot (will be using more of these for you to get a clear picture):
- Click or double click (again, depending on your host) File Manager, and navigate to the index.
- Here, you see a directory named “public_html”. This is where all your site data resides. When someone visits your site, what they see on your site, is the data that is stored in this file folder.
- Double click this folder and open it to find all your WordPress files.
- Here you can find all the files and sub-folders like wp-admin, wp-content, wp-includes. As I told earlier, you don’t want to lose these files. So, what do we do? We simply download these files.
- Choose the folder you wish to download and click on download, which is on the left top of this current window. The best way to download all the WordPress files is to choose the directory containing the files, and click download. That way you could download all the files at once, without having to choose one by one.
And that’s how you create a backup of your WordPress files.
Backup WordPress files using FTP
This is the simplest and efficient way to backup WordPress files. Things you will need:
- An FTP client ( Here I have used FileZilla)
- An FTP account
Download FileZilla, and get your FTP account details from your cPanel. Once you have installed FileZilla, here is what you need to do:
- In your cPanel, under the title “Files”, there is “FTP details”. Navigate there to get your FTP details, like Host, username, password.
- Once you have the required FTP details, you are all set to login to your server, to browse through your WordPress files.
- This is what you see when your connection to the server is established. There are two parts here, on the left, the local site (your computer) and to the right, the remote site (your WordPress site). Under the local site bar, you can choose the directory to upload files from or to download files to. Whereas, on the right side of your screen, under the remote site bar, you can view all the directories and files on your site.
- If you wish to download all the files and folders in the public_html directory, just right click on the directory and choose download. If you would like to download specific files from your WordPress directory, double click public_html and navigate to your WordPress directory.
- As you see, I have selected the files that I wish to create a backup for. Before you hit download, specify the target directory on your computer, where the backup is to be stored.
- Here’s how I chose the location for the backup file to be downloaded to.
- Next, right click the files you have selected from your WordPress directory and click download.
That’s how easy it is to backup your WordPress files using FileZilla.
Let’s now move toward the most important part of your WordPress site, the database. It’s time to backup our WordPress database.
Backing up WordPress database
When you learn how to backup your database manually, you will find backing up your WordPress site easy.
- If you’re still logged in to your web host, just navigate to your cPanel. There, in the Advanced sub-head, locate phpMyadmin and log in.
- Once you’ve logged in, you will find all the databases. Choose your WordPress database and login with that database’s password.
- Here I have only one database, which is my WordPress site’s database.
- The database contains tables like wp_posts, wp_comments, etc. All the posts, comments, data related to admin area are stored in these tables. Losing this data will be a nightmare, for the heart of your WordPress site resides in these tables. Backing them up must be a high priority thing.
- Select all the tables and click export. This will lead to you to the following page.
- You can choose from either of the two export methods. The custom method provides more options to choose your output format. You can compress the output to a zip file using this method. Select the SQL format and hit GO.
- Your backup is downloaded, and then you should extract your database file to the folder containing you WordPress files.
This was all about backing up your WordPress site manually. And before we move further, here’s a thing to remember after creating the backup.
- Do upload your backup (database and themes) to Dropbox, email, or Google drive to have extra copies. In case a backup on your computer is lost, you could restore your site from the backup stored in your Dropbox account.
Backup using plugins
Plugins are not always reliable as some of them usually backup only the database. So you must find a plugin that backs up both WordPress files and database. Here, in this tutorial I will be using the standard plugin for security, i.e. Backup and Export. I’ve chosen this basic plugin so that even if you are a complete newbie to WordPress site and its plugins, you will easily follow the steps and “do-it-yourself”, as I said at the start.
- Log in to your WordPress site, and navigate to Settings.
- Here, you can find Export on the right-most top. Navigate to Export.
- There is an Export All button. You could just hit this button and download the backup, or you could select specific files that you wish to create a backup for.
- Once you hit the Export button, the backup file is exported, and the download link is sent to your mail. Go to your email, download the backup using the link or, click download, right next to the notification stating successful export. Here’s a snapshot of a clear picture.
There you go. You just backed up your WordPress site using a plugin. Backups are a very reliable tool to restore your lost WordPress site, thus keeping your business from going down.
I hope now you have a clear idea about backups and why they are necessary for your WordPress site and different ways to backup your WordPress site. Try these methods and tell us which one is your favourite. Share this tutorial with someone who needs to backup their WordPress site and are having a hard time doing it. Chao!