Password Protect WordPress Installation Folder


#1

I’ve just created a staging site and installed WordPress with ee site create mydomain.com --wpfc --php7.

I’m planning to reproduce a “cheap” staging server set up as explained on this article by using GIT, but I also want to completely discourage anyone or anything like (search engine bots) to have public access to it.

I’m aware about blocking search engine crawling with robots.txt, but I’m afraid that the staging site being a clone of the production site might hurt my SEO.

So the question is: Would it be possible to use EasyEngine ee secure --auth command to set up a kind of http authentication for the whole WordPress installation folder?

Any ideas?

Thanks in advance to all rtcamp’s community members!


#2

Hello @monecchi,

in your website nginx configuration file located in /etc/nginx/sites-available/yoursite.tld, just add the line :

include common/acl.conf;

This way your website will use the same protection than the backend area available on the port 22222, with the same user/password.


#3

Thanks for the input @virtubox - I’ll set it all up and let you know if it works. :+1:


#4