an unique issue.. and a learning process

here is what happend.. i got site.. all nice and all done and out and about with marketing.

started a new project.. installed wordpress and played around with a few themes to see how it looks.. did not like it.. messed up and then decided to do some thing.. thought.. if i delete all files in the second site and copy paste all files from the first site.. may be it will work as the first site (mojoengage). so I have done it.. ie copy pasted the first site in the second sites folder..

problem is .. every time i go to the second sits url.. it redirects to the first site.. ie the one i copied it from..

i get a feeling that there is a file i need to edit to add the domain of the new site or some thing similar..

would love to solve this without leaning on my developer.. help appreciated..

1st site , the one I copied from:

2nd site.. the one i want to look like the 1st

  • Nithin
    • Support Wizard

    Hi shan,

    Hope you are doing good today. :slight_smile:

    I’m not exactly sure what you were trying to achieve, but if you copy all the files from one site to another. The second site will point, to the 1st site because of the settings defined in the wp-config.php, you’ll have to edit the wp-config.php in your second site, and make sure the settings are correct. You can find the wp-config.php file located in your root directory.

    Could you please try adding the following lines in your wp-config.php, and check whether it works:


    Since it’s a new install, the easiest solution would be to re-install WordPress. Please let us know how that goes, so that we could give a closer look, if needed. Have a nice weekend. :slight_smile:

    Kind Regards,


  • shan
    • Site Builder, Child of Zeus

    super thanks.. the new site is loading.. but i am worried if changing things here will affect the original site.. ie the question is so.. if i make changes to will that affect the site? i still see some mojoengage ish codes in wp config. (see attached)

    Thanks a ton in advance!

  • Rupok
    • Support Ninja

    Hi shan,

    if i make changes to will that affect the site? i still see some mojoengage ish codes in wp config. (see attached)

    First of all, please do not share full “wp-config.php” content in comments. Our threads are public. So anyone can see these credentials. And if someone has your database login credentials, he can do anything to your site. So I’ve removed the code you shared.

    Now, I had a look on your code. You have successfully defined your Home and Site URL. But when you migrate a full site, you have to migrate your database too. Let me describe you the full process of manual migration.

    1. You have to copy all files from old location to new location (first site to second site) > You did this.

    2. You have to create a new database for your second site and assign a user for that database. Maybe an existing user, or a new user, it’s up to you. > I’m not sure if you did this.

    3. Now you have to export the full database of the old site and then import that dump in your newly created database for your new site. > I’m not sure if you did this.

    4. You have to open “wp-config.php” file and update “DB_NAME”, “DB_USER” and “DB_PASSWORD” values according to your new database and user you assigned and save the file. If your new database is on a different server, then you will have to update the “DB_HOST” value too. > I’m not sure if you did this.

    5. You also have to add those defines with your new site address in you new site “wp-config.php” file. > You did this.

    6. After migration, you can install this plugin to search for reference to your old site in the database and replace those all with new site URL. > I’m not sure if you did this.

    So, each WordPress site *should* have it’s own database, it’s not a must but a better practice in general. You copied files, but haven’t copied the database what I understand from your replies. Please migrate the database, update new database credentials in new site “wp-config.php” file, replace reference of old site with new site URL in the new site database. And then, your new site will work exactly the way your old site worked, but if you change anything in the new site, won’t affect the old site. But currently your new site is using old site database, so it’s risky to change anything in the new site.

    I hope it should clear all your confusion. If you still have any confusion or if you are stuck at any point, we will be glad to assist further.

    Have a nice day. Cheers!


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.