WordPress.org

Ready to get started?Download WordPress

Forums

WordPress HTTPS (SSL)
[bug] WordPress Network with subdomains - causes hundreds of unnecessary queries (3 posts)

  1. ururk
    Member
    Posted 1 year ago #

    On a subdomain install of WordPress, the check here:

    inc/WordPressHTTPS.php - line 141

    if ( is_multisite() && is_subdomain_install() ) {
    			$multisite_hosts = $wpdb->get_col($wpdb->prepare("SELECT domain FROM " . $wpdb->blogs, NULL));
    			$hosts = array_merge($hosts, $multisite_hosts);
    		}

    Causes 200+ queries which multiplies to somewhere north of 700 queries per page visit, with calls to:

    SELECT domain FROM wp_blogs

    Since the data from this looks to be cacheable, would it be possible to cache the results and do one query per page view?

    http://wordpress.org/extend/plugins/wordpress-https/

  2. robertstaddon
    Member
    Posted 1 year ago #

    ururk, thank you so much for pointing this out! I upgraded from version 3.3.0 of this plugin to 3.3.6 and suddenly my multisite admin pages slowed to a crawl. It rendered this plugin practically unusable. Simply commenting out those lines solved the problem!

    Why does this plugin need to scan all of the URLs of all the other networked sites in the admin bar on every single page load and switch them to HTTPS? If this feature is required, can we make it an option that can be disabled in the settings?

  3. ururk
    Member
    Posted 1 year ago #

    I'm not sure - but I think it is looking for links in one site for links to another. But I'm not certain - I didn't follow the function execution all the way through.

    If the query was cached, it would only need to run once - but I suspect in addition to this query, it does something with each and every site every time it is run so those results would need to be cached as well.

    I suspect it is checking for links to each site in the network, and whether or not to make those https.

    John

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.