• Resolved draphr

    (@draphr)


    function check_native_primary_keys() is not taking in consideration multisite ids, $table_name is always ‘wp_’ even though my expected result would include ‘wp_{site_id}_’

    • This topic was modified 7 months, 4 weeks ago by draphr.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Yes, implementing this on multisite is going to be difficult. We have over 100 sites in the network.

    Plugin Contributor Chris Reynolds

    (@jazzs3quence)

    @draphr Thanks for spotting this. It looks like we’re using $wpdb->base_prefix instead of $wpdb->prefix. We will look into this and get an update out to resolve.

    Hello! We will be rolling out an update soon that loops through all sub-sites for you.

    Awesome, thank you, @swb1192!

    Plugin Contributor Chris Reynolds

    (@jazzs3quence)

    This fix will be in 1.4.1 as soon as we push it out. However, in investigating further, the CLI command will not run across all the sites on your multisite, but you can loop through each from the command line using a for loop if you have lots of sites:

    for site in $(wp site list --field=url);
    do
     wp pantheon session add-index --url=$site
    done

    We’re hiding the notice for multisites in 1.4.1 until we get that functionality built in, but in the meantime, the commands can still be run and will work once you pull down the update.

    • This reply was modified 7 months, 3 weeks ago by Chris Reynolds. Reason: need to add the site url
    • This reply was modified 7 months, 3 weeks ago by Chris Reynolds. Reason: fix bash

    Thanks for the context, @jazzs3quence

    Plugin Contributor Chris Reynolds

    (@jazzs3quence)

    1.4.1 is available which will hide the notice on multisite (for now), but also adds support for using --url=<your-subsite> for use on multisites.

    We’ll add the notice back in when the add-index command can iterate over each site on a multisite natively, rather than requiring scripting to do it for you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add index in multisite’ is closed to new replies.