Last Updated: November 30, 2013
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.
Information: The latest version 3.0.13 is still causing many problems for many users. The good news is that the developers have released a beta version BackWPup 3.0.14 beta. So run the beta version on a test environment and report back with any issues. This version proves that the developers are still very much active with this plugin.
Finally: I have updated this tutorial with new images from the current version BackWPup 3.0.13.
Latest news: There is a new version out 3.0.13.
Please read the latest release information below:
- Improved: Redirect when accessing the WordPress backend
- Added: Debug Informations to Logfile
- Added Sydney region for rackspace cloud
- Added London region for rackspace cloud
- Fixed: Cross-site scripting issue. Thanks to High-Tech Bridge for helping us:https://www.htbridge.com/advisory/HTB23161
- Fixed: Fatal error when uninstalling on WordPress 3.4.2 and older
Version 3.0 Pro
- Export jobs and settings as XML
- Synchronization of files to backup with destination (filename and size checked)
- Wizard to import jobs and settings from XML
- Database dump can backup other MySQL databases
- Database dump can use
mysqldumpcommand on commend line
- Database dump can create XML files (phpMyAdmin schema)
- Use your own API keys for Dropbox and SugarSync
- Premium Support
- Automatic updates
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.
The following image is what you will see when you first install or upgrade to the latest version.
Some have become annoying at the new screen and there is a plugin called backwpup humility that removes the login screen and other options and allows you to start adjusting the settings and creating a new job.
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.
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 Dumpfile name for your database. You have 3 options for the type of compression none or GZip or BZip2. 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 any of the two available 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 manually using phpMyAdmin or what ever tool you use in your server. You can follow my tutorial Test Your WordPress Site Locally, even though this tutorial is for a local server the part about phpMyAdmin is the same as a live server. If you don’t like performing this process because you either don’t have access to the server or for other reasons; I sugges that you try the following plugin WP-DBManager from Lester Chan. I have tested this plugin on all my websites running WordPress 3.5.2 and also WordPress 3.6 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.