Turn off password protection for staging website

Is there a way to disable password protection on wpmu hosted staging website? If not can you do it manually.
I have some api to auto login into live and staging website. Since your password protection is enabled, I cannot autologin into staging.
Ideally there should be a setting to enable / disable password protected. I have used other host where they have options to turn it on/off for the staging.
However I want the option for all staging websites moving forward. I have a webapp which does autologin to live and staging websites. Currently I can only autologin to live websites for wpmu hosted websites.

  • Adam
    • Support Gorilla

    Hi Matthew

    I hope you’re well today and thank you for your question!

    HTTP Auth can only be switched on/off for production sites but not for staging sites. Our admins could manually disable it for you for now but it wouldn’t be a “permanent” solution because at any time e.g. update to the server is deployed or any changes to configuration made (I believe also upon any “to staging” sync) it would get overwritten. It’s not possible to add such switch or switch it off permanently without a huge “reconfiguration” of entire environment.

    However, there’s a way to override HTTP auth that, I think, might help. Whenever you’re providing an URL of your staging site in some external scripts/APIs, instead of an URL alone, use this structure:

    https://username:password@site.staging.wpmudev.host

    where

    username and password – are your staging site HTTP auth credentials (same as normally used in browser login propmpt)

    site.staging.wpmudev.host – is your staging site URL.

    This should let you overcome HTTP auth and is permanent unless credentials are changed.

    Would you give it a try, please?

    Best regards,
    Adam

  • jpoly4
    • Flash Drive

    I know this is an old thread but I’m curious if there has been any thought to adding a password disable button for staging? The reason I ask is because plugins like hummingbird don’t work well on staging with the password protection. It would be nice if your plugins and staging environment could play nice. Maybe hummingbird could use your suggested link structure to check the staging site?

    Thanks!
    John

    • Adam
      • Support Gorilla

      Hi jpoly4

      Thanks for question!

      No, the staging protection stays in place as far as I’m aware, I don’t know of any plans of allowing to switch it off. It’s worth noting that stating site takes from same server resources as the production site (though additionally fairly limited as it’s not intended to get any significant traffic) and opening could actually severely affect performance of production site – even if it was only “targeted by bots” without “human traffic”.

      As for Hummingbird – I suppose you might be referring to Asset Optimization not finding assets, right? If so, try enabling Asset Optimization, running re-check files and then visiting the front-end of the site and browsing site for a while. The assets should show up there (though you might need to “re-check” again).

      If that’s not the issue (or it is but above solution doesn’t help), please open a separate ticket of your own, describing the issue in details, and we’ll look into it to see how we could help you make it work as expected. You can start new ticket here:

      https://wpmudev.com/forums/forum/support#question

      Best regards,
      Adam

    • Adam
      • Support Gorilla

      Hi Chris

      I understand that but these are only staging sites, meant for things like e.g. testing plugin updates, doing some design/basic configuration works and so on. They are never meant to be public and they run on limited resources.

      In case of some services you can actually override that by putting username and password directly in URL like this:

      https://username:password@yourssite.com

      but that should never be used “publicly” and it can only work where such direct, full URL can be specified.

      For testing purposes, we can temporarily lift that restriction and disable auth for you for a few days on demand. If you want that, please start a separate support ticket here

      https://wpmudev.com/forums/forum/support#question

      specify the site and our Hosting Team will do this for you (note: that will only be temporary).

      That being said, I’m closing this ticket as it’s already quite old and started by other Member. For any follow-up questions and/or further requests, please join our live chat support or start a separate support ticket.

      Kind regards,
      Adam