Skip to content
A fork of an older version of wordpress-https plugin that disables some super-slow functionality.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Original code

Plugin - Author -

Why we forked

When parsing the page for URLs, when an element (img, link etc..) was found it would perform a validation curl request to ensure that it could access the item over HTTPS. If valid, it would append this URL in the wp_option table to a safe list. If it came across this list again, it wouldn't need to

2 reasons why we commented out this code

  • On blog postings that had a large number of elements with http, the page was literally timing out doing all the validation curl requests
  • That serialised array in wp_options overtime becames behemoth!! And in essence you will be pulling out large amounts of data per page request. Overhead+++!

Offending Code

public function makeUrlHttps( $string ) {
    $url = WordPressHTTPS_Url::fromString( $string ); // URL to replace HTTP URL
    if ( $url ) {
        if ( $this->isUrlLocal($url) ) {

            if ( $this->getSetting('ssl_host_diff') && strpos($url->getPath(), $this->getHttpsUrl()->getPath()) === false ) {
                if ( $this->getHttpUrl()->getPath() == '/' ) {
                    $url->setPath(rtrim($this->getHttpsUrl()->getPath(), '/') . $url->getPath());
                } else {
                        $url->setPath(str_replace($this->getHttpUrl()->getPath(), $this->getHttpsUrl()->getPath(), $url->getPath()));

        $string = $url->toString();
    } else {
        if ( $url->getScheme() == 'http' && @in_array($url, $this->getSetting('secure_external_urls')) == false && @in_array($url, $this->getSetting('unsecure_external_urls')) == false ) {
            $test_url = clone $url;
            if ( $test_url->isValid() ) {
                // Cache this URL as available over HTTPS for future reference
            } else {
                // If not available over HTTPS, mark as an unsecure external URL

        if ( in_array($url->toString(), $this->getSetting('secure_external_urls')) ) {
            $string = str_replace($url, str_replace('http://', 'https://', $url), $string);
    return $string;
Something went wrong with that request. Please try again.