| Type: |
Code 
|
| Level: |
Intermediate
|
| Date: |
2007-Sep-12
|
| Visited: |
1800 times
|
| Rating: |

|
| Author: |
Stephen Think |
|
|
This tutorial will help you duplicate a website you already have in Plesk but with a different domain. It is applies for all Linux distributions. It has been tested on Fedora Core.
In the future instructions we will use domain1.com and domain2.com . We will make a mirror of domain1.com which is already setup in Plesk.
Make sure that you first add domain2.com in Plesk and setup a physical hosting for it.
Most likely you will need only the contents of only httpdocs folder from domain1.com.
Login via ssh with root privileges and execute the following command:
cp -R /var/www/var/domain1.com/httpdocs/* /var/www/var/domain1.com/httpdocs
chown -R domainuser2:psacln /var/www/var/domain1.com/httpdocs/*
In the above domainuser2 is the FTP user name for domain2.com physical hosting.
If your daomain1.com website has a database you will most likely want to create a separate database for domain2.com also.
Let's say that you have created the database for domain2.com in Plesk and named it db_domain2. For domain1.com we have database name : db_domain1.
Run these two commands in ssh terminal :
/usr/bin/mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` --databases db_domain1 --lock-tables > db_domain1.sql
/usr/bin/mysql -uadmin -p`cat /etc/psa/.psa.shadow` -d db_domain2 < db_domain1.sql