Restoring WordPress from a Backup: Quick Guide

enquerer > Blog > Uncategorized > Restoring WordPress from a Backup: Quick Guide
Restoring WordPress from a Backup

Are you preparing to restore your WordPress from a backup file? We always keep a backup of WordPress so that we can restore what we have done if something goes wrong. Anyway, the process of restoring WordPress from a backup isn’t an easy task for beginners. Here, let’s discuss how you can easily restore your WordPress from a backup.

Following are the methods we are discussing in restoring a backup. You can easily navigate to choose any method that you prefer.

  • Backing up and restoring a WordPress website
  • Restoring your WordPress from phpMyAdmin
  • Restoring your WordPress from cPanel
  • Restoring your WordPress with BackupBuddy
  • Restoring your WordPress manually with FTP
  • To Do after the restoring is done

Backing Up And Restoring A WordPress Website

There are several methods that you can use to create a backup of your WordPress website. Some of the best ways are by using the phpMyAdmin, cPanel, or a reliable WordPress backup plugin.

You can also choose to make a manual backup of the WordPress database by downloading your WordPress files with an FTP.

The process of restoring purely depends upon the way you created the backup. While manual backups can only be restored manually, backups created with backup plugins can be restored with the same plugins.

Usually, not all WordPress users make an entire backup of their WordPress sites. They instead create a backup of their theme, upload directories, and databases. This helps to reduce the backup size yet increases the steps for restoration.

Whichever way you choose to create your backup, the basic steps for restoration are the same.

Now, let’s have a look at different backup methods and how to restore these backups. You can use the easy navigation links to switch to your preferred restore method.

Restoring Your WordPress From phpMyAdmin

While you are restoring a backup created manually, you will face two choices, possibly. Either you can empty your existing database to import the backup, or you can create a new one to import the backup.

If you are in the process of cleaning up your hacked WordPress site, it is very important that you change the MySQL username and password, and only then should you proceed to create a new database or import into an existing one.

For creating a new database, log in to your cPanel dashboard and click the MySQL Databases icon.

You will be prompted to enter a name for the database. Then, click ‘Create Database’.

When you have finished creating the database, scroll down to MySQL users section to add a new MySQL user.

Scroll further down to the ‘Add user to database’ section to add the user to the MySQL database. Choose the user and database from the drop-down and click on ‘Add’.

Now that your database is ready, you can start the process of restoring your WordPress database backup.

Move again to the dashboard and click ‘phpMyAdmin’.

Select the new database name and click ‘Import’.

Choose the database backup file by clicking on the ‘Choose file’ button. Finally, click the ‘Go’ button at the page bottom to continue the restore process.

The backup will now be imported into your database.

A success message will be displayed upon the successful completion of the import.

You have imported your WordPress database successfully. Now its time to install WordPress with your new database. If WordPress is already installed, all you have to do is add the new database settings into the wp-config.php file and that’s it.

Restoring Your WordPress From cPanel

If your WordPress database backup is created manually using cPanel on the shared hosting, you can use the same cPanel to restore the database.

Log in using your cPanel account and choose ‘Backup’ from under the files section.

Now, scroll down and click on the ‘choose file’ button under ‘Restore a MySQL database backup’. Select the backup file from hard disk, and click ‘Upload’.

Restoring Your WordPress with BackupBuddy

BackupBuddy is a premium WordPress backup plugin which is popular in its domain. Follow this section if you have created a backup of your database using BackupBuddy.

You can restore your WordPress using BackupBuddy in a very convenient way. Just log into your WordPress website and navigate to BackupBuddy’s Restore/Migrate page.

Download a copy of the importbuddy.php file, where you will be prompted to provide a new password for importbuddy. You can use this password while restoring the website.

Now, download a copy of the backup if it isn’t done yet. Go to BackupBuddy and then Backups to download the backup. You can also download it from the destination you used to save the backup.

Once you have the zip file of backup and importbuddy.php in hand, use an FTP to connect to your website. Once you have a complete backup, clear your server of all files and folders.

If you are going for a partial backup, first download the files in the server that you have not backed up. Once everything is properly backed up, delete the files and folders from the root directory of your website.

Now, upload the BackupBuddy backup and the importbuddy.php files to the root folder.

After uploading the files, open importbuddy.php in a web browser. As it rests in your root directory, it will have a URL sounding like ‘www.yourwebsitedomain.com/importbuddy.php’.

Enter the password you created while downloading ImportBuddy.

On the upcoming screen, ImportBuddy will display the database backup file you have uploaded. Once you select your database, click ‘Next Step’ to continue.

Now, ImportBuddy will unzip the backup file. A success message will be displayed after extracting the files. Click the ‘Next Step’ button to continue.

In the next step, provide the website URL and database information when prompted.

Skip using your old database if you’re trying to restore your site from a website hack. Creating a new database is advised in this case. Once you have created the database, provide the details of the database.

Click the next button and then, importbuddy will test the database settings and start importing your data. Once completed, click ‘Next Step’ to continue.

Now, your site URLs, paths, etc. will be updated. Then you will be prompted to test your website. If the test goes good and everything works fine, your restoration is successful.

Click on ‘Clean up and remove temporary files’ in the importbuddy page to delete the temp data created during the restoration.

Restoring Your WordPress Manually with FTP

You should delete the entire WordPress database if you want to restore WordPress instead of a hacked site. Before deleting, ensure that all changes, customizations, and uploads are properly backed up.

To delete the files, log into cPanel, and under ‘Files’, click the ‘File Manager’ icon.

Proceed and choose the Webroot as the directory. A new browser will open up with the file manager interface. Select all the WordPress files and choose to delete them.

You can also use FTP to delete the files. But this is way slower, so better go for the previous method.

Now, download a fresh copy of the WordPress software from WordPress.org and extract files to the hard disk.

Launch FTP client and upload all the WordPress files into the server.

Once successfully uploaded, upload the wp-config.php file from backup. Make sure that the wp-config.php file is secure and uncompromised.

Now, upload the remaining files from your backup. Prefer uploading images only from /wp-content/uploads/directory.

Once everything is uploaded, visit the website for checking if everything is fine and working properly.

Log into your WordPress admin and install the plugins you had previously used on your website.

Now go for installing the theme you used. In case you used a customized theme or a child theme, you can directly restore it from the backup. Only make sure that these files haven’t gone corrupted.

Finally, navigate to Settings and then to Permalinks to adjust the permalink settings for matching the website. Update the permalinks after the adjustments.

To Do After The Restoring Is Done

Once the website is successfully restored, it is recommended that proper website security is maintained.

Always make sure that a regular backup is made for your WordPress with any of the backup plugins.

For security, change your WordPress password immediately after the restoration. In case of a multi-user website, inform all your users to change their passwords immediately.

Also, install a firewall on your website. Firewalls monitor for security threats and ensure the security of your website.

To Wrap Up

Hope you liked reading our article. Got any suggestions for improvement? Share them with us in the comment box, so that we can make ourselves better. Sharing always helps. 🙂

Nabeel Aslam is a technical writer and content marketer for Flyingloop. He writes product marketing contents and blogs for WordPress and other web related services since he joined the team in 2018.

Leave a Comment