How to Back up a WordPress Website

Those who have experienced losing their WordPress site would be relieved that there is a way to easily restore it by creating a backup. Many may have experienced losing a WordPress site when a malicious hacker attacked, or after installing a faulty add-on, theme or plugin; or maybe a playful dog nibbled the server or the hosting experienced failure. Whatever the reason for the loss, it is definitely scary losing a site and it is good that there is a way to back it up and restore it.

Backing up a WordPress website is pretty easy, more of restoring it. Just a click of a button and the site is back to its former glory.
Components of a WordPress site

A full WordPress backup is simply a copy of the website which can be reinstalled or restored if something goes wrong.  It protects all the effort, time and other resources invested in making the site. The WordPress site has two components: the files and the MySQL database.

The files include the themes, plugins, media, scripts and others while the MySQL database saves the blog posts, comments and the options set in the admin area. Some backup offerings by web hosts are just partial backups which they do with the MySQL database only. A backup should be complete with all files. 

Back up  files

The WordPress directory has sub-folders like wp-content and wp-includes, as well as files like wp-config.php. Inside the wp-content are plugins, uploads, cache and themes among other things while the wp-admin has files needed by the WordPress admin. Wp-includes keeps the WordPress core files and where all the major code lives. All of these are important files that need to be backed up.

To create a copy of these subdirectories and files, one needs to download the entire WordPress directory. To do that, the user can login to the server through the cPanel, or use an FTP program like Transmit or FileZilla.

 

Backup files using cPanel

Using cPanel to backup the WordPress site is easy. The procedures are as follows:

  1. Login to the web host and go to cPanel
  2. Go to File Manager which leads to the public_html or Home directory
  3. Look for the WordPress directory, the folder to be backed up
  4. Compress the folder since downloading a non-compressed folder in File Manager is not possible. Compression can be done by clicking on the WordPress directory and select Compress from the menu bar.
  5. One can choose the ZIP archive as a compression type
  6. Hitting the Compress File(s) button will start the compression process
  7. Click on the created archive and choose Download
  8. Save it on the hard disk, Dropbox, Google Drive or to a DVD/CD and make several copies of it

Back up files using FTP

  1. When using FileZilla, one has to login to the server with his FTP account which can be setup in the FTP manager under cPanel
  2. Locate the WordPress directory
  3. Download the files to the hard disk

Back up the WordPress database

  1. Go to cPanel and look for phpMyAdmin usually inside Database Tools
  2. When in phpMyAdmin administration panel:
    1. Click on the Databases tab to list the databases. To know the right database to work with, one can go to File Manager, WordPress directory, look for the wp-config.php file, right-click and view. Look for the line “define(‘DB_NAME’, ‘database_name’).” Take note of the database name contained in the position of ‘database_name.’
    2. Locate the database under phpMyAdmin and open it and the tables will show
  • Click “check all”
  1. Hit the Export tab, select the export method and set format to SQL
  2. Hit the Go button
  3. Save the database on the hard disk

Backup using BackupBuddy WordPress plugin

  • Download and install BackupBuddy
  • Activate from the plugins dashboard
  • Configure BackupBuddy by going to the settings page for BackupBuddy in the WordPress dashboard. Do two things – choose a password for ImportBuddy under General Options, then give an email address where notifications should be sent
  • In BackupBuddy Settings, set up off-site backups with BackupBuddy Stash as the remote destination
  • Click on Remote Destinations from the BackupBuddy menu and choose Add destination
  • Click Backup from the BackupBuddy menu. Choose Complete BackUp
  • When done, download the backup file and send to a remote destination