• Goal:
    Having a single page in my WordPress, load data from an external WP installation.

    I have tried installing an extra WP instance in a subdirectory with the wp-config being the same as the external site (DB_NAME/DB_USER/DB_PASSWORD/DB_HOST) and then
    define(‘WP_HOME’, ‘https://localhost/wp1/external’);
    define(‘WP_SITEURL’, ‘https://localhost/wp1/external’);
    wp1 being the local install with its own database, and external using its own wp-config.php

    This works SOMEWHAT ok..
    However, many things are configured inside wp-options table that dosent really workout for me.. appaently when I update WP settings for the WP1 or on the external, it also happens at the same time on the local. Whatever plugins are installed on WP1, MUST also be installed on external, or they are automatically disabled on WP1 ..?
    Whenever I change something on the local, its updating the wp-options table on the remote and makes life hard.

    What I really “just” want is a page in my site, that uses an external WP installations database. (making raw mysql commands isent enough, as i need commenting and propably other functions available.)

    Is there a way to override the WPDB, inserting another DB than the wp-config enabled for PAGE templates?

    Or is there another solution im overlooking?

    BR\Emil

Viewing 1 replies (of 1 total)
  • Thread Starter maxemil

    (@maxemil)

    A quick follow up to myself,
    I cant in my head consume the way I would have to weave together the databases, so I’m using a full install of WP in a subdirectory and a remote database..

    The only real not so cool thing is the detection of which WP install does the presentation. (when people signup for news and comment notification on the different databases & synchronizing certain users..)

    Why all this, well I have a internal website inside a firewalled network, and a external website to communicate comments realtime.. anyways.. ??

Viewing 1 replies (of 1 total)
  • The topic ‘using alternative wpdb (connecting a page template to external db)’ is closed to new replies.