Making a copy of your web site & database for testing using Plesk Onyx
Lest say you have a web site set up at for example at domain.xyz and you want to create a test environment to test a new plugin or how the site works with a new PHP version, here is how to do it.
Note: if you are using WordPress, there is a faster way to do it by Cloning the WordPress site.
1- Create a subdomain, for example: if your domain is domain.xyz: create dev.domain.xyz in DNS and in your Plesk Panel.
Now you should see the new subdomain dev.domain.xyz in your Plesk Panel at: https://psaXXX.his.com:8443/ - replace this with your real server Plesk Panel web address.
Website&Domains (scroll down to dev.domain.xyz)
It has been created with a separate web root directory (usually /test.domain.xyz/) so it won't be interfering with the main site's (/httpdocs).
2- Copy the web site and database to the subdomain
Go back to the main domain domain.xyz Plesk Panel tools:
Subscription-> domain.xyz -> Website&Domains->Tools-> Website Copying to copy the website files.
Subscription-> domain.xyz -> Website&Domains->Databases (on the right side).
Select the database -> Copy to copy the database to the new subdomain.
Create a new username & password for the database and make a note of it as you will need this information later.
3- (Optional) Change the CMS settings to use the subdomain name
Use the subdomain ** dev.domain.xyz Plesk Panel tools:
Subscription->dev.domain.xyz>->Websites&Domains->File Manager
For example; WordPress
Click to open and edit the file named wp-config.php
Change the MySQL settings to the subdomain new database copy's name, user & password.
Click OK to save it.
and test at https://dev.domain.xyz
If the web site displays without its Layout, i.e. you only see the text but no image or background color:
You will need to update the Home and Site URL in the subdomain WordPress from domain.xyz to dev.domain.xyz.
If testing a new PHP verison: You can change the PHP version for the subdomain domain via the Plesk Panel
Websites&Domains->domain.xyz->PHP Settings
We recommend using the latest PHP 7.X if possible.