How To Backup & Restore Your WordPress Site Easily With UpdraftPlus

Ads by Google

Being a WordPress site owner myself I’ve seen servers fail and loss of data on more than one occasion. Hardware fails, and hackers will try to compromise your site. With that in mind it’s very important to have a tried and tested backup routine, so that you can restore your site should the worst happen.

You spend a lot of time tweaking, changing, and managing your website. So imagine how awful it would be to lose all of that hard work at the hands of something that is completely out of your control.

We’ve previously shown you some of the really useful plugins that you can use to migrate your WordPress site, but it’s also important to backup on a regular basis, not just when you intend to migrate it. On my websites I run daily backups to a NAS drive via FTP, and to do this I use a WordPress plugin called UpdraftPlus.

Backup WordPress With UpdraftPlus

You can easily install UpdraftPlus from the WordPress plugins page. Click on the add new button then search for UpdraftPlus. Once installed, click the settings menu and select UpdraftPlus Backups from the sub-menu to configure your backup routine.

Updraft-01

UpdraftPlus is full of features that many other free backup plugins for WordPress simply lack, including:

  • Automatic backups on a regular basis – anything from monthly right up to every 4 hours.
  • Backup both your database and WordPress files.
  • Stores backups locally on your web server, or on remote/cloud storage including Dropbox, Google Drive, Amazon S3, FTP, and many more.
  • Automatically overwrite old backups to conserve free space on your drives.
  • Optional email alerts on completion of your backups.
  • Accessible log files of all backups, which is great for troubleshooting issues.

Updraft-FTP-Settings

Ads by Google

Test Your Backups

What’s the point in having a backup system if you don’t know how to restore from them? That’s why you should not only run backups, but also test them to make sure you can recover your website should you ever need to.

Testing your backups is very simple. All you need to do is create a second WordPress site on your web server (or a local WordPress instance), so you could have something like backuptest.mysite.com which would need to have a vanilla installation of WordPress on it.

Once you have your test WordPress site up and running you will need to grab your latest backup, by default this will consist of 5 files that alll use the following naming convention:

  • backup_[date]-[time]_[Website_Name]_[hex-tag]-plugins.zip
  • backup_[date]-[time]_[Website_Name]_[hex-tag]-themes.zip
  • backup_[date]-[time]_[Website_Name]_[hex-tag]-uploads.zip
  • backup_[date]-[time]_[Website_Name]_[hex-tag]-others.zip
  • backup_[date]-[time]_[Website_Name]_[hex-tag]-db.gz

The others.zip file contains files from your web server that aren’t in your plugins, themes, or uploads folders. You won’t really need this file as you will be able to restore your site without it.

Upload Your Backup

Now that you have a copy of your backed up WordPress files and database, you need to uncompress the three zip files (plugins, themes, and uploads) and connect to your new blank WordPress test site via FTP. You can do this by installing a free FTP client like Filezilla.

If you’re using a local WordPress site then you need to copy and paste these folders to wherever you have your WordPress site installed on your hard drive.

Once you’re in your test WordPress site’s directory, you should see three folders at the top of the list. These are wp-admin, wp-content, and wp-includes. To restore your website you need to upload your backed up files to the wp-content folder.

WP-Content

Once in the wp-content folder you need to replace the plugins, themes, and uploads folders on your web server with your backed up versions. Don’t worry if you don’t see an upload folder, it isn’t present because you haven’t uploaded anything to your WordPress media library yet.

This part may take some time, especially if you have a slow internet connection or if you have a large website. So whilst you’re waiting for the files to upload head over to phpMyAdmin to import your database backup.

Import Your Database

Most web servers have tools like cPanel or Plesk installed which allow you to manage things like email accounts, FTP access, web app installations like WordPress, and your databases. Under the database section you should see an option to launch phpMyAdmin — a tool that allows you to manage your databases via your web browser.

cPanel-Database-Options

Once you have launched phpMyAdmin you will need to select the database that correlates to your blank WordPress test site. You specified the database name when you installed WordPress, so think back and check your notes. Once you’re in the correct database, click on the Import tab at the top of the screen. You will then have a screen very similar to this:

