Keeping a safe backup is an important step to website security

Glow in the dark wordpress logo

We back up our computer files all the time for our peace of mind. Shouldn't we be doing the same for a WordPress site? After all, some untoward incident may happen to your WordPress website such as getting hacked or installing a faulty plugin, add-on, or theme. While it may seem like a lot of work, backing up a WordPress site isn't rocket science — it is doable and we're here to walk you through the steps on how to backup a WordPress site on your own.

What Does Backing Up a Site Mean?

man using wordpress for his work

Image by StockSnap from Pixabay

In order to understand the process of how to backup a WordPress site, you must first grasp the concept of backing up and its importance in the scheme of things.

Backing up a site simply means saving a copy of your existing website which includes your website's theme, database, and other related site files. Why the need? Because having a backup gives you the opportunity to reinstall or restore your website in case something goes wrong.

In order to do a backup of your website efficiently, you need to do a full one. Your website is made up of two vital components: the files (such as the theme, plug-ins, media, scripts and others) which pretty much makes up the structure and content of your website, and the MySQL database which contains your blog posts, comments, and other options which you've set up in your WordPress admin.

Your files and content are an integral part of your website and no web host will actually do a backup of them. The most a web host can do is to do a backup of your MySQL database. Therefore, it is important to back up your WordPress files so you will have a shot at reinstalling them in case the current and existing files in your website get corrupted.

This doesn't mean you should neglect backing up your MySQL database — leaving that to the hands of the web host and relying on them solely to hand it to you might end up being more of a hassle than what it's worth. Always do a full backup because it takes care of all your files and database.

Make it a habit to back up using various media, to be on the (extra) safe side. For WordPress websites, there are two ways to do a backup — you can do one using a plugin or you may also do it manually.

WordPress Files That Need Backing Up

WP Dashboard

Photo by Web Hosting on Unsplash

So how do you know what constitutes a full backup? Let's take a look at the components which constitute your WordPress files.

  • ​Core installation
  • ​Plug-ins
  • ​Themes
  • ​Images and files
  • ​PHP and JavaScript
  • ​Code files
  • ​Additional files
  • Static web pages

WordPress Databases That Need Backing Up

CPanel

Photo by Web Hosting on Unsplash

As we've previously stated, backing up your MySQL database equally as crucial because it contains vital website information that you will need in order to create an exact duplicate of your site. This website information includes:

  • ​Blog posts
  • ​Pages
  • ​Users
  • ​Comments
  • ​Categories
  • ​. Tags

How to Back Up a WordPress Site With a Plugin

