• Resolved tiracles

    (@tiracles)


    Hello!

    I would like to know how can I make my supportcandy plugin to read the database tables of another supportcandy plugin installed in another site, without activating the wordpress multisite feature.

    I actually have 2 subdomains sharing the same database, but both with different database prefixes. Subdomain A has prefix abtf_ for its tables and subdomain B has prefix klmn_ for its tables. They both share the users, and the userdata, the keys, and cookies via the wp-config.php file. I made the needed changes in both configuration files and both wordpress installations work pretty fine. But my headeache comes when I try to make them share the plugin’s tables.

    I want both installations of supportcandy to use the same database tables, and I don`t know really how to do it, I’ve been researching for days, I tried to do something similar as I did in the wp-config.php for linking both sites, but didn’t work, I tried by building an alternative wp-config.php just for supportcandy, and testing inside the plugin files to make it read the alternative wp-config.php, I tried to define custom constants inside wp-config…

    I’m totally lost. If someone could give me a hand, I would really appreciate it.

    Thank you in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tiracles

    (@tiracles)

    Today , for subdomain B I’ve created an alternative wp-config file named wp-config2.php. Is exactly a clone from the original, except that I changed the prefix tables for the one I need ( The prefix tables from the plugin in subdomain A). After that I went into the plugin files and I replaced

    if ( ! defined( 'ABSPATH' ) ) {

    ? ? exit; // Exit if accessed directly!

    }

    for

    require_once(ABSPATH . ‘wp-config2.php’);

    $connection = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD);

    mysqli_select_db($connection, DB_NAME);

    I replaced it in every php file, but the plugin, keeps reading the database tables from subdomain B instead of the plugin tables from subdomain A.

    I don’t know what I’ve missing :S

    • This reply was modified 1 year, 6 months ago by tiracles.
    Plugin Support Milind Ighe

    (@miliighe)

    Hello @tiracles,

    Sorry for the delayed response.

    We checked all the possibilities of the SupportCandy plugin to read the database tables of another SupportCandy plugin installed on another site. But I can confirm that SupportCandy supports only one installation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sharing plugin tables between 2 sites’ is closed to new replies.