• Resolved andyldex

    (@andyldex)


    Hi,

    I’ve noticed that on a multisite install I manage that when new sites are created the siteurl in the database defaults to https://, can I configure this to be https:// so I (the site admins) don’t have to manually set this every time a new site is created?
    Just noticed an issue with 504 errors on sites with this set to http, the site is accessed via HTTPS always due to the web server config and WordPress doesn’t seem to like that,

    thanks, Andy.

    PS sorry, the 504s are only when trying to post a comment, hence hadn’t initally noticed the issue

    • This topic was modified 6 years, 11 months ago by andyldex.
    • This topic was modified 6 years, 11 months ago by andyldex.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I’ve moved this to Networking WordPress where it really belongs.

    I had the same problem and I made this plugin for that.

    https://gist.github.com/jdembowski/aa3cce8ad0d6007b3f4f49a87477f72b

    It doesn’t do any checking so make sure that the vhost and cert are in place and working before you use this.

    Copy this as https-new-sites.php into wp-content/mu-plugins and create a test site. If anything goes awry, delete the plugin and new site and try again.

    Thread Starter andyldex

    (@andyldex)

    Hi Jan,

    oh that’s great, just what I needed, on and tested. All the sites get certs via Cloudflare so I don’t need any checks, so for me perfect. Thanks for sharing!

    Andy.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘set default siteurl to HTTPS in multisite’ is closed to new replies.