i

Buy a domain and host your business online free for 3 months. **

Claim offer
.com
$ 5.99 $ 26.99 /1st year
.one
$ 1.99 $ 16.99 /1st year

Log in

Control Panel Webmail Website Builder Online Shop File Manager WordPress

5 ways to password protect your WordPress website

By password-protecting your WordPress website, you can lock individual pages, launch exclusive portals for members, create test environments to preview changes to your website, and so much more. We will tell you about five ways you can protect your WordPress website! 

Create your website with WordPress

Start building your site with the world’s most popular cms.

Choose a package
  • 40+ free and unique one.com themes
  • Stable and ultra-fast hosting
  • Free SSL certificate
  • Mobile friendly
  • 1-click install
  • 24/7 support

Password protect your WordPress website 

WordPress always requires a password to edit pages and posts, but you can also control public access to published pages with password protection. When you password-protect your WordPress website, your visitors are greeted with a login screen before they can see your website. 

Password protect with WordPress plugins 

There are several plugins for WordPress that let you protect your website. For example, PPWP is a plugin that makes it easy to quickly protect access to everything from posts and pages to products in a WooCommerce store or the entirety of a website. 

One downside of many WordPress plugins is that they can limit access to selected pages but not always to your files. If you have uploaded secret files or images to your Media Library, you need another plugin to prevent them from being displayed. The paid versions of Prevent Direct Access and Download Monitor offer file protection. 

Lock your website with a file 

You can block all access to your website by setting a password on a specific file, which can be set up through your hosting provider. You will essentially need to edit a file called ‘.htaccess’ and create a file called ‘htpasswd’. Once this has been done, the website is no longer accessible without providing entry information. 

With one.com, you can automatically create such a file by clicking the Secure Directory button in File Manager. 

When you open a website protected with a .htaccess file, a window requesting a username and password appears in the browser. This information must be entered correctly to view the website. This means you cannot create a custom password page that has your company logo or any other information for visitors. 

Protect an individual page 

If you want to set a password for a page or a post, you can do it in WordPress without a plugin. You can protect both published pages and drafts that you plan to publish later.  

To protect a page, go to the editing mode for the page in WordPress. Then click on the button next to Visibility. You will find an option called ‘Password Protected’. Enter the password you want to use and press ‘Update’ or ‘Publish’. A protected page can be visited and displayed along with the page title, but all content is hidden. 

Create a test environment 

If you want to test making a major change to your WordPress website, it is often best to create a test environment. A test environment is a copy of your website where you can make changes that are not publicly visible. These are done on a password-protected website that only you have access to. 

A good test environment can be complicated to create but some hosting providers offer simple solutions to start a test environment. With Managed WordPress at one.com, a test environment is included that users can start with a click. In the test environment, websites can be edited, plugins removed and added, and all possible changes made, completely without affecting the public website. 

Create a members-only site 

If you want to create an exclusive experience for specific visitors, you can use a membership system. In this way, you can, for example, charge for exclusive content on your website: 

  • If you want to sell digital goods, you can create a webshop and add digital products to it that you can then put behind an exclusive paywall. 
  • You can set up an exclusive portal that is continuously updated with paid plugins such as MemberPress or SureMembers. With these plugins, you can share music, podcasts, online courses, and much more with people who support you. 
  • If you want to run a news site with articles, where some articles are free and some are included in a paid subscription, you can try plugins such as Restrict Content and Paid Memberships Pro.  

Various systems are better or worse depending on what you want to offer.

Which method suits you? 

All methods of creating a password for a WordPress website have clear pros and cons. Which method you choose depends on how comfortable you are with changing settings and files for your website and what you want to achieve. Here are some examples of why you might want to password protect your WordPress website and which method we recommend.

Prepare for a product launch 

If you have visitors waiting for more information about new products in your webshop or on new articles you’re going to release, it might be smart to use a WordPress plugin. These make it possible to customise the page that visitors come to. Why not put a countdown on the page or write a text that gives visitors a sneak peek behind the scenes? 

Protect your website before launch 

Before your website is known to the outside world, it might be worth protecting it against unwanted visitors. You might even want to avoid it appearing on Google? Then it might be best to protect your website with a .htaccess file. It prevents visitors from accessing both your website and the files on it. It’s the best way to completely protect your website. 

Share a draft with a friend 

If you have a page or article that you want to share with a friend before it’s published, it’s easy to set a temporary password on the page in WordPress. You can do this in the editing view for the page. 

Relaunch your website 

If you want to change the design of your website and relaunch it, you don’t need to set a password on it. Just create a password-protected test environment and test your new website there. When you’re done, you can move the changes to the website that the public sees. 

Create a corporate portal for employees 

If you have a company website, you can use it to share information with your employees. With a WordPress plugin, you can create password-protected pages and portals containing information that your employees need to know. 

Keep your WordPress website safe 

Regardless of which method you choose, your WordPress website must be safe. The most important thing you can do to protect yourself against attacks and security issues is to update WordPress and your plugins. If you choose to password protect with a plugin, enabling automatic updates for your new plugin is important. If you are afraid that automatic updates will change your website without your knowledge, you can use Managed WordPress from one.com. We monitor all automatic updates to stop those that do not work as intended or that change the appearance of your website and tell you about it. This gives you peace of mind, security, and reliability from your WordPress website. 

Create your website with WordPress

Start building your site with the world’s most popular cms.

Choose a package
  • 40+ free and unique one.com themes
  • Stable and ultra-fast hosting
  • Free SSL certificate
  • Mobile friendly
  • 1-click install
  • 24/7 support