Kevin Muldoon October 13th, 2011

How To Backup Your WordPress Website

Anyone who has had their website hacked or inadvertently changed something they shouldn't have on their websites database, will know the importance of backing up your live websites on a regular basis. The steps involved in backing up and restoring a WordPress database using PHPMyAdmin is no different from any other MySQL powered website. There are alternatives to manually backing up and restoring your database in this way. In this article we will be showing you how you can backup and restore your WordPress database using the built-in import and export tool, using PHPMyAdmin, using CPanel and using a host of WordPress plugins and services. If your chosen method of backup only backs up your websites database, your site could still be somewhat vulnerable. It is advisable to backup your WordPress website files manually as well so that you have a backup of uploaded files such as images, videos etc and any non-WordPress related files that are important (there are solutions for backing up files only).

Backing Up And Restoring Content Using WordPress

WordPress has a built in import (restore) and export (backup) system for transferring content from one location to another. It backs up posts, pages, comments, custom fields, categories, and tags. Unfortunately, things like attachment files aren't backed up. The export function can be found at http://www.yoursite.com/wp-admin/export.php. You will have the option of backing up all content or just posts or pages here. You also have the option of backing up any additional custom post formats you have installed e.g. forums, coupons, job-listings etc (quite a large percentage of good WordPress plugins use custom post formats to store data so you may have custom post formats and not even know it). The data is exported in XML format. Backing Up Using WordPress To restore your content, either on the same website or a different location, you need to use the import function. This can be found at http://www.yoursite.com/wp-admin/import.php. WordPress lets you import content from a number of different blogging platforms such as Blogger and Live Journal and WordPress related products such as bbPress too. Restoring Content Using WordPress There is a good chance that you don't have the WordPress importer installed on your website so you will probably have to install it (should only take a few seconds). Restoring Content Using WordPress The import function is very straight forward. All you have to do is upload your exported XML file and click on the 'Upload file and import' button. This screen also highlights one of the limitations of the WordPress export and import functions; the file size limit of 2mb. Thankfully, there are steps you can take to increase this limit so that you can upload your file correctly. Restoring a database through WordPress After you have uploaded your backed up database you will have the option of assigning posts to an existing user or creating a brand new account for those posts. This is a useful feature when merging the content from two blogs or websites together. In this screen you can also import file attachments. The backup file you exported earlier saves the location of all of your uploaded files so if the site you backed up is still live on the internet you have the option of importing these attachments to the new location. This is handy if you are moving servers but it isn't a practical solution for importing attachments from a backed up file if the old website is no longer live. Restoring a database through WordPress Finally, WordPress shows you a list of the entries that were imported onto your new website. If the content already exists, it won't be transferred to your new site, therefore you don't have to worry about ending up with two copies of your posts or pages if you accidentally upload the file again. Restoring a database through WordPress The WordPress import and export function is a user friendly method of backing up, that WordPress beginners are sure to find useful.

Backing Up And Restoring Your Files And Database Via cPanel

