Backing Up Your Online WordPress Site – Some Resources

Everyone needs to back up the database and wp-content file of their online wordpress site to their local computer and to the cloud so that you or your consultant can rebuild or move the website if the need arises.

______________________________________________________________

1. The following excerpts are from Backing Up Your WordPress Site from WordPress.org:

Note: Want to skip the hard stuff? Skip to Automated Solutions such as WordPress Plugins for backups.

Your WordPress database contains every post, every comment and every link you have on your blog. If your database gets erased or corrupted, you stand to lose everything you have written. There are many reasons why this could happen and not all are things you can control. With a proper backup of your WordPress database and files, you can quickly restore things back to normal.

Instructions to back up your WordPress site include:

  1. WordPress Site and your WordPress Database
  2. Automatic WordPress backup options

In addition, support is provided online at the WordPress Support Forum to help you through the process.

Site backups are essential because problems inevitably occur and you need to be in a position to take action when disaster strikes. Spending a few minutes to make an easy, convenient backup of your database will allow you to spend even more time being creative and productive with your website.

Backup Questions

Back up your database regularly, and always before an upgrade.

How often should you back up?
That depends on how often you blog, how often you want to do this, and how you would feel if your database were lost along with a few posts. It is your decision.
Can you use this method to back up other data?
Yes. Backups are good all around.
How many backups should I keep?
The general rule of thumb is to keep at least three backups and keep them in three different places or forms, like CD/DVDs, different hard drives, a thumbdrive, web disk, your e-mail account, etc. This prevents problems if a single backup becomes corrupted or damaged.
My database backups are huge! Can I do anything about that?
Typically, anti-spam and statistics WordPress Plugins can add large amounts of data and because they are constantly gathering information, the database can swell significantly. When backing up the database, such information is probably not important to keep. Do not mark those tables for backup when selecting them during the backup process.
Can backups be automated?
Yes. There are several methods of automating the backup process available, and we’ve listed some in the Automatic WordPress backup section. However, it is highly recommended that you back up those auto backups with a manual backup once in a while to guarantee that the process is working.
Is there more information on backing up WordPress available?
Yes. See Backup Resources for more information.

Backup Documentation

The following are general documents for helping you to back up and restore your WordPress data.

Backing Up Your WordPress Site

There are two parts to backing up your WordPress site: Database and Files. You need to back up the entire site, and you need to back up your WordPress database. Below are instructions for backing up your WordPress database for various server programs. We will start with backing up the rest of your WordPress site.

Your WordPress site consists of the following:

  1. WordPress Core Installation
  2. WordPress Plugins
  3. WordPress Themes
  4. Images and Files
  5. JavaScript and PHP scripts, and other code files
  6. Additional Files and Static Web Pages

All of these are used in various combinations to generate your website. The database contains your posts and a lot of data generated on your site, but it does not include the above elements that all come together to create the look and information on your site. These need to be saved.

Most hosts back up the entire server, including your site, but it takes time to request a copy of your site from their backups, and a speedy recovery is critical. You need to learn how to back up your own site files and restore them.

Here are some methods to backup your site files:

Website Host Provided Backup Software
Most website hosts provide software to back up your site. Check with your host to find out what services and programs they provide.
Create Sync With Your Site
WinSCP and other programs allow you to sync with your website to keep a mirror copy of the content on your server and hard drive updated. It saves time and makes sure you have the latest files in both places.
Copy Your Files to Your Desktop
Using FTP Clients or UNIX Shell Skills you can copy the files to a folder on your computer. Once there, you can zip or compress them into a zip file to save space, allowing you to keep several versions.

Remember, keep at least three backups on file, just in case one is corrupted or lost, and store them in different places and on different mediums, like CD, DVD, different hard drives, etc.

__________________________________________________________

2. The following are excerpts from Backing Up Your Database from WordPress.org:

Backing Up Your Database

It is strongly recommended that you backup your database at regular intervals and before an upgrade.

Restoring your database from backup is then possible if something goes wrong.

NOTE: Below steps backup core WordPress database that include all your posts, pages and comments, but DO NOT backup the files and folders such as images, theme files on the server. For whole WordPress site backup, refer WordPress Backups.

Backup using cPanel X

cPanel is a popular control panel used by many web hosts. The backup feature can be used to backup your MySQL database. Do not generate a full backup, as these are strictly for archival purposes and cannot be restored via cPanel. Look for ‘Download a MySQL Database Backup’ and click the name of the database. A *.gz file will be downloaded to your local drive.

There is no need to unzip this file to restore it. Using the same cPanel program, browse to the gz file and upload it. Once the upload is complete, the bottom of the browser will indicate dump complete. If you are uploading to a new host, you will need to recreate the database user along with the matching password. If you change the password, make the corresponding change in the wp-config.php file.

