# Clone Site

**URL:** <https://community.open-emr.org/t/clone-site/5263>\
**Category:** OpenEMR Development\
**Created:** [June 5, 2012, 3:44am UTC](https://community.open-emr.org/t/clone-site/5263 "2012-06-05T03:44:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [June 5, 2012, 3:44am UTC](https://community.open-emr.org/t/clone-site/5263/1 "2012-06-05T03:44:19Z")

</div>

**[haovn577](https://sourceforge.net/u/haovn577/)** wrote on [Tuesday, June 05, 2012](https://sourceforge.net/p/openemr/discussion/202506/thread/2925c88b/#c223):

Hi all,

I have a question about site clone?  
I want to have a site same as old site (example: site with my language and structure),  
1. I clone my Database that I want its data  
2. -\>admin.php&nbsp; -\> add new site  
3. Setup: I choose "I have already created the database" and do thing necessary.  
and I see below, but I can login to my new site??? So what happen? Can you explain to me and introduction new solution?

> OpenEMR Setup

Step 3

Configuring OpenEMR…

Creating site directory…OK.  
Connecting to MySQL Server… ERROR. Check your login credentials. unable to select database: 'clone2'

Thank and Best Regards,  
Hao Tran

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [June 5, 2012, 8:25am UTC](https://community.open-emr.org/t/clone-site/5263/2 "2012-06-05T08:25:08Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Tuesday, June 05, 2012](https://sourceforge.net/p/openemr/discussion/202506/thread/2925c88b/#ec19):

Hi Hao,

Are you following these instructions:  
[http://www.open-emr.org/wiki/index.php/OpenEMR\_Multiple\_Sites\_Module#Installation\_of\_a\_new\_site](http://www.open-emr.org/wiki/index.php/OpenEMR_Multiple_Sites_Module#Installation_of_a_new_site)

-brady  
[OpenEMR](http://www.open-emr.org/)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [June 5, 2012, 4:15pm UTC](https://community.open-emr.org/t/clone-site/5263/3 "2012-06-05T16:15:29Z")

</div>

**[haovn577](https://sourceforge.net/u/haovn577/)** wrote on [Tuesday, June 05, 2012](https://sourceforge.net/p/openemr/discussion/202506/thread/2925c88b/#4416):

Hi Brady,

I have done, but… error. please pictures below and give me reason 🙂

 ![](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/3X/3/9/391d81973f3ccaf109e39042a1db4635187b1af1.jpeg)  
 ![](https://lh5.googleusercontent.com/-MlRFUiHe4y4/T84tYm115hI/AAAAAAAAAso/L9nTifu48DY/s511/5.JPG)  
 ![](https://lh6.googleusercontent.com/-SV3JwD_fQb0/T84tZ1VwRPI/AAAAAAAAAs4/7jOScY0CdRs/s989/6.JPG)

Thank and Regards,  
Hao Tran

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [June 5, 2012, 4:44pm UTC](https://community.open-emr.org/t/clone-site/5263/4 "2012-06-05T16:44:42Z")

</div>

**[yehster](https://sourceforge.net/u/yehster/)** wrote on [Tuesday, June 05, 2012](https://sourceforge.net/p/openemr/discussion/202506/thread/2925c88b/#01b1):

When you are “cloning a site” you don’t really want to run the setup.php scripts.  
The option “I have already created the database” really means “I have already created an \*EMPTY\* database.” Not I already have a database I want to use.

Edit sqlconf.php manually to point the correct database and you should be in business.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [June 5, 2012, 5:46pm UTC](https://community.open-emr.org/t/clone-site/5263/5 "2012-06-05T17:46:39Z")

</div>

**[haovn577](https://sourceforge.net/u/haovn577/)** wrote on [Tuesday, June 05, 2012](https://sourceforge.net/p/openemr/discussion/202506/thread/2925c88b/#52d6):

Hi yehster,

thank thank you so much, that’s problem.  
Now I can solution this problem by my way, create empty database as normal, then copy data from default database to new database ^^.  
But I also want to know how to create a site from \*\*database I want to use \*\*  
How to do that?  
And what is included in sqlconf.php to cloning a site in business(cloning more site).

Regards and Thank for helping  
Hao Tran

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [June 6, 2012, 8:03am UTC](https://community.open-emr.org/t/clone-site/5263/6 "2012-06-06T08:03:58Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Wednesday, June 06, 2012](https://sourceforge.net/p/openemr/discussion/202506/thread/2925c88b/#e50e):

Hi,

As yehster points out, do not use “I have already created the database” in your case. This is actually a bit confusing, but it is only meant to be used when a user needs to create an empty database first (for example, hosting services don’t give admin sql privileges, so OpenEMR would be unable to create a database during setup).

Note that when you create a new site in multisite, that on Step 2 near bottom is option to Source a site and to clone the database:  
[http://www.open-emr.org/wiki/index.php/OpenEMR\_Multiple\_Sites\_Module#Installation\_of\_a\_new\_site](http://www.open-emr.org/wiki/index.php/OpenEMR_Multiple_Sites_Module#Installation_of_a_new_site)

-brady  
[OpenEMR](http://www.open-emr.org/)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [September 27, 2013, 11:15pm UTC](https://community.open-emr.org/t/clone-site/5263/7 "2013-09-27T23:15:47Z")

</div>

**[acuherbw](https://sourceforge.net/u/acuherbw/)** wrote on [Friday, September 27, 2013](https://sourceforge.net/p/openemr/discussion/202506/thread/2925c88b/#01b1/b417):

Hi kevin  
how to edit sqlconf.php? it that under new installsite/sqlconf.php ? put you database name and password, dB user name on? I have problem, when I install multisite, I tried to manually put Password and user ID, database name on Sqlconf, but still come out error message? ant help, thanks

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [September 28, 2013, 2:04pm UTC](https://community.open-emr.org/t/clone-site/5263/8 "2013-09-28T14:04:53Z")

</div>

**[yehster](https://sourceforge.net/u/yehster/)** wrote on [Saturday, September 28, 2013](https://sourceforge.net/p/openemr/discussion/202506/thread/2925c88b/#01b1/b417/567a):

Not sure what exactly you are asking.  
If userid and password are correct, then either the host is wrong, or the database name isn’t right.  
Honestly, I haven’t worked much with the multi-site module.
