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!
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.