Post ABtUZdvthH3cREuET2 by paul@social.device5.co.uk
(DIR) More posts by paul@social.device5.co.uk
(DIR) Post #ABtTcmGx2z8HDYgVXM by paul@social.device5.co.uk
2021-09-30T17:10:16Z
0 likes, 1 repeats
I have 2 separate WordPress installs. One is on a subdomain of the other. Each have their own database.When I change the active theme on either of the installs it will change the theme on both.Setting Theme A as active on site 1 will also set theme A on site 2.Visiting site 2 will then show an error as Theme A does not exist there.Lastly, viewing the wp_settings table shows that the each site still has the correct themes and Site 2 does not have Theme A set as active!How? I'm stumped
(DIR) Post #ABtTcuBZcraHlCEKGW by paul@social.device5.co.uk
2021-09-30T17:16:06Z
0 likes, 0 repeats
I should also add that they are on the same server with PHP FPM running as the same user for both domains.
(DIR) Post #ABtU93eBz1gMN5wp4S by Zergling_man@mastodon.linuxbox.ninja
2021-09-30T17:22:46Z
0 likes, 0 repeats
@paul It's as if subdomain is using primary domain's DB instead of its own. You've definitely tested that both affect each other, and confirmed that the record only updates in their own DB?
(DIR) Post #ABtUDfJrrRMQMsdd68 by Zergling_man@mastodon.linuxbox.ninja
2021-09-30T17:23:36Z
0 likes, 0 repeats
@paul Ah, and where is the DB connection string set? I'm not too familiar with WP, I'm assuming it's somewhere deep in its bowels.
(DIR) Post #ABtUZdvthH3cREuET2 by paul@social.device5.co.uk
2021-09-30T17:27:32Z
0 likes, 0 repeats
@Zergling_man Yep. If I set one theme as active then try to visit the other site I will see this as the template doesn't exist there.However, checking the DB for the second site shows the original theme is still set there
(DIR) Post #ABtUieN9QqPaPLwsPw by paul@social.device5.co.uk
2021-09-30T17:29:11Z
0 likes, 1 repeats
@Zergling_man there is a wp-config.php file where the DB connection is set. It was previously using a .env file to set constants that were then used in the wp-config.php but I have stripped that out to set the vars directly.Each site has its own content which appears on the backend of each site correctly too - they don't show each others content!