0

I have WordPress site 1 on domain1.com.

I copied WordPress site 1 to WordPress site 2 on domain2.com (database and files).

Both WordPress sites have their independent database names/usernames/passwords and separate FTP credentials/directories.

Both WordPress sites are on the same server (localhost).

When I delete a plugin/theme from WordPress site 2, that plugin/theme also gets deleted from WordPress site 1 (and vice versa)! Likewise, when I install a new plugin/theme on one of the sites, it also gets installed on the other site!

However, if I activate a plugin/theme on one site, it does not get activated on the other site. Also, if I add/delete a post/page/media file from one site, it does not get added/deleted to the other site.

Does anyone have any idea what is going on? I made sure there are no references in database 2 to database 1, and I even hardcoded the siteurl into wp-config.php

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);

I'm still having this problem after three hours of deleting the database/files and re-uploading them. I even tried creating WordPress site 2 on entirely different FTP directories with new credentials (and likewise a new database and credentials) to no avail!

EDIT:

It gets even crazier. I completely deleted WordPress site 2's database and all files. I then did a completely NEW WordPress install, and when I click on Plugins, I see all the plugins that are on WordPress site 1 (likewise for themes)! The problem somehow still exists! Now I am completely stumped.

I'm on an Ubuntu server running Nginx.

0

Turns out I was the culprit after all. I searched through all my files for domain1.com and sure enough on lines 7/8 of wp-config.php, I found these lines (which I completely forgot about):

define( 'WP_CONTENT_URL', 'http://domain1.com/customlogin' );
define( 'WP_CONTENT_DIR', '/user/domain1.com/customlogin' );
| improve this answer | |
0

i also faced this issue, but i just download my database and ( find and replace url using sumblime text 3 ) everything work fine now, if you use

define('WP_HOME','http://domain.com/');
define('WP_SITEURL','http://domain.com/');

this is okey, but not okey with SEO i think.

otherwise if your both sites are online, you can use wp db migrate wordpress plugin, its very usefull.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.