Clone Joomla Site

Hi,
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.

Thanks!
Nacht
LVL 1
nachtmskAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
>>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 Commented:
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.
lenamtlCommented:
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 :
https://docs.joomla.org/Copying_a_Joomla_website
Prasadh BaapaatWeb Designer & DeveloperCommented:
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.
REFERENCE CODE, DO NOT COPY PASTE
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.
thanks,
Prasadh

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Joomla

From novice to tech pro — start learning today.