CodeIgniter Forums

Full Version: website Duplicating on another website
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi champions
I copied the files of my one codeigniter site onto another subdomain, but now when i update anything on website X it also updates on website Y, I need them to operate separately, How can I resolve this, I am still new at this.

Regards
@[email protected],

When you say, update anything on website X it also updates on website Y. Are both websites pointing to the same database? If so, then that would be your problem. Also, your config for your site Y should have a different base url then site X. This to could cause an issue when updating. Finally, do you have any hard coded links in site X that where copied to site Y. If so, then you need to make changes to those hard coded links.
(03-28-2020, 07:04 AM)php_rocs Wrote: [ -> ]@[email protected],

When you say, update anything on website X it also updates on website Y.  Are both websites pointing to the same database?  If so, then that would be your problem.  Also, your config for your site Y should have a different base url then site X.  This to could cause an issue when updating.  Finally, do you have any hard coded links in site X that where copied to site Y.  If so, then you need to make changes to those hard coded links.
Hi Php_rocs
Thanks, I suspect that they might be pointing to the same database because I didn't create a new database, I just copied all the files for website X as is and pasted them in the folder for website Y
(03-28-2020, 07:04 AM)php_rocs Wrote: [ -> ]@[email protected],

When you say, update anything on website X it also updates on website Y.  Are both websites pointing to the same database?  If so, then that would be your problem.  Also, your config for your site Y should have a different base url then site X.  This to could cause an issue when updating.  Finally, do you have any hard coded links in site X that where copied to site Y.  If so, then you need to make changes to those hard coded links.
So how do I resolve such an issue with  regards to the database
@[email protected],

First, you need to make a copy of your database in website X. Create a new database for website Y and restore the copy of website X into the new database.

Second, you will need to take the new userid, password and database location (of the new database) and add it to the database config file of the new website.


Finally, test the new website to make sure that it is working properly with the new database settings.

QUESTIONS: What version of CI are you using? Did you check the documentation to understand how to set the database config file (https://codeigniter.com/user_guide/datab...ation.html)?
Hi
Thank you, I am working on it now