Click on the “Choose file” button and select the db.gz backup file from your backup. Leave all other settings on their default value and click on the “Go” button. This will now import your backed up database.

phpMyAdmin-01

Check Your Website

Once your files have finished uploading and your database is imported, navigate to your test website address using your browser. Provided your backups are working correctly you should now see a carbon copy of your live website.

Congratulations, you now know that your backups are working as intended!

Restoring For Real

If your website is damaged for whatever reason and you need to restore for real, you can follow the exact same process as above. However, instead of creating a test site you simply remove and re-install WordPress on you main site, then follow the same process.

Conclusion

Backing up any crucial data is extremely important, but knowing how to restore that backed up data when you need it is just as important as the backups themselves, if not more so. A lot of people think that it will never happen to them so they don’t backup. But why take that risk when the process of creating and testing backups is so simple with UpdraftPlus?

Do you guys have a different method of backing up your WordPress site? Or maybe you don’t back up at all? Either way we would love to hear your thoughts in the comments below.

Ads by Google

29 Comments - Write a Comment

Reply

Jay George

Well done Kevin, a very well thought out article. Very informative.

Kev Q

Thanks Jay. If you ever start your own website, don’t forget to back it up. :)

Reply

OliverF

I have found interesting deal on http://www.find-your-software.com Has anyone tried it?

Reply

Richard Smiley

Good advise for an IT professional, I suppose, but not enough information for a non-expert. It would help a non-professional like me to know to where the back up “goes” once it is made. Is the back up made on the web host server or on my PC? How do I get the back up file (s) to download onto my PC (if download is what must be done). Anyway, I do appreciate that you’ve taken the time to post what information you did. Thank you.

Kev Q

Hi Richard, thanks for taking the time to comment. I’m sorry if it wasn’t clear in the article where the backup will be stored. I thought I made that clear by describing all the different backup locations like Dropbox, FTP, Google Drive, and email etc (see the second screenshot for all options).

To clarify, by default if no backup location is specified then UpdraftPlus will save your backups on your web host at /wp-content/updraft. If you choose one of the multiple remote locations then it will backup to your web host, transfer to whichever remote location you picked, then remove the backup from your host. It will keep the txt log files on your host just in case you need them, but these are very small.

I hope this answers your question Richard, if you still have more then feel free to post another question and I’ll be happy to help. :-)

Richard

Ahh, there it is! The language in the list of options for what to do with the backup is a bit confusing. FTP is listed as an option, but FTP is not a “location,” hence my confusion. Now I’ll use FTP to download my backup. Thanks a million.

Kev Q

No problem Richard, happy to help. Don’t forget to do a test restore. ;-P

Raazan M

Hi Kev, I am using updraft plus backup with Dropbox for backup storage. However, as you have replied above that the backup stored in my host is removed after transfer, but in my case updraft is storing backups both in Dropbox and host server. How can I configure updraft plus to download/store backup only to Dropbox but not in my host location? Please suggest.

Kev Q

Hi Raazan,

There is a setting within expert settings, to turn this on, scroll to the bottom of the UpdraftPlus settings window and select the lick that says “Expert Settings”. Once they’re expanded you will see an option to delete the local backup. When this is checked, it will delete the backups from your server once they have ran.

However, if you enable remote storage, like Dropbox or FTP, this setting will be turn on by default. Maybe you turned this off at some point in the past? Either way, this should fix the problem.

If this is checked, and the back ups still aren’t being deleted from you web server, then I’d log a support with the developer. This can be done using this link:

http://wordpress.org/support/plugin/updraftplus

Reply

Nitesh Kumar

Sir
can u pls tell me how can i start wordpress website development
pls send/tell me the beginning steps wihth wordpress setup also ,and how to connect wordpress with database.

Thank you

Kev Q

Hi Nitesh,

WordPress is written in CSS and HTML, which are website standards that a lot of websites use, not just WordPress. You can learn coding in a number of ways, here’s a very useful article from Aaron that will get you started:

