Support » Networking WordPress » Multi-site Network and site-specific plugin options

  • I’m using a plugin that lets the admin user set the database connection details for a separate (non-WordPress) database that we use across all sites, but then we need site-specific settings. I can split the plugin and use Network Activate for the database connection, then activate the other plugin with its own options for each site, but I’m not sure how to access the Network database options from the site-specific plugin.

    So for instance we are doing this on the Network plugin:
    update_option(‘db_host’, ‘outside_db_host’);
    update_option(‘db_name’, ‘outside_db_name’);
    update_option(‘db_user’, ‘outside_db_user’);
    update_option(‘db_pass’, ‘outside_db_pass’);

    However, when I run get_option(‘db_host’) in the site-specific plugin, it returns empty. I’m not sure how to fetch the Network options.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Multi-site Network and site-specific plugin options’ is closed to new replies.