Question
How to copy content of a website hosted in Plesk to another domain?
Answer
Limitations
Databases: This tool does not transfer databases. If your website uses a database (MySQL/MariaDB/MSSQL), you must copy it manually: How to copy a MySQL/MariaDB database in Plesk
Modern Frameworks: Applications using Laravel, Node.js, Symfony, or similar frameworks often require files stored outside the document root. The Website Copying tool only transfers files inside the document root. Any external files must be transferred manually.
Target Directory: If the destination domain/subdomain already exists, ensure it is empty. Leftover files or configurations from a previous installation can break the copied site. Back up and remove existing files in the destination before copying.
Hardcoded Data: URLs and file paths are often hardcoded in website scripts or databases. These will not be updated automatically and must be fixed manually by a web developer after the transfer.
Copying the website
- Log in to Plesk.
-
Create a new domain or a subdomain on the Domains page in Plesk.
Note: If you want to access a cloned domain from the Internet before switching DNS, create it as a temporary domain (e.g., staging.example.com).
- Crucial Step: Ensure the document root of the destination domain is empty. If files exist, remove them to avoid conflicts.
- Go to Domains > example.com (source domain) > Dashboard tab > Website Copying.
- For Site name, select the newly created destination domain / subdomain.
-
Select what to do with existing files (Keep or Delete).
- Click OK to start the copying process.
- If the website uses a database, copy it manually and update the website's configuration file (e.g.,
config.php,.env) on the destination domain to connect to the new database. - If using a framework (Laravel, Symfony, etc.), manually copy any required files located outside the document root.
-
Open the copied website in a browser to test it.
Note: Additional tweaks may be necessary since URLs and paths could be hardcoded in the database or scripts. This should be addressed by a web developer.
To copy a WordPress site, use the WP Toolkit clone feature, which automates many of the steps required to get it to work: How to clone a WordPress instance in Plesk
- Log in to Plesk.
- Go to Domains > example.com > Website Copying.
- Select FTP storage.
- Fill in the fields:
- Server host name: The hostname of the FTP storage (e.g., my.ftp.storage.com).
- Port: Default is 21. Specify if different.
-
Directory: The target directory on the FTP storage (e.g.,
/backup/example.com). - Username: FTP login username.
- Password: FTP user password.
-
FTP connection method:
- Active mode (recommended): Plesk sends its IP/port. Recommended if the Plesk server is not behind a strict firewall.
- Passive mode: Use this if the Plesk server is behind a firewall and cannot accept incoming TCP connections.
- Click OK to start the copying process.
Comments
Please sign in to leave a comment.