Beginner’s Guide: How to Restore WordPress from Backup

Do you need to restore WordPress from a backup file? Backups help you restore your website in case something goes wrong. However, restoring WordPress from a backup file is not easy for beginners. In this article, we will show you how to easily restore WordPress… Read More »

The post Beginner’s Guide: How to Restore WordPress from Backup appeared first on WPBeginner.

Do you need to restore WordPress from a backup file? Backups help you restore your website in case something goes wrong. However, restoring WordPress from a backup file is not easy for beginners. In this article, we will show you how to easily restore WordPress from backup step by step.

How to Restore WordPress from Backup

Since this is a lengthy article, we have added table of contents for easier navigation.

Note: This guide is about restoring a WordPress site from backup. If you are trying to move your website to a new domain, then you should check out our guide on moving WordPress to a new domain without losing SEO.

If you are trying to move from localhost to a live web hosting account, then follow this guide on how to move WordPress from local server to live site.

Understanding Backups and Restoring WordPress

There are different ways to create backups for your WordPress site. The best way to create a backup is by using a WordPress backup plugin.

Alternately, you can also create manual backup of your WordPress database and download your WordPress files using FTP.

Restoring WordPress from backups depends entirely on how you created the backup. For example, backups created using BackupBuddy or UpdraftPlus can be restored by using the same plugin. Similarly, manual backups need to be manually restored.

A lot of WordPress users don’t backup their entire websites. Instead, they only backup their theme, uploads directory, and their WordPress database. This reduces their backup size, but increases the steps needed to restore the site.

No matter how you created your backup, the basic steps are the same.

Let’s take a look at how to restore your WordPress site from backup. Since we’re covering different restore methods, please skip to the section that applies to you.

Restoring WordPress from BackupBuddy Backup File

BackupBuddy is a popular premium WordPress backup plugin. If you used BackupBuddy to create backups, then this section is for you.

BackupBuddy offers a very convenient way to restore WordPress from a backup. You need to login to your WordPress website and go to BackupBuddy » Restore/Migrate page.

You will need to download a copy of importbuddy.php file. In the process, you will be asked to provide a password for importbuddy. This password will be used when you restore your website.

Download importbuddy

Next, you need to download a copy of your backup if you haven’t already done so. You can download it from BackupBuddy » Backups or the destination that you used to store your backups.

Once you have the backup zip file and importbuddy.php stored on your computer, connect to your website using FTP.

If you have a complete backup of your website, then delete all files and folders from your server.

However, if you have a partial backup, then you need to first download the files that you haven’t backed up. Once you are sure that you have everything backed up, proceed deleting all files and folders from your website’s root directory.

Delete old WordPress files

Next you need to upload your BackupBuddy backup and importbuddy.php files to your website’s root folder.

Once both files are uploaded to the server, visit importbuddy.php in your web browser. It is in your website’s root directory, so its URL will be something like:

http://www.example.com/importbuddy.php

ImportBuddy will now ask for the password that you created when you downloaded ImportBuddy.

importbuddy password

On the next screen, ImportBuddy will display the backup file you uploaded. In case you did not upload your backup file using FTP, then you can click on the upload tab to upload the backup file now. If you have your backups stored on iTheme’s Stash storage service, then you can connect to it by clicking on stash tab now. Once you have selected your database, click on Next Step to continue.

Select your backup file

ImportBuddy will unzip your backup file and show you a success message when it has extracted the files. Click on the next step button to continue.

On the next screen, ImportBuddy will ask you to provide site URL and database information.

If you are restoring a hacked WordPress website or trying to remove malware, then you do not want to use your old database.

You can either drop tables from your old database using phpMyAdmin, or create a new database using cPanel. Once you are done creating a new database or emptying the old one, provide your database details.

On the other hand, if you are sure your site wasn’t hacked, then you can use the same old database details.

database settings

Click on the next button to continue and importbuddy will now test your database settings and import your data. Once it is done, click next step to continue.