​There are several plugins online that allow you to back up your WordPress site, but most would require installation. Knowing how to back up a WordPress site using plugins is relatively faster and easier than doing a manual backup. ​

    UpdraftPlus

    ​UpdraftPlus is one of the highest-ranking scheduled backup plugins — with over 2 million active users. This plugin allows you to back up and restore both your files and database into the cloud with just a single click. You can store your backups in Dropbox, Google Drive, Amazon S3, Rackspace Cloud, DreamObjects, OpenStack Swift, UpDraft Vault, an FTP, even in your email. UpdraftPlus can be used for manually backing up your files and database as well as scheduled automatic backups. To use UpdraftPlus, you will need to do the following:

    1. Install UpdraftPlus

    2. Set Up the Plugin

    3. Do a Manual Backup

    4. Create an Automatic Backup Schedule

    5. Pick a Remote Storage Location

    6. Restore Backups

      WordPress Backup to Dropbox

      ​If you have an existing Dropbox account, then this free plugin would prove beneficial. Simply install the plugin, set up a schedule, and then authenticate your Dropbox account.

        BackWPup

        ​Another free WordPress plugin, BackWPup creates complete backups of your WordPress site while saving them in a remote storage location such as:

        • Dropbox
        • Amazon S3
        • FTP
        • RackSpace Cloud
        • Others

        Schedule full backups with the BackWPup to ensure that your files and database are always updated. Check, repair, or optimize your database as needed. For additional features and tools, you can upgrade to the BackWPup Pro Version that comes with an annual subscription fee in various prices.

          Duplicator

          Duplicator is another free WordPress plugin which not only allows you to do backups but also helps you easily clone or migrate your site to another location. This plugin also automatically stores your database to an SQL file and saves it to a ZIP archive with your other WordPress files. A special PHP file is created to let you reinstall the backup with no frills.


          The Duplicator Pro provides more features (i.e. scheduled backups, email notifications, pro support, cloud storage linking, etc.) but requires an annual subscription fee.

            VaultPress

            ​Created by Automattic, VaultPress allows you to back up and secure your website easily because it takes automatic daily backups then stores them securely offsite. Restoring your website only requires logging into your account and clicking on a button. You can avail yourself of this plugin by connecting it with your WordPress account. Use your WordPress account to log in to VaultPress where you will be redirected to the VaultPress dashboard. However, VaultPress is not a free service and comes with a monthly subscription.

              BackupBuddy

              ​BackupBuddy is another premium backup plugin that you can use for WordPress sites. Created by iThemes, BackupBuddyis capable of creating a full database and files backup. It can also move your site to another server without much hassle. This plugin allows you to store your backups on your hard disk or in remote storage locations such as

                • Amazon Web Services
                • Rackspace
                • FTP
                • Dropbox
                • BackupBuddy Stash
                • Email

                BackupBuddy requires an annual subscription fee — ranging from a low-cost single site license to a lifetime Gold package which provides unlimited use of the plugin.

                How to Back Up a WordPress Site Manually

                What if you opt to back up your WordPress site without the plugins? There are methods for how to backup a WordPress site manually. Here are some methods you can use when downloading your WordPress directory (files) and your MySQL database manually.

                Using the cPanel Method

                ​You can use cPanel to back up both your WordPress directory (files) and your database.

                  To Back Up Your WordPress Directory

                  ​You can use cPanel to back up both your WordPress directory (files) and your database.

                  • Log in to your web host.
                  • Navigate to the cPanel (Note: This is usually the first page you'll see after logging in).
                  • Go to File Manager and look for public_html or the Home directory
                  • Look for your WordPress directory
                  • Click on your WordPress directory then select “Compress” on the menu bar. You may also right-click on the WordPress directory folder and choose Compress from the drop-down options.
                  • Choose your preferred compression type from the dialog box.
                  • Click on the Compress File(s) button.
                  • Click on the archive that was created then choose Download from the menu. You may also right-click on the archive then click on Download.
                  • Save the backup to your hard disk.
                  • You may also save another copy (or copies) of your backup by uploading it to Dropbox or Google Drive, or to an external hard drive.

                  To Back Up Your WordPress Database

                  ​You can use cPanel to back up both your WordPress directory (files) and your database.

                  • Go to cPanel (Note: You will need to know your site's database. To retrieve this information, go to “Files Manager” then open wp-config.php. The database name will be shown in that file.)
                  • Look for “phpMyAdmin” in cPanel
                  • Go to your database and click “Export.”
                  • Customize the following on the Export settings page: Set backup file type to GZIP or ZIP and set “Max Length of Created Query” to zero to prevent truncation of queries.
                  • Click on “Go.”
                  • Upload the file to your remote storage location.

                  Using the SFTP Method

                  ​Another option you can use is SFTP, but this is only for backing up your WordPress files. To back up your WordPress database, use “phpMyAdmin” as indicated above.

                  To Back Up Your WordPress Directory

                  • Install a file manager application (we recommend Filezilla or Transmit) into your computer.
                  • Retrieve your SFTP login credentials from your hosting account.
                  • Log in to the file manager you've chosen.
                  • Enter the necessary details for your website (i.e. nickname, website URL, unique SFTP username and password).
                  • Change the port number to 2222 on the field.
                  • When you see your WordPress files, select all then right-click and choose “Download Selected Items.”
                  • After downloading, label your backup file.

                  Conclusion

                  Knowing how to backup a WordPress site (whether with a plug-in or manually) is an important and indispensable skill to have when it comes to maintaining your WordPress site.

                  However, maintaining your website is not just a matter of backing it up regularly, you also need to have security measures in place to ensure that your website will work optimally.

                  Some of these necessary security measures include:

                  • Updating themes and plug-ins
                  • Changing your password from time to time for security purposes
                  • Creating strong prefixes for your database table

                  Learning how to backup a WordPress site is not at all complicated. Just follow the step-by-step guide we've provided so you can breathe easy knowing that you have the necessary tools and files at hand whenever you need to restore your website.

                  Featured Image by Naji Habib from Pixabay

                  Leave a Reply

                  Your email address will not be published. Required fields are marked *