GD Press Tools Pro includes a restore script that can clone/restore the full website archive into the new website. Currently, the plugin includes a script that can work with standard WordPress installation (no multisite support yet).

To be sure that the website is restored properly, you need to create a full backup on standard (no multisite) WordPress website (database and files), and you need to use the proper version of GD Press Tools Pro for creating a backup: backups made with plugin versions older then the restore script can’t be restored!

Full Backup Option
Full Backup Option

Once you have the backup file, you need to prepare a new location to restore a backup. You can restore the same website on a different server, or you can change the website URL, you can change the prefix used for database tables.

Prepare Restore

To restore the website to a new location, you need to have a restoration server prepared. Here are few pointers to make sure your new website is properly prepared and restore done as is it should.

  1. The destination folder must be empty before you start with the restore. If you have WordPress files in a location where you want to restore the website, the restore will replace existing files. This can create problems after restoration is completed, so it is important to start with an empty folder.
  2. The destination folder must be writable. Restore script needs to create folders, unpack the archive, edit some of the files. The folder must be writable by the PHP (same goes for WordPress). This depends on the server and how the PHP is executed. If the folder is writable for FTP access it doesn’t always mean that PHP scripts will have access too. If you are not sure about this, consult your hosting company support or documentation.
  3. The destination folder must be mapped to the domain name (or at least it needs a temporary URL that most companies provide until the domain name is set) and must be accessible from the web. When you add a domain to your server through the control panel (cPanel, Plesk or anything else), usually you get the folder where the domain points to. This is the folder you will use for restoring or cloning a backup archive.
  4. A database for the restoration or cloning must exist on the MySQL server. Most hosting companies will not allow for any script to be able to create databases, so you must do this before starting the restore. Creating a database depends on your hosting company and the server control panel you use (cPanel and Plesk are most common). As with new WordPress installation, you need a database server hostname, database name, username, and password. This is needed for the database restoration step.
Restore Script
Restore Script

Step 1: Get restore script

Once you have the backup file, you need the restore the script too. To get this script, open the Backup plugin panel, and open the second dropdown to get the Restore Script panel. From this panel, you can download the ‘gd-restore-backup.php’ file.

This file is located in the plugin archive in the addons/backup/restore folder if you want to get it from the plugin archive.Step 2:

Step 2: Copy files into restoration location

Now, copy both the restore script and full backup archive into the location where it will be restored. For the purpose of this article, I have prepared a demo website that will use restore.dev domain name, and empty folder this domain points to.

Step 3: Run the restore script

If your restore folder is mapped to domain restore.dev, once you copy restore script and backup archive into that folder, you can access restore script by visiting this URL in your browsers:

http://restore.dev/gd-restore-backup.php

This is only an example, the URL in your can be different (using HTTPS or with www before domain name).

Once you load the restoration URL, the browser will display the first screen for the restore process. If your database archive is valid, you will get information about that script, if not, you will see an error message.

Step 1
Step 1

If all is OK, and the wp-config.php file is present, you can continue to the next step, so click the Next Step button.

Step 2: Unpacking files

Once you click Next Step on Step 1 screen, the script will start unpacking files. This can take a while, depending on the archive size. Once that is done, you will get next screen.

Step 2
Step 2

Step 3: URL and Database

The most important part of the restore process is to set up a new URL and the database settings. Once you load the Step 3, you will see this:

Step 3: Old website information
Step 3: Old website information

This is an old URL for the website you have in the backup archive and database information from wp-config.php. Now, if you are simply moving the website to a new server, and you want to keep the same URL, you don’t need to change the website URL. If you are cloning an old site or you are changing the URL, you need to enter a new full URL (with HTTP or HTTPS included). This is the URL that you will initially use to access the website, and if your server is set up with a domain link, this is the URL you are using to run the restore script.

So, now you need to enter a new URL (if it is changed), new database connection settings, and if you want, change the prefix used for WordPress database tables. Once you fill that, make sure you click on the Test Database Settings button. The script will verify connection and prefix and will display test results.

Step 3: New settings
Step 3: New settings

If you don’t test new settings, or they have failed, continuing with restore will break. So, make sure the data is correct and valid and tested.

Step 4: Finishing Installation

This step will import database data, replace the website URL (if you have changed it), and replace the old prefix with the new one (if you have changed it). After that, the plugin will update wp-config.php and .htaccess files.

Step 4
Step 4

Step 5: Finishing restore

Once all this is done, the last step will clean up the temporary files used for restore and that’s it. You will see a new URL to load the newly restored website.

Step 5
Step 5

Troubleshooting

If the script breaks or you see any errors, make sure you make the note of them and report the errors in the forum. After the backup is completed, test everything: login, admin side, check out error logs.

0
0
1465
Rate this article

You are not allowed to rate this post.

Comments

Leave a Reply