Knowledgebase: Domains
Cloning a Website to Your Development Environment
Posted by on 13 February 2013 07:30 PM

Applies to Paralle's Plesk 10.x.x & 11.x.x

If you have a production website and want to improve it, it is advised to clone it and let your designers and programmers work on the copy of the site without interrupting the operations of your production site. Cloning is done by creating a copy of your site files and databases attached to it.

1. Prepare development environment.
You are advised to decide where you will host your development copy before copying site files and databases. Depending on your security and production isolation policy, you may choose to create a development copy of your site under the same hosting account, under a different hosting account on the same server if you have FTP access to its files, or on another server. If you decide to go with development site under the same account, add a site (domain or subdomain), or designate one that already exists. If you want to use another server or another account, make sure FTP access to your development site is correctly configured. In all cases, you may follow regular site creation procedures to prepare your development instance.

2. (Optional) Install APS applications

Install the desired site applications in your development environment in the same subdirectory as you have on your production site.

This step is needed if you set up your development environment under your account in the Panel and your production site has APS applications installed via the Panel (at the Applications tab). The reason is that copying site files will not register a new instance of APS application on your site copy. The application copy will still work, but it won't be listed among Installed Applications on the Panel Aplications tab, so you will not be able to change its settings from the Panel. In such a case, you will have to change all database connection settings manually in the application scripts. So perform this step to avoid such manual operations and take advantage of the APS management on your development instance.

3. Copy site files.
To copy your site content, go to the production subscription and select the "Website Copying" operation. You are advised to decide where you will host your development copy before going to that page and preparing the destination for the site content (see Step 1).

4. Copy databases.
In the production subscription, go to Websites & Domains tab > Databases. Click the name of the database with which your site works and select the "Make a Copy" operation. If your site works with more than one database, repeat the procedure for each database. If your production site produces a substantial load on the database server, it is advised to install a separate database instance for development purposes. Create and register the new databases with your development workspace. Then copy your production databases to the development server.

5. Change database connection settings in the scripts.
Be sure to change the database connection settings in the scripts in your development version. Remember that after the files are copied, they are still pointing at the production database. Make sure that your developers will work with the cloned instance instead.

6. (Optional) Complete APS applications setup.
Go to the Applications tab for your development site, locate the application in the list of installed applications, open its Settings screen and re-save the parameters. With this operation, the APS scripts should stop pointing at the production database and reconnect the application to the database copy.

This step is needed if your production site has APS apps installed via the Panel and you performed Step 2 of the current instruction.

(1 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).