Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Password Protect WordPress on Staging site

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #166061
    Nathan Gross
    Participant

    I use a pretty standard workflow – dev local, push to staging for client review/approval and then push to production.

    I like to password protect the staging site.

    I’m currently using htaccess to password protect the stage site. However, I’d like to keep the htaccess file in version control but I can’t have the same htaccess on the production server.

    I thought about and <if statement but that’s not available on the version of apache my server (media temple – gs) uses.

    Any recommendations? How do you peeps manage this?

    Perhaps use a plugin?

    #166127
    Nathan Gross
    Participant

    That link is essentially what I am using now. However in order for it to work, you modify the .htaccess code. Since I’m only using .htaccess/.htpasswd on the staging site, that wont work for keeping .htaccess in version control.

    I’m leaning toward not using .htaccess for the security, and just using a WordPress plugin.

    #166132
    Nathan Gross
    Participant

    Do you guys keep your .htaccess outside of your version control system then?

    #166138
    Nathan Gross
    Participant

    Most of my sites use a bit more than just the standard wp permalink stuff—like h5bp stuff, or I may be redirecting some old links from a client’s old site, etc.

    Anyway, how can I have the password stuff in version control but only use it for 1 of the sites?

    As mentioned earlier, the version of Apache that my server uses won’t allow if statements.

    How do you avoid this?

    #166139
    Nathan Gross
    Participant

    Sorry, i didn’t see your follow up post.

    It appears Apache 2.4 could solve this for me, but (mt) isn’t using that on their grid server.

    #166174
    Alen
    Participant
    #167095
    Nathan Gross
    Participant

    Thanks John! For now I’m using Password Protected.

    #167096
    John
    Participant

    @Nathan
    That one looks pretty good, and allows easy access. The one I posted, you kinda have to go through a few more hoops. You use to be able to add an IP, then they would get full access, but now that’s in the paid version.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Back End’ is closed to new topics and replies.