Using phpMyAdmin

phpMyAdmin is the name of the program used to manipulate your database.

Information below has been tried and tested using phpMyAdmin version 4.4.13 connects to MySQL version 5.6.28 running on Linux.

phpMyAdmin Top

Quick backup process

When you backup all tables in the WordPress database without compression, you can use simple method. To restore this backup, your new database should not have any tables.

  1. Log into phpMyAdmin on your server
  2. From left side window, select your WordPress database. In this example, the name of database is “wp”.
  3. The right side window will show you all the tables inside your WordPress database.
    Click the ‘Export’ tab on the top set of tabs.

WordPress database view

  1. Ensure that the Quick option is selected, and click ‘Go’ and you should be prompted for a file to download. Save the file to your computer.
    Depending on the database size, this may take a few moments.

Quick Export

Custom backup process

If you want to change default behavior, select Custom backup.

  1. In above Step 4, select Custom option. Detail options are displayed.

Custom Export

  1. The Table section

All the tables in the database are selected.

    • If you have other programs that use the database, then choose only those tables that correspond to your WordPress install. They will be the ones with that start with “wp_” or whatever ‘table_prefix’ you specified in your ‘wp-config.php’ file.
    • If you only have your WordPress blog installed, leave it as is (or click ‘Select All’ if you changed the selection)
  1. The Output section

Select ‘zipped’ or ‘gzipped’ from Compression box to compress the data.

Export Output section

  1. The Format section

Ensure that the SQL is selected. Unlike CSV or other data formats, this option exports a sequence of SQL commands.

  1. The Format-specific options section

Leave options as they are.

phpMyAdmin Export Format Specific

  1. The Object creation options section

Select Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER statement. Before table creation on target database, it will call DROP statement to delete the old existing table if exist.

phpMyAdmin Export Object creation

  1. The Data creation options section

Leave options as they are.

phpMyAdmin Export Data creation

  1. Now click ‘Go’ at the bottom of window and you should be prompted for a file to download. Save the file to your computer.
    Depending on the database size, this may take a few moments.

Remember – you have NOT backed up the files and folders – such as images – but all your posts and comments are now safe.

________________________________________________________

3.The following are excerpts from  Backing Up Your WordPress Files from WordPress.org

Backing Up Your WordPress Files

There are two parts to backing up your WordPress site: Database and Files.

This page talks about Files only; if you need to back up your WordPress database, see the Backing Up Your Database.

Your WordPress site consists of the following files:

  • WordPress Core Installation
  • WordPress Plugins
  • WordPress Themes
  • Images and Files
  • Javascripts, PHP scripts, and other code files
  • Additional Files and Static Web Pages

Everything that has anything to do with the look and feel of your site is in a file somewhere and needs to be backed up. Additionally, you must back up all of your files in your WordPress directory (including subdirectories) and your .htaccess file.

While most hosts back up the entire server, including your site, it is better that you back up your own files. The easiest method is to use an FTP program to download all of your WordPress files from your host to your local computer.

By default, the files in the directory called wp-content are your own user-generated content, such as edited themes, new plugins, and uploaded files. Pay particular attention to backing up this area, along with your wp-config.php, which contains your connection details. The remaining files are mostly the core files, which are supplied by the WordPress download zip file.

Please read Backing Up Your WordPress Site for further information.

Other ways to backup your files include:

Website Host Provided Backup Software
Most website hosts provide software to back up your site. Check with your host to find out what services and programs they provide.
Create Synchs With Your Site
WinSCP and other programs allow you to synchronize with your website to keep a mirror copy of the content on your server and hard drive updated. It saves time and makes sure you have the latest files in both places.

To synchronize your files in WinScp –

  1. Log in to your ftp server normally using WinScp.
  2. Press the “Synchronize” button.
    Remote directory will automatically be set to the current ftp directory (often your root directory).
    Local directory would be set to the local directory as it was when you pressed Synchronize. You may want to change this to some other directory on your computer.
    Direction should be set to “local” to copy files FROM your web host TO your machine.
    Synchronization Mode would be set to Synchronize files.
  3. Click “OK” to show a summary of actions.
  4. click “OK” again to complete the synchronization.
Copy Your Files to Your Desktop
Using FTP Clients or UNIX Shell Skills you can copy the files to a folder on your computer. Once there, you can zip or compress them into a zip file to save space, allowing you to keep several versions.

Normally, there would be no need to copy the WordPress core files, as you can replace them from a fresh download of the WordPress zip file. The important files to back up would be your wp-config.php file, which contains your settings and your wp-content directory (plus its contents) which contains all your theme and plugin files.

This entry was posted in Website Design And Marketing, Wordpress. Bookmark the permalink.