One of the most popular hosting platforms used online is cPanel. You should see an icon for backups on your cPanel home page (it's exact location depends on the version of cPanel you are using and the theme your host has chosen). Backing up via cPanel To download a database you simply go to 'Download a MySQL Database Backup' and choose the database you want to backup. The file will be downloaded as a *.gz file. You can restore your database from this area too (you just need to upload your *.gz file). Backing up via cPanel You can also download and restore a home directory backup from this area (again, a *.gz file is used). This will backup all of your website files including your core WordPress files, uploads, plugins, themes and non-WordPress related files. It's a quick and easy method of transferring WordPress files and the WordPress database from one location to another. Though you do need cPanel to be installed on both locations (or at least be using a hosting platform that supports this type of importing).

Backing Up Your Database Via PHPMyAdmin

PHPMyAdmin is the most common way of administrating MySQL databases. You can access PhpMyAdmin directly through your hosting area (e.g. cPanel) though a great way to backup or modify your database through PhpMyAdmin is by installing the Portable phpMyAdmin plugin which allows you to use the tool through your WordPress admin area. Once you are logged into PHPMyAdmin, you need to choose the database you want to backup, from the top left hand side (check your WordPress wp-config.php file if you are not 100% sure which one it is). Backing Up Your Database Via PHPMyAdmin You then need to click on the export tab, which can be found in the navigation menu at the top. Some versions of PHPMyAdmin have a quick backup option that simply asks which format you want to back your database up in. It's generally best to backup with the options like they are shown below. Backing Up Your Database Via PHPMyAdmin Advanced options are usually available. The most important thing is to make sure that all of the database tables are selected before you click to backup (otherwise you run the risk of backing up one table rather than your whole database). You should also make sure that you click the option which says that it will 'create a table if it does not exist' (usually separated into two options to be checked). By default, the correct settings are usually selected but it's important to make sure before you move to the next step. Lastly, you may be asked how you want to compress your database. You can select none, zipped, gzipped and bzipped. It doesn't matter much what you choose as PHPMyAdmin can unzip all of these formats when importing. Backing Up Your Database Via PHPMyAdmin The steps for importing a database are very similar. Again, you need to login to PHPMyAdmin and make sure you choose the correct database. Then you need to click on the import tab at the top of the page. Backing Up Your Database Via PHPMyAdmin All you need to do now is upload your exported file and click on the go button, ensuring that you chose SQL as your format.

When Moving Your WordPress Website

If you are moving your WordPress website to a new server all you have to do is:
  • Backup your files and upload them to the new host.
  • Export your database and import it to your new host.
  • Ensure that your wp-config.php has the correct login information so that WordPress can access the database.
If your website is changing URL's you have to make sure that your database has the correct information or WordPress will keep forwarding your website to the old URL. The smartest way to do this is to change your WordPress address (URL) and Site address (URL) to your new URL before backing up (you do this at http://www.yoursite.com/wp-admin/options-general.php). For example, you would login to your site at http://www.yoursite.com/wp-admin/, change both URLs from http://www.yoursite.com/ to http://www.mynewsite.com and then start the backup process. Moving WordPress to a new URL If you fail to take these steps, don't worry. All you have to do is login to PHPMyAdmin and look for the wp_options table and click browse. Moving WordPress You should now see your site address (URL) in the first row. The option_name is siteurl. You simply need to click on the edit link and update this from your old URL to your new one. Moving WordPress The home address (URL), which is the first URL you see at http://www.yoursite.com/wp-admin/options-general.php, can be found on row 39 under option_name home. Simply click the edit link and then update the entry with your new URL. This whole process is relatively painless though it is much easier if you simply update the URLs on your old website before you back up.

Recommended Automated Backup Solutions

There are lots of plugins and services available for WordPress that make the process of backing up and restoring a database quicker and easier. In this section we would like to show you what we consider to be the best back up solutions available for WordPress. VaultPress - From $15 per month per site Launched at the end of 2010, VaultPress is the premium backup service from WordPress developers Automattic. In less than a year it has established itself as the benchmark for backing up WordPress. Once the plugin has been installed VaultPress will take a snapshot of your website. The backup includes your database, plugins, themes and uploads. VaultPress VaultPress is constantly working. If you check the activity tab through the VaultPress area on your website you will see several updates every hour. VaultPress You can access your main dashboard at VaultPress through the VaultPress page on your own site. You can see a list of all of your websites that are being backed up by VaultPress with a note of when they were last backed up. VaultPress From the backup page you can download a full backup of your website or just your database, plugins, themes or uploads. Older backups can be downloaded too. VaultPress doesn't just keep backups for a few days; backups are kept from the very first day you started using the service. For VaultPress users who signed up at launch that means that they can download any post, page, theme, plugin or upload since November 2010. This pretty much guarantees that nothing will ever be lost from your website. VaultPress Vitality is a measure of how active your site has been over the last month or so. The score essentially informs you how much content has been added to your site during that time; be it posts, pages, comments or uploads. VaultPress The basic plan retails for $15 per month per site. The premium package costs $40 per month per site and gives you additional features such as domain and hosting migration assistance, theme and plugin scanning and security scanning. The enterprise plan was created for large businesses who want performance auditing and consultative security. That costs a whopping $350 per month per site. With constant backups dating back from the day you first started using the service, VaultPress is one of the best backup solutions available for WordPress. Link: VaultPress BackupBuddy - From $75 Developed by iThemes., BackupBuddy is a fantastic backup solution that lets you backup your site to your own server, to Amazon S3, to Rackspace Cloud, Dropbox, FTP or email. It backs up your database, themes, plugins and uploads. You can even backup non-WordPress tables. You can schedule backups as frequently as you wish, exclude certain directories from backups and limit the number of local backups so your server doesn't get too full. BackupBuddy has a user friendly restore and migrate feature too. All you have to do is upload your file and then enter some details (such as your database information). BackupBuddy Restore Feature from WebDesign.com on Vimeo. A license for two websites retails for $75. 10 websites will cost you $100 whereas an unlimited license costs $150. Unlike VaultPress, BackupBuddy backs up your database to your own server or external services such as Dropbox (most of which are very affordable). This makes it a very reliable and affordable backup solution after the initial outlay (see the BackupBuddy VS VaultPress comparison table for a direct comparison of prices with VaultPress). Link: BackupBuddy ManageWP - Currently Free ManageWP is a service that lets you administrate all of your WordPress websites from the one area. Last month they upgraded their service with support for automatic backups to external FTP, Amazon S3 and Dropbox. You can schedule backups on a daily, weekly or monthly basis. The number of backups you want to keep can be set and you can choose to delete older backups from your server. ManageWP To backup via FTP, Amazon or Dropbox you simply need to enter information the alternative backup destination. ManageWP ManageWP is currently in beta development and is therefore free to everyone. From November 2011 the service will cost only $5 per month for 10 websites and $50 per month for 500 websites. With DropBox offering the first 2GB of data for free and Amazon S3 having a very competitive pricing plan; ManageWP is an affordable way of backing up your WordPress website. Link: ManageWP WordPress Smart Backup - $20 A WordPress plugin that lets you schedule backups to your server or to your Amazon S3 account. Files can be zipped in order to save space in your accounts. WordPress Smart Backup All past backups and future backups are shown on the backup manager page. Backups on your server can be deleted directly through the admin area. You can also restore your database or files by simply clicking on the restore button. WordPress Smart Backup Backups can be scheduled on a daily basis if necessary and old backups can be deleted when necessary. You can receive updates whether your files were backed up successfully or not. WordPress Smart Backup A regular license for WordPress Smart Backup costs only $20. Although not as advanced as VaultPress or BackupBuddy, it's a useful plugin for scheduling backups on a regular basis. Link: WordPress Smart Backup CodeGuard - From Free A user friendly service that backs your website up on a regular basis and checks your files for known malware. Your first website on the service is free. All you have to do is enter your website address and the FTP login details and your account will be setup. CodeGuard The first backup takes between 48 and 72 hours but once it's setup backups can be scheduled on a daily basis. CodeGuard You can also receive updates if any of your files change. Backups can be restored at the touch of a button too. CodeGuard The entry plan for CodeGuard is free and gives you 1GB of storage for one website. The basic plan offers the same storage for $10 per month however lets you backup an unlimited number of websites. The pro plan offers unlimited storage and costs 20% of your hosting costs. A strange way to price a service but it makes sense when you think about it's a good estimate of their costs. One of the best solutions available if your website files and database take up less than 1GB though you should perhaps re-evaluate your situation if you need more storage space. Link: CodeGuard

30 Free WordPress Backup Plugin Alternatives

The official WordPress plugin directory is home to many backup plugins for WordPress. All of these plugins are free to download so you want to consider them if you are not keen on spending money on your backup solution or if the solutions mentioned above just don't suit your needs.
  • MyRepono WordPress Backup Plugin - Automate an unlimited number of backups using the MyRepono backup service.
  • WordPess EZ Backup - Backs up files and databases to your website server.
  • WP Online Backup - Backup your website to your desktop or email. You can also backup up to 100mb of files on Backup Technology's servers.
  • WordPress Backup To Dropbox - Automatically backs up your files and database to your DropBox account.
  • Xcloner Backup And Restore - Backup and restore your website using the Xcloner application.
  • WP DB Backup - A simple plugin that backs up your database to your website server.
  • The Codetree Backup - Allows you to backup your database, themes, plugins and uploads to your server or via the MyCodeTree server.
  • Snapshot Backup - Creates a backup of your database and all of your files and uploads it to the FTP destination of your choice.
  • Backup And Move - Allows you to create a backup of your WordPress database and restore it on a different location at the touch of a button.
  • Bei Fen - The predecessor of WordPress Smart Backup, Bei Fen allows you to schedule backups to your server for your database and all of your files.
  • WordPress SQL Backup - Lets you backup your database and your wp-contents directory.
  • SME Storage Multi Cloud Files Plug In - Backup your website to one of 10 storage clouds including Amazon S3, RackSpace Cloud Files, Box.net, Microsoft SkyDrive, Microsoft Live Mesh, Google Docs, DropBox, Mezeo, FTP, and any WebDav enable cloud
  • Automatic WordPress Backup - Backup your important files to the Amazon S3 storage service.
  • WP S3 Backups - An alternative Amazon S3 backup plugin.
  • Ezpz One Click Backup - Automatically backs up your website to any FTP server.
  • iDrive For WordPress - Backs up your whole WordPress website to your iDrive online account.
  • Backup WordPress - Schedule daily backups of your database and files to your server. You can exclude specific files and folders from backups if you wish.
  • WP InstantBackup - Backup your database and files via FTP or email.
  • BackupWP - Your database and files can be backed up to your server or to an external cloud storage service such as DropBox, Amazon S3 or Google storage.
  • My EasyBackup - Easily backup, restore and migrate your database. Backups are stored on your server and can be placed outside the WordPress installation so that no one else can link to it.
  • PressBackup - Backup your website through Amazon S3 or PressBackup.
  • Sypex Dumper 2 For WordPress - A plugin that lets you create and restore your MySQL database.
  • Updraft - Backup your website to cloud services such as Amazon S3 or Rackspace Cloud. You can also backup to an FTP destination or via email.
  • Duplicator - Transfer an entire site from one location to another in 3 easy steps.
  • OP Archive - A one-click backup solution that backs up your files and database to your server.
  • Drop In Dropbox - Backs up your files to your Dropbox account.
  • WP Time Machine - Backup your files and database to Dropbox, Amazon S3 or via FTP.
  • WordPress Move - Helps you migrate your WordPress website to a new server.
  • WP Migrate DB - A useful plugin when you are moving to a new host. The plugin backs up your database and does a find and replace on your old URLS so you don't have to do it manually via PHPMyAdmin.
  • WP Export - Export your database as a CSV file.

Overview

What backup solution you use for your WordPress website depends on your own situation. It depends on your budget, your experience administrating FTP applications and databases and how important your website is to you. The one thing you shouldn't do is disregard the importance of backing up your website. There's always a chance of someone hacking your website and you never know when something could become corrupted in your files or database. So don't be afraid to pay for a good backup solution if the free alternatives are not practical (which is usually the case once your website reaches a certain size). What method of backing up do you use for your WordPress website? Please let us know in the comments area. (rb)

Kevin Muldoon

Kevin Muldoon is a professional blogger with a love of travel. He writes regularly about topics such as WordPress, Blogging, Productivity, Smartphone and Gears and Social Media on his personal blog. He is also contributor at award winning VPN blog He can also be found on Twitter: @KevinMuldoon.

48 comments

  1. Backupbuddy all the way. A small investment for the developer suite and single click db and file backup with single click restore to any server. I couldn’t imagine life without it now!

  2. Is there any way to only back up new content? I’m working on a site with tens of thousands of posts and to download 100mb on a daily basis doesn’t seem practical :/

    1. I’ve been using vaultpress since its beta launch. I swear by it. I’m able to download database backups, themes, plugins etc from around a year ago on any date I want. Very few backup options offer you that.

  3. I run a VPS that hosts quite a few WP sites. I use a combination of AutoBackupMySQL (by Swordsky – http://www.swordsky.com/) to dump DBs to files every night and keep each backup for 30 days, and then JungleDisk server edition to backup the file structure and these DB dumps shortly afterwards.

    Has saved my neck a few times – reliable and cheap. JungleDisk does differential backup so that keeps uploads/storage costs minimal.

    VaultPress gets my vote as a user-side backup tho.

  4. i use PhpMyBackup most times. It is very easy to understand, has many functions and is open-source. It can even send the backup via mail to you.

  5. Good info you did a good job thank you for the info and the time you are taking to teach us newbies how to do things. Thank you again awesome input

  6. Glad you all enjoyed the article. I appreciate you all adding your own personal backup options to the list as I’m sure it helps other Noupe readers :)

  7. Thank you for this guide! Believe it or not, I’ve been blogging for 6 years and I still find backing up confusing, mostly the difference between backing up from PhpMyadmin and backing up from the dashboard.

    Bookmarked for future reference!

  8. thanks for the list of backup plugins at the end!

    using the xcloner plugin for all my wordpress sites. i like the userfriendly way of configuration and, of course, the cost free service.
    all backup solutions with no connection to an external storage device like dropbox or the amazon cloud have the problem of limited storage space on webaccounts. in some cases you can avoid this by deleting old backup files via cronjobs or within the plugin itself.

  9. I’m a poor guy with no money to spend and I’m using the old traditional method to copy files across via FTP and many times it works. Recently I got into trouble when transferring one site from a location to another. I think is because the DB is too large and gives errors. I might consider one of the alternatives described in this article.

  10. Thanks for the very helpful review. I found your site/post via search for “myrepono codeguard backupbuddy vaultpress.”

    My blog is large and has been around for several years (just passed 1,000 posts). I’ve always done DB backups using WP-DBManager. But after cleaning up two sites that got hacked recently, I’ve been looking for a more complete solution.

    I’ve spent the last few days trying to get BackupBuddy working but I’ve been unsuccessful and have pretty much given up on it. Apparently, it doesn’t work well on Dreamhost (shared) hosting when the site is large (my site is 1.5GB+).

    At the moment, I am considering CodeGuard and MyRepono, but after reading your post, will look at the others as well. While I like the idea of VaultPress, I don’t feel the need/desire to spend $15/month. MyRepono sounds like a good option, but I also like the security features of CodeGuard (especially after being hacked).

    Thanks again for the helpful review!

  11. I simply backup my database using WP-DB-Backup, the reason why I like it so much is because it emails me an attachment of the php file every week, or however else frequently I choose. It’s important to set up automatic backups because most people forget to make them regularly, or something they think they have made backups more recently than they think. (A manual backup made 2 months ago, feels like it was made just 2 weeks ago).

    Most improtantly, don’t forget to restore a backup under a test environment on a local server emulator on your hard drive or on a web server (on a noindex nofollowed test site). This is to make sure

    a) you know how to restore when the time comes
    b) that the backup files actually work and are not corrupt or incorrectly configured.

  12. I didn’t know anything about wordpress backup methods. It just cleared my all doubts and saved my lot of hours. Now i can sleep early…… Thank you for sharing :)

  13. Thanks for this – I was unsure about how to backup and your article pretty much spelled it out to me! I used Cpanel and did it that way. With so many variants, is there a particular free plugin thats benefits outweigh using any of the others?

  14. I use BackWPUp, and have been for a few weeks now. I haven’t had one problem with it. Restoring is a breeze as well. Every morning at 3am I get an email telling me that the backup was successful. I can even select which folders to back up, optimize databases, and even back up to Amazon, Dropbox, Google Storage…the list goes on. You can set the limit of back ups in each directory so that your server, or storage solution, doesn’t get full.

    Be sure to donate! It is absolute the most prized plugin I have.

  15. There is another great solution to backup your website. allow incremental and full files backup, database backup without mysqldump that do not lock the access to database during backup. The backup can be encrypted, a good solution to protect the low security md5 wordpress password encryption. The archives can be sent to Email, Amazon S3, email or locally, Dropbox is actually in development. It integers a restoration system without files manipulation, downloading automatically backups from storages.

  16. I have read your article and am very new to building a website and very confused how to restore from my backups. I had tried to change the url and site url from angelsforgiving.net/wordpress to angelsforgiving.net. When I tried to restore to server I get 2 fatal errors. Now only have empty wordpress website with no pages or ecommerce of my original website.

    Is there any way you can help me on how to restore my website to server or provide me with information how to do this. I don’t know what folders to restore and what folders to restore to on server. Can’t find anyone to help I have been all over the internet and wordpress with no luck. Thanks for your time.

  17. You should also take a look at blogvault.net. Works extremely well. You can test your backups on their site, you can migrate your site easily and it offers a 30 day backup history. There isn’t any limit on the size of the website you can backup plus they offer great customer support. At 9$ a month, that’s pretty great

  18. Very nice tutorial for something that should be number-one-priority for every serious WordPress user! Some time ago, I did my own research about the topic. More specifically, I wanted to backup a live website and restore it on my localhost, for further testing.

    I’m glad to share my tutorial for backing up WordPress and restoring it locally. There’s something important to say about the ‘serialized PHP strings’ that WordPress is using. So I guess this might be some extra value added to your already thorough article…

    I hope it may be useful for someone. Keep up the good work here! (Btw, sorry for my not fancy twenty eleven theme… :) )

  19. I was looking for an article about how to backup a WordPress site and I ended to this perfect article. Enjoyed reading and looking forward to applying it to my websites. Thanks Kevin.

  20. Please never forget that a backup is only as good as the result of your restore test. Never only create backups, but also carry out restore tests.
    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/

  21. Came across this post while researching backup options for wordpress. It seems this is quite the rabbit hole of a topic. Lots of good information here which seems to still be relevant. I’m on GoDaddy, and to confirm, Manage WP will sort of work but it’s not ideal when it comes automated backups. I’m looking into some of the other options you have listed. Thanks for putting this together.

  22. phpMyadmin is the best tool i’ve ever used to make a database copy of my wordpress site. It exports everything including saved settings of plugins & themes so you no need to worry about that. This is relly helpful when migrating blog to different host or domain. Thanks for sharing

  23. What’s up to every one, the contents present at this web page are genuinely remarkable for people experience, well, keep up the good work fellows.|

Leave a Reply

Your email address will not be published. Required fields are marked *