Now ImportBuddy will update your site URLs, paths, etc. After that, you will be asked to test your site. If everything is working fine, then you have successfully restored your website.

Review and cleanup

On the importbuddy page, click ‘Clean up and remove temporary files’ button. This will delete temporary data in database and files created during restoration.

Restoring WordPress using UpdraftPlus Backup

UpdraftPlus is another popular WordPress backup plugin. It allows you to easily backup and restore your WordPress site.

First you need to make sure that you have a complete backup of your WordPress site created by UpdraftPlus. Next, you need to download the backup files to your computer.

If your backups are stored by UpdraftPlus on a remote storage location like Dropbox, Google Drive, etc, then you can download your backup files from those locations to your computer.

Next, you need to connect to an FTP client and delete all WordPress files. After that you need to install WordPress again and login to your website.

You will need to install and activate the UpdraftPlus plugin. Upon activation, visit Settings » UpdraftPlus Backups page and click on the Restore button.

Upload your backup files

Next, you need to click on the ‘Upload backup files’ link and then uplaod the backup files you downloaded earlier.

Uploading backup files

Once your backup files are uploaded, UpdraftPlus will scan those files and will show them on the backups page.

You will need to click on the ‘Restore’ button to proceed.

Restore backup files

This will bring up a popup where you need to click on the restore button again to continue. Make sure that all available backup files such as plugins, database, themes and others are selected.

Restoring backup files

UpdraftPlus will now start extracting and restoring data from those files. Upon success, you will be redirected to the success page.

Backup restored

That’s all, you have successfully restored your WordPress site from an UpdraftPlus backup.

Restoring WordPress Database from Backup using phpMyAdmin

When restoring a manually created backup, you may come across two possible choices. You can either create a new database and import your backup into it, or you can empty your existing database and import backup.

If you are cleaning a hacked WordPress website, then it is very important to change your MySQL username and password before creating a new database or importing into existing database.

To create a new database, login to the cPanel dashboard of your WordPress hosting account and click on the MySQL Databases icon.

MySQL Databases in Cpanel

Next, you will be asked to provide a name for your database and then click on the ‘Create Database’ button.

Create new database

After creating the new database, you need a MySQL user associated with that new database. Scroll down to the MySQL users section and add a new user.

Add new database user

Next, you need to add this user to the MySQL database. Scroll down to ‘Add user to database’ section and select the user along with the database from the drop down menus and then click on the add button.

Add user to db

Now your new database is ready. You can use it to restore your WordPress database backup.

Head over to the cPanel dashboard again and then click on the phpMyAdmin icon.

Launch phpMyAdmin

Next, you need to click on your new database name and then click on the import button.

Importing your database

Click on ‘choose file’ button to select your WordPress database backup file and then click on the go button at the bottom of the page to continue.

PhpMyAdmin will now upload your backup and import it into your database.

You will see a success message upon completion.

That’s all. You have successfully imported your WordPress database. Now the next step is to install WordPress using your new database. If you have already installed WordPress, then add your new database settings into your wp-config.php file, and you will be good to go.

Restoring WordPress Database Backup using cPanel

If you manually created a WordPress database backup using the cPanel on your shared hosting, then you can also restore that database using cPanel.

Log into your cPanel account and under the files section click on Backup.

Backup in cPanel

On the backups page, scroll down to ‘Restore a MySQL database backup’.

Next, click on the choose file button and select the backup file from your hard disk. Once done, click on the upload button.

Restore database using cPanel

Manually Restoring WordPress Files using FTP

If you are restoring WordPress to clean up a hacked site, then you first need to delete all existing WordPress files and directories.

Only do this if your backup is upto date, and you have everything customized, changed, or uploaded on your website.

If you have all your uploads and customizations, then you can safely delete everything on your website using cpanel (way faster) or using FTP.

To delete all files from your website, login to the cPanel of your hosting / VPS hosting and under files section click on the file manager icon.

