How to password protect a WooCommerce shop the easy way

August 10, 2020

Need to password protect a WooCommerce shop? This comes in handy for wholesale stores, membership sites, and plenty of other types of WordPress site.

But, by default, WooCommerce doesn't provide any way to add a password to your entire shop. That means, as is the WordPress way, you're going to need a little help from a plugin.

To that end, I'm going to spend this post showing you how to password protect a WooCommerce shop using a simple but effective plugin with just a few settings. I'll provide full written instructions plus a video tutorial. When you finish, you'll know exactly how to get functionality like this for your shop using the WooCommerce Private Store plugin:

example of how to password protect a woocommerce shop

But first, let's look at a couple of real-life examples from companies that needed to password protect a Woo shop.

Case study #1: Sprezzatura Imports

Sprezzatura Imports is a wholesale coffee distributor in the US. They specialize in importing the Italian coffee brand ICAF and sell to distributors through a private password protected WooCommerce shop. This is where our WooCommerce Private Store plugin comes in to play.

Only distributors can access the price list and purchase products, that’s why this area is locked away behind a login screen. To secure the private online shop, Sprezzatura Imports used our WooCommerce Private Store plugin. Everything Sprezzatura Imports want to hide from the public can be hidden in this secure area.

And to keep things simple, registered distributors can quickly access the password protected area as the login page has been added to the navigation menu.

Sprezzatura Imports login screen

Case study #2: Montana Medicinals

WooCommerce Private Store Case Study Montana Medicinals
The Montana Medicinals homepage

Gecko Designs were building a website for Montana Medicinals, who operate a medical marijuana dispensary in the State of Montana. For legal reasons, they needed to password protect their WooCommerce shop so that only pre-authorized customers could access it.

The developers achieved this in minutes using the WooCommerce Private Store plugin.

First, they used a sitewide WordPress age verification plugin to ensure that no one over age 18 can access the website at all. For added security, they used WooCommerce Private Store to password protect the WooCommerce shop.

When you click on the Shop link in the navigation menu, you are prompted for a password:

WooCommerce Private Store Case Study

If Montana Medicinals have given you the password, then you can unlock the WooCommerce shop and purchase the medicinal marijuana within. If you do not have a correct password, then you cannot unlock the shop to view products or buy.

The developer was delighted with the plugin and wrote a glowing review:

Worked perfectly!
By Gabriel Silverman
We used this plugin to comply with a US state law in Montana that required a medical marijuana dispensary password protect their WooCommerce catalog. It worked perfectly and was easy to configure!

How to password protect a WooCommerce shop

Beyond the obvious of having a WooCommerce store that actually needs password protecting, all you'll need to follow this guide is the WooCommerce Private Store plugin. WooCommerce Private Store lets you protect your shop with one or more passwords, as well as choose:

  • How long the store stays unlocked when a user enters the password
  • What page users can log in to the store from
  • Where to take users after they log in

When you use the plugin, every aspect of your shop is hidden until a user enters the password, including:

  • Shop pages
  • Navigation menu links
  • Sidebar widgets

While the store functionality is hidden until the user enters a password, the rest of your site will function like normal. That is, your homepage, blog, regular pages, etc. will all still be visible to your visitors.

Password protect your WooCommerce shop today!

Step 1: Set up general settings

Once you've activated the plugin and entered your license key, go to WooCommerce → Settings → Private Store to set up the passwords that unlock your store, as well as a few other general options.

You can use a single password for everyone. Or, you can use the Plus icon to create multiple passwords that unlock your store.

Below the passwords, you should also enter a value for Password expires after. This setting lets you control how long, in days, the store remains unlocked after a user enters the password:

how to password protect a woocommerce shop

Below that, you can use the Redirect URL field to redirect the user to a specific page after they enter the password. If you leave this blank, visitors will just go to your normal shop page after they enter the password.

Finally, you can also choose whether or not to automatically unlock the store for Logged in users or specific user roles.

If you check this box, anyone who's logged in to your WP site will not need to enter the password in order to see the store:

how long to unlock store

Step 2: Configure login form

Below the general settings, you can use the Login form section to configure the page where users log in.

The settings are all fairly self-explanatory:

login page details

How the plugin works in more detail

Once you password protect a Woo shop with the plugin, all traces of your store will disappear from the frontend of your site. All of your regular WP content will function normally, though:

regular site

If a user:

  • Goes to the store login page
  • Tries to access any WooCommerce page via a direct URL

They will see your login form like this:

store login page

And as soon as they enter a valid password, they'll instantly see all of your:

  • Store and product pages
  • Navigation menu items
  • Widgets
unlocked store

And that's all there is to it!

For a more surgical approach, you can also use the WooCommerce Password Protected Categories plugin to password protect a single category of products, rather than your entire shop. You can also use our plugins to build a members-only WooCommerce store.

Password protect your WooCommerce shop today!

If you have any other questions about how to password protect a WooCommerce shop, leave a comment and we'll be sure to help out.


  1. Pernilla
    May 5, 2022 Reply

    I want to use this for my store, but I did not understand if it was possible to set the lock/password to expire after just an hour or two- the guide here talks about days?

    • Carlo
      May 5, 2022 Reply

      Hi Pernilla, thank you for your interest in our plugins. The minimum expiration period is one day. It is not possible to set it lower. More info on password expiry. If you have further questions, you can reach us via our Support Center. Thank you.

  2. Kerm Stiles
    November 26, 2020 Reply

    I'm not sure what I have configured wrong. Whenever someone types in the password, it redirects them to log in to Wordpress.

    • Edge
      November 26, 2020 Reply

      Hi, Kerm. I'm sorry to hear you're having difficulty with what sounds to be the store login redirecting to your site's WordPress login page after submitting the password. So that we may assist you best with this, please could you submit a plugin support request via our Support Center and include either the email address you used to purchase WooCommerce Private Store or your License key. Many thanks.

  3. Firefox Support
    August 24, 2018 Reply

    I have read the post and it has helped me a lot to understand about the password protection procedure. You can easily password protect a WooCommerce shop. You can give a password to the plugin from the admin panel.

Please share your thoughts...

Your email address will not be published.