• Resolved Alex Furr

    (@alexfurr)


    Hi Frank,

    Just wondering how your theme and plugin use stats are calculated? I’m running a large MS with over 7000 sites and know that some plugins are used in 100s of sites. However, the network plugin page is only showing a handful of sites – the same with plugins i.e. I know some plugins are active on sites that are not appearing in the list.

    Ever come across this before?

    Great plugin apart form that – the simple blog list ID column is on its own incredibly useful!
    Alex

    https://www.ads-software.com/plugins/multisite-enhancements/

Viewing 15 replies - 1 through 15 (of 20 total)
  • im having the exact same issue – we use this plugin to audit sites after we do a plugin update so that we can check specific sites for functionality, but im only showing 5 sites out of a list of about a 100 that should be in there.
    you figure this out alex?

    Thread Starter Alex Furr

    (@alexfurr)

    Hi – never figured it out, I’m basically using it just for the blog ID information.

    Still not found a plugin that gives an accurate and “non-timeout” page for plugin / theme information. Maybe I’m unusual running a multisite with 5000+ blogs?

    Will consider writing a simple one myself. If we get one working I’ll’ let you know
    Alex

    we chunked out our multisite installations and limit them to about 800 sites per – and once we hit that, we create another one. just too much data with one point of failure. if you get something going that can display the names of the sites that are running specific plugins – i will digitally *hug* you. thanks for your reply Alex and good luck! if you get stuck, we have developers on staff here and might be able to lend a hand.

    Thread Starter Alex Furr

    (@alexfurr)

    For a digital hug I may well take a look.

    We don’t have the option of the multi – multisites (!) like you.
    But good luck yourself! May be in touch if get things solved.

    Alex

    Thread Starter Alex Furr

    (@alexfurr)

    Hi all,

    I think I’ve found the problem – its do with the wp_get_sites() in built wordpress function:
    https://codex.www.ads-software.com/Function_Reference/wp_get_sites

    By default this limits to pulling in the first 100 blogs, which is obviously useless for anyone with more than 100 blogs.

    You can override this by padding the args with limit
    e.g.
    To make it work on themes on class-add-theme-list.php change line 121 from
    $blogs = wp_get_sites();
    to

    $args = array('limit'=> 1000);
    $blogs = wp_get_sites($args);

    This will then work for multisites up to 1000 blogs. Again, this is no use for me as I’ve got 6000+.

    Should be OK for you though with your 800 sites per install.

    Also worth noting that wp_get_sites() will return NO blogs if you have 10,000 blogs or more. Again, annoying, but nothing to be done about that.

    So to get this working on your multisite with 800 blogs, replace all instances of the wp_get_sites() with the additional code above.

    Let me know if that works!
    Not sure why I’m doing the work of the devs, but there you go.
    Alex

    Thread Starter Alex Furr

    (@alexfurr)

    Hi all,

    I think I’ve found the problem – its do with the wp_get_sites() in built wordpress function:
    https://codex.www.ads-software.com/Function_Reference/wp_get_sites

    By default this limits to pulling in the first 100 blogs, which is obviously useless for anyone with more than 100 blogs.

    You can override this by padding the args with limit
    e.g.
    To make it work on themes on class-add-theme-list.php change line 121 from
    $blogs = wp_get_sites();
    to

    $args = array('limit'=> 1000);
    $blogs = wp_get_sites($args);

    This will then work for multisites up to 1000 blogs. Again, this is no use for me as I’ve got 6000+.

    Should be OK for you though with your 800 sites per install.

    Also worth noting that wp_get_sites() will return NO blogs if you have 10,000 blogs or more. Again, annoying, but nothing to be done about that.

    So to get this working on your multisite with 800 blogs, replace all instances of the wp_get_sites() with the additional code above.

    Let me know if that works!
    Not sure why I’m doing the work of the devs, but there you go.
    Alex

    Thread Starter Alex Furr

    (@alexfurr)

    Finally – worth noting if I up the limit to 10,000 (the max allowed) this simply fails on my large install.

    Basically, there is no way I’ve found of auditing large multisites. Mainly because there is no central database of themes and plugin use – they’re all stored in each individual wp_options table (for themes) so you have to query every single options table for every single blog. not very efficient.

    A very real and annoying limitation of wordpress.

    Also worth noting that wp_get_sites() will return NO blogs if you have 10,000 blogs or more. Again, annoying, but nothing to be done about that.

    You can filter wp_is_large_network and raise the limit:

    add_filter( 'wp_is_large_network', function( $is_large, $type, $count ) {
    
    	if ( ! $is_large )
    		return $is_large;
    
    	// $type can be 'sites' or 'users'
    	if ( 'sites' !== $type )
    		return $is_large;
    
    	// Default is 10000, we add one 0
    	return $count > 100000;
    }, 10, 3 );
    Thread Starter Alex Furr

    (@alexfurr)

    Toscho,

    This was exactly the function I’ve been looking for thank you.
    Alex

    Plugin Author Frank Bueltge

    (@bueltge)

    @thoscho Thanks for the support on my holiday!

    Also added this issue to the wiki of the plugin:
    https://github.com/bueltge/wordpress-multisite-enhancements/wiki

    Thread Starter Alex Furr

    (@alexfurr)

    Hi Bmsinc et al,

    I’ve had to create a new plugin to audit our site (7000+ blogs) as none of the existing ones worked. This one is fantastic on our smaller installs but unfortunately simply crashes when trying to audit more than a couple of thousand sites.

    Here it is:
    https://www.ads-software.com/plugins/multisite-auditor/

    Rather than try to get the data on the fly, this plugin actually performs a one off audit of your site so the data retrieval is much quicker.

    Frank – thanks again for your fantastic plugin. We still use it on the smaller installs.

    Kind regards,

    Alex

    Plugin Author Frank Bueltge

    (@bueltge)

    Now I have solve the issue with a lot of plugins, themes, plugins.
    It would be fine, that you test the current version from github – https://github.com/bueltge/wordpress-multisite-enhancements/archive/master.zip
    and give feedback.

    bmsinc

    (@bmsinc)

    Hell yea Alex – I like where you’re going with this. I’m going to try this out and I’m going to try Franks git link above as well. will report back! thanks a lot!

    bmsinc

    (@bmsinc)

    @frank – your file from git worked very nicely, i am now seeing all of the sites that are running plugins, and can successfully audit my multisite.

    @alex – i will definitely give your plugin a run through, i feel like i might have some feedback on how to strengthen it (if need be)

    would be great if it offered an excel dump afterwards – not sure if it does that out of the box, but i didnt read that in the feature list.

    bmsinc

    (@bmsinc)

    @frank – i noticed that a plugin still shows as active even though a site is archived or deleted. any ideas on that?

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Missing sites from theme and plugin use’ is closed to new replies.