Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

Multisite – Use Same Database Files

Simple Membership Plugin › Forums › Simple Membership Plugin › Multisite – Use Same Database Files

Tagged: database, multisite

  • This topic has 4 replies, 3 voices, and was last updated 9 years, 10 months ago by Anonymous.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • August 8, 2016 at 10:38 pm #7752
    Anonymous
    Inactive

    I have a main domain of christiangays.com and two subdomains of chat.christiangays.com and dating.christiangays.com.

    Integration is good as far as Users are concerned but SM is creating database tables for each site, so that each member has 3 ID numbers.

    On wp-config.php I have added
    define( ‘CUSTOM_USER_TABLE’, ‘bbvsf_users’ );
    define( ‘CUSTOM_USER_META_TABLE’, ‘bbvsf_usermeta’ );

    On simple-wp-membership.php at top of page under <?php I have added

    //access the $wpdb object
    global $wpdb;
    //set the table prefix to the cg.com prefix
    $wpdb->set_prefix(‘bbvsf_’, false);

    Add at very bottom of page

    //set it back to the usual
    $wpdb->set_prefix(‘chat_’, false); (or dating_)

    File: class.swpm-members.php

    Line 80 under

    function prepare_items() {
    global $wpdb;

    add

    $wpdb->set_prefix(‘bbvsf_’);

    line 158 – after

    $columns = $this->get_columns();
    $hidden = array();
    $sortable = $this->get_sortable_columns();

    $this->_column_headers = array($columns, $hidden, $sortable);
    $this->items = $wpdb->get_results($query, ARRAY_A);

    add

    $wpdb->set_prefix(‘chat_’); (or dating_)

    It is not working.
    Any ideas?

    August 8, 2016 at 10:44 pm #7753
    mbrsolution
    Moderator

    Hi Mary the plugin developers will investigate your question/ issue further.

    Thank you

    August 8, 2016 at 11:24 pm #7755
    Anonymous
    Inactive

    Thank you mbr. I have removed the above code and gone back to the original files so now I just have no members in chat or dating. I did read here that multisite does work with SM.

    https://wordpress.org/support/topic/does-it-work-on-multisite-3

    but they don’t give any details.

    August 10, 2016 at 7:54 am #7773
    admin
    Keymaster

    This plugin uses the standard WP multi-site setup. I don’t really understand what you are trying to do so I think it is safe to say that this plugin can’t do what you are trying to do.

    August 11, 2016 at 12:11 am #7775
    Anonymous
    Inactive

    Sorry that I did not explain better. I have installed SM on my main website christiangays.com. It is a membership site with protected pages.

    I want to be able to protect pages on my subdomains of chat.christiangays.com and dating.christiangays.com.

    To accomplish that I need to have membership levels and members on chat.christiangays.com and dating.christiangays.com.

    I can duplicate levels but if I import members then my members end up with 3 ID#’s.

    Rather than each member having 3 ID#’s I would like them to share the main database so that they just have the one ID# that they registered with.

    All three domains are sharing SM settings so I assume that they should also share levels and members, but they don’t.

    How do I get them to share levels and ID#’s.

    I hope this explains better.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy