Home Blogging ResourcesPlugins How to Manually Restore VaultPress Backup to Localhost in 5 Easy Steps

How to Manually Restore VaultPress Backup to Localhost in 5 Easy Steps

by Pradeep Mamgain
132 views
How to Manually Restore VaultPress Backup to Localhost in 5 Easy Steps

VaultPress is a real-time backup and security scanning WordPress plugin. It back up everything; every post, picture, page, comment, revision, and settings. VaultPress allows you to restore a backup with just click of a button. However, if you are want to manually restore a VaultPress backup to your local computer (localhost) to create an exact functional copy of your website, this article walks you through the process in 5 easy steps. Moreover, you can follow this process to manually restore the backup to a live host.

If you don’t have VaultPress which is a paid plugin, you can also take backup using cPanel and create a copy of your live website on Windows localhost using XAMPP.

Restore VaultPress Backup: This article walks you the whole process of manually restoring a VaultPress backup to a local computer in 5 easy steps.Click to Tweet

Manually Restore VaultPress Backup in the Local Environment

There are many reasons to restore a backup to localhost:

  1. Test plugin and themes locally with your website data.
  2. Fix and test the issues and then migrate it back to the live server.
  3. Use locally hosted WordPress to develop plugins and themes.
  4. Access to an identical copy of the live website.

That being said, in order to restore your data, first, you need to ensure that WordPress is installed and functioning on your local webserver or on another host.

Step #1: Download ValutPress Backup

Choose JetPack > VaultPress from the left pane of the WordPress Dashboard. Now, click the Visit Dashboard button to open the VaultPress Dashboard page. Next, click Backups; a list of latest backups will be displayed.

Download ValutPress Backup

Note that VaultPress orders backups by date, the most recent backup will be at the top. Click the View Backup button corresponding to the date you want to restore. On clicking the button, you will see the folder structure that will be downloaded. If you want to see the files marked for download, click the black tringle beside the folder name.

vaultpress backup contents

Click on the Download button; a popup will be displayed. From this popup, you can select the components that will be downloaded. Leave all options at default values and click the Prepare Backup button. VaultPress will now prepare the download. The more files you have, the more time VaultPress will take to prepare the download.

You will get an email when the download is ready. On completion of the process, you will see a blue Download button. Click on the button and save the compressed backup file (with a file extension .tar.gz) on your system.

preparing vaultpress backup
vaultpress backup processing
download button

Now, extract the content of the downloaded archive file using 7-Zip. On extracting, the resulting folder will contain your data. The data is divided into two folders: /wp-content and /sql. The /wp-content folder contains these sub-folders: /plugins, /themes, and /uploads.

Step #2: Copy Credentials from wp-config.php

Open the wp-config.php file from the download folder that you saved on your computer and note down the following information:

  • Name of the database
  • Database username
  • Database password

Step #3: Install WordPress on Localhost

Before you can restore data, you need to ensure that WordPress is installed and functioning on your localhost. Please go through the following article to know about the process of installing WordPress on localhost: How to Install WordPress on Windows (Localhost).

