Last Updated: March 08, 2014
Backup and Restore WordPress tutorial will guide you and help you create a WordPress backup and restore your website using BackWpup plugin on the same server.
Revision Update: Change the wording in Step 8 below.
Finally: I have updated this tutorial with new images from the current version BackWPup 3.1.2.
Please read the latest release information below:
- Added: .donotbackup file. Folders and sub folders containing this file in will not be included in backups.
- Fixed: New multisite installs did not save jobs.
- Fixed: New multisite installs did not save installed version.
- Fixed: Fatal error when attempting to clean up inactive jobs from cron
- Fixed: Exclude uploads not working
- Fixed: Message “file not readable” of an excluded folder
- Fixed: WP-CLI deprecated and unknown parameter message
- Fixed: Bugs in pagination on logs and backups page
- Removed: Banner from plugins page
- Improved: Memory usage during XML export
- Improved: Mime type detection
- Improved: Dropbox SSL handling
- Improved: Certificate bundle file can now be filtered
- Improved: Auto-loading vendor classes
- Improved: Performance when saving other database tables than MyISAM
- Updated: AWS SDK to Version 2.5.2 (PHP 5.3.3+)
- Updated: RSC SDK to Version 1.9.1
- Updated: Guzzle SDK to Version 3.8.1
- Added: S3 Service: Amazon China (Beijing) region
- Added: Rackspace: Hong Kong (HKG) region
- PRO: Fixed: Duplicating synced files on S3
- PRO: Update: Google SDK to 0.6.7
- PRO: Added: Amazon Glacier China (Beijing) region
Important: Please remember to review the new version and post any issues with your website. This is important for the developers.
I created a backup and after I created the backup I deleted all the website files on my server to test this plugin. I was able to restore my website without any problems. This proves that it does work. However even though it worked for me there are many different server settings. I suggest that you always test on a testing environment on your server and test your backups. It is always better to be safe than sorry.
What you need:
- Download and install the BackWPup plugin.
There are Two Parts to This Tutorial
- Backup and Restore WordPress
- Backup and Restore WordPress Settings (Coming Soon)
The following image is what you will see when you first install or upgrade to the latest version.
Create A Full Backup including the Database
1 ) Create a job and select what you want to include in the backup from the many options. See images below:
The new version has tabs and it is much easier to follow. Give your job a name and select what you want and don’t want from the following images.
The following image allows you to select the Archive Format for your backups.
Important: Some archive formats might not work well with your server settings. So choose the one that works best with your server.
If you want to backup to an external destination then you need to enable one of the many options below. Once you have selected the option you will see a new tab available for you to enter the credentials.
Click on Schedule tab to select one of the following options manually only or with WordPress cron or with a link. If you want to Start a job with CLI then click on WP-CLI or click on get the start script. When you finish configuring your schedule click on Save changes.
Click on DB Backup tab to select the tables you wish to backup. You have 3 options to select all, none or wp_ to backup.
Important: Always change your data base prefix from WordPress default wp_ to something else. This is important for security.
Select the Backup file name for your database. You have 2 options for Backup file compression none or GZip. Click on Save changes once you have selected your choice.
Important: Remember to test your compression. Many report issues with different type of compression. If you are experiencing issues with GZip select none.
Click on Files tab to select what you want to include in your backup. You have the following options Folders to backup, Backup content folder, Backup plugins, Backup themes, Backup uploads folder, Extra folders to backup, Exluce from backup and Include special files. Click on Save changes when you finish selecting what you want to add to your backup.
Important: Remember you can select to exclude files and folders from your backup.
Click on Plugins tab to configure the following Plugin list file name and select what type of compression. You have 3 options none or GZip or BZip2. Click on Save changes once you have selected your choice.
2 ) Enter the local hard disk backup path. Remember your local path is going to be different than mine. See image below:
Hint: Make sure your backup folder is protected. To secure the folder you can add an index.html file or add a .htaccess file on the backup folder.
Option: If you want some extra storage, enable one of the many FTP options that BackWPup provides for you to upload directly into. I chose SugarSync which gives you 5 gb of storage for free, this allows me to keep some backups of my clients websites. The root is not visible until you have created an account. See image below.
Important: Remember to add a number of copies to your sugarsync account or else you will receive the following error. [ERROR] SugarSync API: Http Error: 499
3 ) Once the job has been created, you need to run the job to create the backup. There are two options to run the job, run after the job has been created or through the admin top bar. See image below:
4 ) If everything goes well then you should receive a completed message. The following image shows your job running. See images below:
5 ) Once you have created the backup, you can download a copy locally to your computer. See image below:
Hint: It is always better to use FTP to download or upload files.
Option: Keep a copy of the backup zipped file on your server if you have space.
Hint: If you want to create an automated process to download to your computer, create a sugarsync or dropbox account. Then download and install the SugarSync or Dropbox software on your computer and run a sync from your computer to the server using the software. Always remember the size limitations.
That is how simple it is to create a backup.
How to Restore a Full Backup to the same Server
Important: This process requires two steps to achieve the full restoration of your website.
Step 1: Upload all files and Database
You need to upload the content of the zip file you downloaded on step 5) to the server or if you kept the file on the server go to step 6).
Unzip all the files locally on your computer and upload them using ftp software like FileZilla, which is FREE. All the files must be uploaded to the same path as your website unless you choose to upload the files to a different folder and then copy them to the website path. The path will look similar as illustrated on the following examples below:
(depending on your host).
6 ) Select the file on the server to extract. See image below:
7 ) Extract the file to the correct path of your website. See image below:
Example: My path is /plublic_html/myurl/wptest/ this is a sub domain.
Voila the site was up and running in a few minutes. I did some test on the site by login into the admin page and had a look around and yes everything was working well. Very simple and quick. The BackWPup plugin works well and I highly recommend it.
Step 2: Restore the Database
You will find your database in the root of your website which was added in Step 1 above.
Important: Make sure the database is Unzipped.
8 ) To restore your database you have to upload the database backup file to the server and manually restore the database using phpMyAdmin or what ever tool you use in your server.
You can follow my tutorial Test Your WordPress Site Locally. Even though the tutorial is for a local server install procedure in the section about phpMyAdmin is the same as on a live server. If you don’t like performing this process because you either don’t have access to the server, limited permission or for other reasons; I suggest that you try the following plugin WP-DBManager from Lester Chan.
I have tested Lester Chan’s plugin on all my websites running WordPress 3.8.1 and it works without a problem.
Warning!!!: Always have a latest database backup just in case something goes wrong.
Moving WordPress to a different directory
Please remember the information in this tutorial relates to backing up and restoring to the same server.
I did not add any new information here because WordPress has a great tutorial on moving your WordPress to another directory. Click on the following link moving wordpress to it’s own directory.
After you have followed the steps pointed out in the link above, you need to carry out a few more steps. These steps are very important because it can affect your SEO and performance.
- Check your website in the new location. Log into your admin panel and check to see if you have any issues, make sure that all your links are 100% correct. Check your theme and plugins.
- The first plugin you will install Velvet Blues Update URLs, this plugin will help you update all your URL’s and content links in your website.
- Install Quick Page Post redirect plugin unless you already have it, to start redirecting any old URL’s to the new URL address. Even though the plugin above will do about 95% or more of y0ur work, you will still miss some links and URL’s.
- Install Better WP Security plugin unless you already have it. Apart from being a great security plugin, it has a nice log checker. Check regularly the log files, it will tell you of any 404 errors page not found. Some of these errors will point out any URL address that needs to be updated “redirected”.
- Gmail does not allow emails with .bat files in them to be sent or received. BackWPup has some .bat files in its folders. A solution is to tell BackWPup to exclude itself from the archive. Daniel is planning on removing the batch files on his next release.
Run and test your website locally:
In the following tutorials you will learn how to setup WordPress locally using xampp and install your backup locally to run some testing.
- First read the following tutorial Install WordPress locally using Xampp to set up your WordPress locally
- Second read the following tutorial Test Your WordPress Site Locally which will show you how to restore BackWPup backup locally for testing and editing.
I will be adding more information in the near future. If you have any questions please leave a message.