Clone Joomla Site

nachtmsk used Ask the Experts™
I need to clone a joomla site. The server is running and older version of Joomla, I think it's 1.6.
I know it should be upgraded but that's not possible right now.
I need to clone the site and have it run under a different domain name on the same server. This cloned site, will be used as a development site.

The question I have is regarding the database tables. If I clone the site, I need the clone to have it's own set of database tables that won't affect the primary site.

I don't remember, will I be given and option for a new prefix to prepend to each table name when I created the cloned site, probably from a backup.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Ryan ChongSoftware Team Lead

>>I need to clone the site and have it run under a different domain name on the same server
You should separate your production and development environments so that each will not contradict and affect each other. Putting these 2 environments into a same machine will increase the operation risk and you may want to reconsider this approach. A better approach is to backup the whole server's data and then replicate it into a new machine for the development works.
Panagiotis Sweb developer - designer

Just install Akeeba into your main site, take backup and then with this backup you can build very easy your development site.
Akeeba takes files and db so you dont have to do anything else.
You will need to make a full backup of the database and of the scripts.
It is better to use distinct installations so 2 different scripts folder and 2 DB.
For the second site you will need to edit the configuration.php file for the path and BD name, user,  pw  ect

You can follow this guide :
Web Designer & Developer
Hello Nacht,
since your clone will be on the same server you can clone it using following steps.

1. Cloning Joomla Site

1) copy all the files in your Joomla root folder into a NEW folder OUTSIDE  of Joomla ROOT for your clone site to reside. (also save a copy of 'configuration.php' from root to your local machine for further use)

2) go to phpmyadmin and export your database with all tables into an SQL file.

3) create a new database for your clone site.

4) open your SQL file in NOTEPAD++ and search and replace the table prefix to a new one you want.

5) import the SQL file you saved with new prefix into the new database.

6) open the configuration.php in NOTEPAD++ and change the following fields as per your new database and table prefix (change 'newfoldername' to whatever name you give to folder in which you keep new clone site in log and tmp path lines in code below)

SAVE configuration.php file.

7) upload and REPLACE the configuration.php file to your new clone site folder. You will be able to open the new website and login to its admin with same username password as the old site.
public $db = 'newdatabse';
public $dbprefix = 'newprefix_';

public $log_path = '/home/newfoldername/public_html/logs';
public $tmp_path = '/home/newfoldername/public_html/tmp';
 /* your path may be different from above... but you just have to change the folder name*/

Open in new window

you may have to change the name of folder in the .htaccess file also if you are using 'URL REWRITING' as below:

RewriteBase /foldername

Open in new window

let me know if you have any difficulty.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial