What are some tools for password protecting a staging site?

admin2025-04-20  0

I'm using Bluehost staging options to upload a wp site that I have made locally to a test server and was wondering if there is a solution to password protect the staging/test site so only the people who employ me can see it.

I'm using Bluehost staging options to upload a wp site that I have made locally to a test server and was wondering if there is a solution to password protect the staging/test site so only the people who employ me can see it.

Share Improve this question asked Sep 27, 2019 at 9:52 Neil MeyerNeil Meyer 1137 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

WordPress has an option to protect each page's content using a password. That is done using the right panel just below/under the publish button.

However if you want to hide the entire site and make it visible only to users who are logged-in, then you should consider using a "maintenance plugin" or a "construction plugin", you can look up for those terms in your Plugins section and try one of those plugins.

One way I have done this for an existing (not new) site is to place all of the new files in a subfolder of the main site.

Then I use an htaccess/htpassword file to protect that folder. I might even only allow certain IP addresses to access that folder.

The site URL settings are something like https://www.example/newsite . I can test it using that URL.

Once ready to go live, I go into the database (I use the "Better Search and Replace" plugin) to replace all instances of https://www.example/newsite with https://www.example . Then I change the URL in the wp-options table (two places).

Finally, I set up the hosting for that domain to point the domain root to the new folder. After a bit of propagation delay, all is well.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745123335a286279.html

最新回复(0)