http://www.makeuseof.com/tag/learn-code-10-free-fantastic-online-resources-hone-skills

I would highly recommend Codecademy, they’re really great and that’s how I actually first started learning how to write in HTML and CSS.

With regards to setting up and configuring WordPress, this is also very easy. There is a famous “5 minute install” that WordPress uses in order to connect your database to WordPress. More info can be found here:

http://codex.wordpress.org/Installing_WordPress

To do it manually though you would need to edit the options.php file with your DB name, username, password, and path. Once that’s done WordPress will be able to use whatever DB you specify.

If you’re just getting starting with WordPress then I wrote a getting started guide on my persona blog, RefuGeeks recently. Here’s a link to that if you’re interested as it has a lot of useful information on how to get started with a new WordPress site.

http://refugeeks.com/wordpress-beginners-guide

WordPress is a great system for both developing and managing your website. I’m sure you will have a lot of fun. Good luck! :-)

Reply

Kamruzzaman C

Thanks for the resourceful post. I learn something new. Thanks again buddy.

Reply

Blank

Hello,
I followed your advise and was able to restore the website to a new domain, however…
The menu links all redirect to the old domain, how can i fix that?

Kev Q

This guide isn’t really for migrating your website to a new domain name, however, this can easily be adapted, you just need to take two extra steps:

Step One
You need to log back into PHPMyAdmin and then open up the database for your website. You will then see all the tables within that database, click on the wp_options table.

In there, the top entry is “siteurl” and the option_value will be the URL for your website. Simply change this to the new domain name ensuring that you keep the http:// prefix.

Step Two
Log in to WordPress and go to Settings > General. In this screen, update the WordPress Address & Site Address fields to the new domain name, again, keeping the http:// prefix in place.

Making these two changes will update all of the menu items to the new domain name. However, if you are still having issues with custom menu’s, or images/links that are looking for the old domain name, you can use the Velvet Blues plugin (link below) to update the URL’s across your site.

http://wordpress.org/plugins/velvet-blues-update-urls/

Hope this helps. :-)

Reply

Chloe

Hello,
First of all, thank you for the wonderful tutorial.
I followed your step-by-step guide and everything went smoothly except for one thing: my posts are not transferred to the test site.

Any idea?

Kev Q

Hey Chloe,

In WordPress, all of your posts and pages are stored in your database, so it sounds to me like either your test site isn’t talking to your db correctly, or, something didn’t work quite right when you imported the backup db.

When you go into PHPMyAdmin, and then select your test db, can you see it is populated with tables? There should be a number tables, that by default all start with “wp-“. For example, “wp-options”, “wp-users” etc.

Also, is it just your posts, or have your pages not imported either?

Thanks.

Reply

Chloe

Hi Kev,
Thank you very much for your reply.

Hmm. I noticed something interesting.
I logged into PHPMyAdmin and check the tables in DB. Interestingly, all table names start with lrq_ instead of wp-. For instance, instead of “wp-users” (what it should be), it shows as lrq_users. I am hosting my sites at bluehost (same as yours I believe by looking at the above instruction). It looks like when I installed a wordpress using bluehost cPanel (MOJO marketplace), it automatically created a wordpress database tables starting with lrq_ instead of wp_. I think that’s why it didn’t import any posts or pages properly.

Is there any solution to fix this?

Kev Q

Hey Chloe, I’m not using Blue Host, but I have in the past, and I actually found them to be pretty bad. But hey, a company the size of Blue Host are bound to have a few unhappy customers.

Ok, the fix for this is very easy, Blue Host generates a different table prefix for every wordpress instance. By default this is wp, and yours is lrq. All you need to do is go back on to your ftp?account, and download the wp-config.php file from the root of your websites files.

Then, open this with a text editor, and look for “table prefix”. It’s usually near the bottom of the file, and it will be something random like “frw_”. What ever it is, change it to say “lrp_”. Save he file, and re-upload it, overwriting the old version.

This should fix the problem. If not, then drop me a line back. Good luck. :-)

