How to Backup WordPress

486

If you have spent numerous hours updating your website through WordPress, the last thing you want to have happen is data loss because of a crash. With a proper backup, you’ll be able to restore your website in just minutes.

Even something as simple as database corruption can be enough to have your content access disabled. Some of the reasons how an event like this can happen are outside of your control. That is why knowing how to backup WordPress is something every WP Admin should know.

Backing Up Your WordPress Website

You have two elements to the backup process which must be considered. You have your database to backup, then you have your files to backup. Your site will also consist of the core installation, plugins, themes, images, files, scripts, and static web pages.

Your database contains your posts and the data that your website has generated. It does not include the additional elements listed above. To preserve the look and feel of your site, your backup must include everything.

Although most hosting companies will have a backup of the entire server, requesting this information can take a lot of time.

Here are the options that will help backup your site files.

1. Software backups.
Website hosts that work with WordPress will provide you with software access for a full site backup. Check with your host to see what is offered and at what cost.

2. Create a website sync.
Certain programs, such as WinSCP, allow you to sync with your website. This creates a mirrored copy of your content on your server, with your HDD updated. This allows you to always have the latest files available.

3. Desktop copies.
You also have the option to copy files to a folder on your computer, then compress them. UNIX Shell Skills and FTP Clients will both give you this option.

As a general rule of thumb, it is a good idea to keep at 3 least three backup versions of your WordPress site on file. Store them in different places on different storage mediums (HDD, DVD, CD) to preserve your content.

Instructions for a WordPress Database Backup

It is important to remember that when backing up a WordPress database, it will not backup your files and folders. Your images and them files must be part of the backup process described in the content section above.

One of the most common ways to backup WordPress is to use cPanel. This control panel makes the backup process simple. Just look for the option to download a MySQL Database Backup, then click on the name of the database you want to save.

This will deposit a .gz file onto your local drive. You can compress the file to minimize the space impact it makes. When you need to use the file to restore your WordPress site, just find it through the panel and upload it. Then make any corresponding changes that are required if going to a new host through your wp-config file.

Another popular option is to backup a WordPress database through phpMyAdmin. If you backup the tables of your database without compression, then you can use a simple method to save your data.

Log into the phpMyAdmin on your server. Then select the WordPress database that you wish to backup. Along the right, you’ll see all the tables that are present within the current database. Look to the top set of tabs for the Export command.

Assuming that the Quick option is selected, click on Go. This will prompt you to authorize a file for download. Then save the file to your computer. For larger databases, this process may take a few minutes.

You can also choose a custom process where you select the tables, output section, formatting, and format-specific options as you create a backup for your database. You can also add statements and review data creation options during this process.

For those using MySQL, you can also use a straight command to create a WordPress database backup. Just used the mysqldump command with your user name, server name, and database name. You’ll be prompted for a password. You can then backup the entire database or choose specific tables within the database to save.

By backing up your WordPress database, files, and settings, you’ll be able to quickly restore your site should something happen. Although your host can often do this for you as well, you’ll find that taking a few minutes to do this every so often on your own will be worth the time investment.