Support » Fixing WordPress » Two Domains, Two WordPress Installs, ONE Database, TWO Options tables

  • Seeking assistance from the WP development team; I need to tweak some code and cannot find the file to make the change.

    I want to install two separate WP instances that use a single database. I don’t want each to have separate DB tables–I want one to share the others DB data. This means I can view siteB (remote) and see posts/pages created on siteA (local) and visa versa.

    I want to them share all tables on the local WP instance’s Mysql db. The problem is the Options table contains the URL that is used to format links in the WP instance. The remote instance links all point to the local instance.

    I’ve already created the two sites and can successfully connect to the Mysql db across domains.

    In a nutshell, I will maintain two option tables–one for each WP instance. I just need to find out where in the code I need to make the change.

    In previous WP versions, I could have simply changed the options table in siteB (remote) in the wp-settings.php file to point to the second options table. But these table names no longer appear in the file?!? Are they somewhere else?

    I need a code hack to perform the following:

    IF Option selected is SITEURL and domain = siteB (remote) THEN
    SITEURL = Option2 SITE URL
    SITEURL = Option1 SITE URL

    Any assistance is appreciated.

  • The topic ‘Two Domains, Two WordPress Installs, ONE Database, TWO Options tables’ is closed to new replies.