File manager in cPanel

Go ahead and choose Web root as your directory and proceed. File manager interface will now open in a new browser tab. You will need to select all WordPress files and delete them. This way is much faster.

You can also delete files using FTP, but it’s slower. Simply connect to your website using an FTP client and select all files in your WordPress root directory to delete them.

Delete old WordPress files

Next, you need to download a fresh copy of WordPress from WordPress.org and extract it to your hard disk.

Launch your FTP client and then upload all WordPress files to your server.

Upload WordPress files

Once you have uploaded WordPress files, you can upload wp-config.php file from your backup (only if you are sure that it is clean and not compromised).

Alternately, you can rename wp-config-sample.php file in your freshly uploaded WordPress files to wp-config.php file. After that you will need to edit wp-config.php file and enter your database information.

Don’t forget to save the file and upload it back to your website.

Next, you need to upload other files from your backup. We will recommend that you only upload your images in /wp-content/uploads/ directory.

Once you have uploaded these, visit your website to check that everything is working fine.

Next, you need to login to your WordPress admin area and start installing plugins you had on your site.

Now you can move on to install your theme. If you had customized your WordPress theme or were using a child theme, then you can restore it from backup. However, make sure that those files are clean.

Lastly, go to Settings » Permalinks and adjust permalinks settings to match your site and then update permalinks.

Troubleshooting WordPress Backup Restore Issues

There are some common problems that you may come across when restoring your WordPress website. We have separate guides for each of them.

Things to do After Restoring your WordPress Site

Once you have successfully restored your website, we strongly recommend that you improve your website security.

If you haven’t done so already, please make sure that you have a regular WordPress backup with one of these WordPress backup plugins.

For securing your website, we will recommend that you immediately change your WordPress password. If you are running a multi-user website, then ask all users to update their passwords immediately.

You can also install a website firewall. At WPBeginner, we use Sucuri to monitor and strengthen security of our website. It monitors for security threats, and they also offer malware removal service with their subscription plans. See how Sucuri helped us block 450,000 attacks in 3 months.

We hope this article helped you learn how to restore WordPress from backup. You may also want to see our ultimate step by step WordPress security guide for beginners.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post Beginner’s Guide: How to Restore WordPress from Backup appeared first on WPBeginner.

How to Keep Your WordPress Content Safe with BackupBuddy

BackupBuddy is an automated full-site WordPress backup plugin that keeps your WordPress content safe by creating database backups and core files as well.

The post How to Keep Your WordPress Content Safe with BackupBuddy appeared first on WPBeginner.

Are you looking for a reliable backup plugin for your WordPress site? Whether you run a small personal blog or a business website, we highly recommend that you setup an automated backup solution for your WordPress site. In this article, we will show you how to keep your WordPress content safe with BackupBuddy.

Keeping WordPress safe with BackupBuddy

Why You Need a WordPress Backup Plugin for Your Site

All websites on the internet are vulnerable to security threats. Any website can fall prey to hackers, data loss, or server disasters.

This could happen to anyone, whether you are using a WordPress site or not. Anyone with experience can tell you the question is not if it will happen, it is when it will happen.

The first step to protect yourself against such disasters is by implementing an automated backup solution.

Just like your computer, you can backup your website and store backups on separate locations. This allows you to easily recover your website when you need it.

If you do not update your website on a regular basis, then you can probably create a manual database backup and download your WordPress files. However, if you regularly update your site, then it wouldn’t be possible to always keep your backups up to date.

This is where BackupBuddy comes in. It is a WordPress backup plugin, which allows you to automatically create complete backups of your WordPress site and save them on multiple remote locations like a cloud storage service, your computer, FTP server, etc.

Installing BackupBuddy on Your WordPress Site

First you will need to purchase the BackupBuddy plugin. The pricing starts from $80 which gives you access to 1 year of plugin updates and support, 1 GB of cloud storage on Stash, Stash live, and you can use it on 2 sites.

