Step 1 – Download the source files and database
Locate the original website is located on hPanel and follow these steps:
- Create a backup of your website files and database.
- Download the file backup and the database backup to your computer.
- If using a CMS, identify the configuration file for your website (e.g.,
config.php) so you know where to update database details later.
Step 2 – Prepare the destination website
Access the Hostinger hosting plan where you want the duplicate website to reside.
- Add a new domain or subdomain to your hosting plan if you haven’t already. Alternatively, use a temporary domain.
- The domain must not be the same as the one used in the original website.
- Upload the file backup to the public_html folder of the new domain using the File Manager.
- Create a new database. Take note of the new database name, username, and password, as these will differ from the original.
- Import the database backup into the newly created database using phpMyAdmin.
Step 3 – Connect the files to the new database
To make the duplicated website functional, you must link the uploaded files to the new database:
- Open the File Manager for the new website and locate your configuration file.
- Edit the configuration file to replace the old database name, username, and password with the credentials of the new database created in Step 2.
- Save the changes.
- Test the website by visiting the new domain in your browser.
Your custom website is now duplicated and should be fully operational on the new domain. This copy is entirely independent; any changes you make here will not affect the original website.
NOTES
- If you encounter an “Error establishing a database connection” double-check that the credentials in your configuration file exactly match your new database details.
- Ensure the new domain is correctly pointed to Hostinger for the website to load.