Reply

inder

thanks for this great information, my wordpress site has damaged lots of time and all data was deleted, but i didn’t know about restore and backup, again thanks for this info..now i will always backup my site.

Kev Q

No problem Inder, glad I could help. :-)

Reply

Chloe

Hi Kev,

I changed the table prefix as you mentioned above and solved my issue.

Thank you so so so much!!!!!

Reply

Dave

why is it so hard to just do such a simple task. I don’t want to muck around in the “back end” and just back up .. end of story.

WordPress is such a hassle.

The time ive had mucking around with this.

WPmanage has a limit to the sizes of files you can download before it gives an error (they wont tell you this). Other companies have crappy payments systems and couldnt pay.

Why is it so dam EFfen hard!

Kev Q

Hey Dave,

You’re preaching to the converted my friend. Backups on WordPress have been a particular hassle for me personally, which is why I decided to write this article.

I’ve used many different tools for backing up, and I’ve found Updraftplus to be by far the best free tool, and the support is extremely good.

Since you mention ManageWP, I’ve recently migrated to one of it’s competitors, InfiniteWP, the basic version is free, and self-hosted, but you can buy addons. I’ve bought the cloud backup and scheduled backup addons (costing $109) but they’re so worth it. The backup system is bulletproof, and I can easily use it to schedule the back ups on my many WordPress sites.

If you’re looking for a free solution, use Updraftplus, if you want flexibility, I’d highly recommend InfiniteWP – although, they’re not that cheap.

Dave

Thankyou Kev for the response. I had tried icontrolwp and the worpdrive but i have problems with my visa and the verified by visa system wont let me proceed to signup with them but generally icw was good. I will check your suggestions InfiniteWP, updraftplus is working for me since i posted. cheers and thanks again.

Reply

Benjamin de Jong

Good to see that the restore step of the backup process is also handled in this article!
XCloner is a good alternative for WordPress Backups which makes it easy to test the restore of your website. I have published a light tutorial about this here: http://wpstartpage.com/wordpress-backup/

Reply

Todd

Hi Kev,

Thanks for a great guide ! Like others, I’ve found backing up WP to be painless, but finding a good restore plugin that works well and is trustworthy, a challenge.

Question about the restoration process: I’m moving from a localhost WAMP install to a live server. In regards to the DB, when I create it on the live server is it best to use the same DB info as the localhost (DB name, Username & pass, etc.) that is used in localhost config.php, or does it not matter since I’m importing the data through phpMyAdmin?

You mentioned in another comment that when moving domains that I may have to also update the site URL in the DB as well as WP. I’m assuming that would also apply in my case?

Hopefully, that makes sense. Thanks !

Reply

Sara

Hi Kev,

I have been trying to access my test website with Filezilla but even though the information (username, password etc) is correct I keep getting “connection timed out” “could not connect to the server”. I tried to follow tutorials on how to use filezilla with wordpress but I still can’t get it to work. Could it be that my ftp address is wrong? My test website url is hhftestblog.wordpress.com and as FTP I used http://ftp.hhftestblog.wordpress.com.

I’m pretty desperate, do you have any ideas of what the problem could be?

Thank you,

Sara

Kev Q

Hi Sara,

This guide isn’t designed for people who have wordpress.com blogs. This is for people who host their own wordpress.org blog.

I apologise if that wasn’t clear.

Kev

Reply

Daniel D’souza

Hey Kev! :) Great Article :) My website actually got hacked my these mean Indonesian Hackers :( And ever since then I’ve been skeptical about further pursuing my website , because if they hack it permanently then it’ll all be a waste :( … But Now I got hope :) Im going to try to back it up today and do a test restore :)
I have 2 questions though :)

1>. If I just go through Filezilla and download the entire public_html files onto my desktop , It cant be used to restore by site back up ?? Do I need a database also ?

2>. Those hackers had made a html page, stating their attack. Are there any obvious backdoors that they have made that I can remove by deleting some obvious files which they have created ?? I deleted the html file :)

Thanks so much! :)

Your comment