After purchasing the plugin, you need to download it to your computer.

Next, you need to install and activate the BackupBuddy plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you’ll need to add your BackupBuddy license before you can get automatic updates to the latest versions. The plugin will show you a link to the licensing page.

Links to licensing page

You can also visit the page by clicking on Settings » iThemes Licensing.

iThemes licensing page

Simply enter your iThemes username and password and click on the license products button to continue. Upon successful verification, you license will be activated.

Setting Up Real Time Backups with BackupBuddy and Stash Live

Your BackupBuddy plugin gives you access to Stash Live. It is BackupBuddy’s real-time backup storage system.

With real time backups, changes to your WordPress posts, pages, media, themes, and plugins will be automatically stored in your Stash live cloud storage.

This ensures that you always have the latest and most up to date backup of your site. Stash Live also makes it super easy to restore your website with just one click.

Simply visit BackupBuddy » Stash Live page in WordPress admin area and fill in your iThemes username and password.

You also need to provide an email address where you want to receive new backup notifications. These emails will contain a link to the zip downloads.

Login to Stash Live

Click on ‘Save settings and start backup’ button to continue.

BackupBuddy will now start creating your first backup and upload it to your Stash account. You will be able to see the backup progress on your screen.

Backup Progress for Stash Live

Since this is your first Stash live backup, BackupBuddy will create and upload the complete backup. This can take few minutes to few hours, depending on how much data you have on your site.

Leaving the progress screen will not disrupt the backup. You can do other things on your WordPress site and backup will continue running in the background.

Once it’s finished, you will receive an email notification. You will also see the backup files as snapshots on Stash Live page.

You can leave those snapshots on Stash Live. You can also download these snapshots to your computer or move them to your own server with one click at anytime.

Stash live Snapshots

Setting up Scheduled Backups with BackupBuddy

Stash Live allows you to have the most up to date backups of your WordPress site with real time backups.

However if you don’t want to use Stash live, then there are plenty of other ways to backup WordPress with BackupBuddy.

Simply visit BackupBuddy » Backup page to create and setup backups.

BackupBuddy quick setup wizard

First you need to provide an email address. This is where BackupBuddy will send you email notifications and backup emails.

Next you need to provide a password. This password will be used if / when you are moving your WordPress site to a new server or host using BackupBuddy.

Once you have set your password, then you need to choose where to send your backups.

There are a number of options available. You can store your WordPress backups in dropbox, Google Drive, Amazon S3, BackupBuddy’s Stash storage, among other options.

Choose where to save backups

Lastly, you need to select how often you want to create backups. You can create manual backups on demand, or select a monthly or weekly full backup option with daily database backups.

Click on the Save Settings button to continue.

BackupBuddy will now show you the backup profiles page. You can click on Database or Complete Backup profiles to create your first backup.

Backup Profiles

Since you haven’t created backups before, we recommend you to click on full backup profile.

Make sure you check the box next to ‘Send to remote destination as part of backup process’ option. This will bring up a popup from where you can select one of the destinations you added earlier.

Select backup destination

BackupBuddy will start creating your backup files. You will be able to see the progress of the backup. Once it is finished, you will see a success message.

You can now check your chosen remote destination to make sure that your backup was successfully transferred.

Restoring a WordPress Backup with BackupBuddy

BackupBuddy not only makes it easy for you to create backups, it also lets you restore your site from backups just as easily.

Simply go to BackupBuddy » Restore/Migrate page and scroll down to your backup section. There you will see the link to browse or restore files and database rollback.

Restore files and database from backup

For a full restore, you will need to download and upload importbuddy.php file to your server. See detailed instructions in our guide on how to restore WordPress from backup.

We hope this article helped you keep your WordPress content safe with BackupBuddy. You may also want to see our beginner’s guide on fixing your hacked WordPress site.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Keep Your WordPress Content Safe with BackupBuddy appeared first on WPBeginner.