• Hi all,
    I was thinking multisite was my solution, but I may need to modify it to achieve my goal.

    I want to have a series of sites. (site1.com, site2.com, site3.come, etc)

    The main site (site1.com) which has almost finished being setup, has over 100,000 posts, which account for around 3,000,000 bits of postmeta data, and there are around 9,000 user accounts set up.

    The intent is to have numerous satellite sites, which will use the same base data set as above, but have different templates, different menus, record the views and hits of posts by satellite site, and maybe run a filter on the data. (ie, the site1.com is about cars and lists all the items, the site2.com is about only European cars and uses the same wp_posts data as site1.com.)

    I have two problems:
    – Firstly, it seems there is too much user and usermeta data for Network Setup to run, and it continually fails with an error it could not allocate enough memory. Is there anyone who has the step by step parts that are run during this step, so I could manually run the steps (ie, add relevant usermeta settings, add xxx records to the sitemeta table, etc)

    – Secondly the more I read in these support forums, the less comfortable I am, that multisite will achieve what I want to do, and that I will need to either customise multisite, or find a totally different way of achieving this.

    I would be most gracious for your assistance.

    Vaughnn

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    It would have been better, if you were using MultiSite, to put the posts about Euro cars on the Euro car site, and then used something like the Sitewide tags plugin to aggregate back into the main site…

    But yeah, that’s going to need more server memory to do what you described.

    Thread Starter VeeBeeGlobal

    (@veebeeglobal)

    Thanks Ipstenu.

    Once I do get multisite active and setup, will I be able to get this to work? so have the same data stored in posts/postmeta for the main site, and used by the satellites?

    Thread Starter VeeBeeGlobal

    (@veebeeglobal)

    Well – I had searched the forums high and low, and looked at many plugins.

    The solution was to share the same data across multiple domain names actually is not too complex.

    On cPanel it was about adding each new domain as an addon domain, which pointed to the /public_html (or main website root dir).
    Then to set the site up in a normal multisite install.
    When setting the multisite up in network admin, there was a config change needed (*):
    – add the sub site with it’s subdomain name (ie, site1.example.com)
    – * once the sub site is added, go back and edit the domain field, and put in the main domain name (ie http://www.example.com)
    – go to settings->domains and create the sub site

    In the theme of the subsite, the following code is the most crucial part, and is what redefines which tables wordpress will reference when producing content. This code needs to go into the functions.php file of the theme.

    function table_prefix_switch() {
    	global $wpdb;
    	$wpdb->p2p = 'wp_p2p';
    	$wpdb->p2pmeta = 'wp_p2pmeta';
    	$wpdb->postmeta = 'wp_postmeta';
    	$wpdb->posts = 'wp_posts';
    	$wpdb->terms = 'wp_terms';
    	$wpdb->term_relationships = 'wp_term_relationships';
    	$wpdb->term_taxonomy = 'wp_term_taxonomy';
    }
    add_action('init', 'table_prefix_switch');

    One significant thing of note is that you cannot use the basic menu functions for creating menus, (as this is stored in the taxonomy tables), you need to create multiple menus, and use menu locations to define specific menus for each sub-site.

    That is essence the basics of what we have done.

    The original scope we had was to use a common database, and share the data across multiple domains, some of the domains required the data to also be filtered. We did the filtering using site specific options, and then filtering content using pre_get_posts and join_posts.

    The sites have been up a few weeks now, and the only things to be sorted are how to create sitemaps on sites which we have filtered data (about 35-40 of them), and collation of stats – which we have been trialling a couple of plugins.

    Cheers,

    V

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Large data set to be shared to multiple sites’ is closed to new replies.