Here’s a quick summary:

  • Download WordPress from WordPress.Org.
  • Extract the WordPress folder from the downloaded file and copy it inside \wamp64\www folder. Now, rename the WordPress folder to whatever you want to call it, for example, mysite. Later, to install WordPress you have to navigate to http://localhost/mysite.
  • Open phpMyAdmin and create a database. The name of the database should match with the name mentioned in wp-config.php.
  • Once you create the database, you need to add the database user to it. To do so, make sure the newly created database is selected in phpMyAdmin and then select the Privileges tab. Now, click Add user account. Set the database user name (refer to step #2) in the User name field and database password in the Password and Re-type fields. Now, select the Check all checkbox corresponding to the Global privileges option and then click Go.
Database Privileges
Create Database User

Step #4: Restore VaultPress Backup

Before we proceed with restoring the backup, we need to empty the database we created. To do so, select the database you created from the left pane of phpMyAdmin and select all the tables in the right pane. Now, select Drop from the With selected drop-down. Next, click Yes to empty the database.

Merge SQL Files

The /sql folder you downloaded contains several .sql files. For example, the wp_posts table will be represented by /sql/wp_posts.sql file. We need to import these files to the local database. Importing these SQL files individually into the database is a tedious process. To speed up the process, you need to join the SQL files into a single file. To do so, open the command prompt and navigate to the /sql folder and then execute the following command:

copy /b *.sql newfile.sql

Now, in the phpMyAdmin, make sure the database is selected and then click Import from the right pane. Next, click the Choose File button and select the newfile.sql file. Now, click Go to import the database.

Import Database

Note: If you are on OS X, launch Terminal.app and run the following command: cat *.sql > backup_db.sql. To import .sql files, you can use the Sequel Pro tool.

Note: If you have the direct access to MySQL via a command line, you can run the following command: mysql –user=”username” –password=”password” –hostname=”mysql.yoursite.com” database_name < file_name.sql

Transfer Site Contents

Copy /wp-content folder to \wamp64\www\yourwordpressfolder; overwriting the existing wp-content folder. Also, overwrite the .htaccess file.

A Final Check

Check that the following files should be present on your local server if they are present on your live server:

  • /.htaccess
  • /wp-config.php
  • /robots.txt
  • /favicon.ico
  • /wp-content/languages/
  • /wp-includes/languages/
  • /apple-touch-icon.png
  • /apple-touch-icon-precomposed.png
  • /startup.png
  • /LiveSearchSiteAuth.xml
  • /BingSiteAuth.xml
  • /crossdomain.xml

Admin Dashboard

We have dropped all tables before importing the .sql files. Therefore, to access the WordPress dashboard, you should use the credentials that you use to login to your live website. The credentials you entered while installing WordPress won’t work anymore.

Step #5: Update URLs and Domains

When restoring the site to a new domain or local computer, you need to update the siteurl and home values in the wp_options table. But before we do that, we need to create a Virtual Host for our local website.

Create Virtual Host

Left-click on the WAMP icon on the system tray and then choose Your VirtualHosts > VirtualHost Management from the popup menu.

WAMP server virtual host

In the page displayed, enter the name of the virtual host and its complete absolute path. Next, click the Start the creation of the VirtualHost button to create the virtual host. Now, restart all WAMP services. Once you create the virtual host, you can access your website by just typing http://name-of-the-virtual-host in the browser.

create virtual host

Update Site URLs

In phpMyAdmin select the wp_options table and then double-click on the option_value corresponding to the siteurl name and change option_value to http://name-of-the-virtual-host. Similarly, repeat the process for the home option_name.

Update Site URLs

Now, type http://name-of-the-virtual-host in the browser to access your restored exact copy of the live website.

Congratulations, you just manually restored VaultPress backup in the local environment.

How to Manually Restore VaultPress Backup to Localhost in 5 Easy Steps
How to Manually Restore VaultPress Backup to Localhost in 5 Easy Steps

Conclusion

Manually restoring a VaultPress backup might sound like a tall order, but it’s really nothing you need to be scared of. If you follow this guide step-by-step, you won’t be facing any problem. This is all it takes to manually restore VaultPress backup to localhost:

  1. Download ValutPress Backup
  2. Copy Credentials from wp-config.php
  3. Install WordPress on Localhost
  4. Restore VaultPress Backup
  5. Update URLs and Domains
Restore VaultPress Backup: This article walks you the whole process of manually restoring a VaultPress backup to a local computer in 5 easy steps.Click to Tweet

I hope this article helped you learn how to enable the SSH and SFTP access for VaultPress. If you liked this article, please subscribe to our newsletter. You can also connect with us on YouTubeFacebookTwitter, and Pinterest. If you are a foodie, please check our recipe grid.

Do you have any questions or suggestions about manually restoring VaultPress backup? Ask away in the comments section below.

You may also like

Leave a Comment

shares