Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #323214

    I’ve added the following code to functions.php so that the page’s links are automatically set as https links.

    add_filter('upload_dir', function($uploads) {
        $uploads['url'] = preg_replace('#^http://#i', 'https://', $uploads['url']);
        $uploads['baseurl'] = preg_replace('#^http://#i', 'https://', $uploads['baseurl']);
    
        return $uploads;
    });

    That mostly works, but there are still some links that are still referring to the http URL. I can’t see any pattern to it. What can I do to fix the issue?

    #323519

    Hey!

    Try using this plugin:
    https://wordpress.org/plugins/wp-force-https/

    Best regards,
    Josue

    #323713

    I installed and activated the plugin, but it doesn’t seem to make any difference. Many images and links are still using http.

    For example:
    https://smasolutions.it/contact-us/

    The image on the page is called using http, not https. This only seems to affect some images and links on some pages, though.

    Any ideas?

    #324088

    Hey!

    Please try this plugin instead: https://wordpress.org/plugins/wordpress-https/

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.