Not too long ago, I talked about the somewhat paradoxical idea of password protecting WooCommerce product categories to prevent unauthorized visitors from accessing specific categories at your store.
Now, Iβm going to take things one step further and show you how to create an entirely private WooCommerce store. That is, instead of merely restricting access to certain categories, youβre going to learn how to restrict access to the whole shebang in one fell swoop.
To do that, weβll be using a plugin called WooCommerce Private Store from Barn2 Media, the same developer behind the WooCommerce Password Protected Categories plugin I used in that other post.
Why Would You Want To Create A Private WooCommerce Store? Isnβt That Counterproductive?
Well, if youβre trying to be the next Amazon, then yeah, itβs pretty counterproductive to hide your store from the general public.
But there are plenty of legitimate reasons that you might want to create a private WooCommerce store.
Here are a couple times this functionality can come in handy:
- Wholesale stores – many wholesale stores donβt want their stock (or prices) available to the general public.
- Members-only stores – if your WooCommerce store is only for registered members, you might not want the public to be able to see your products.
Iβm sure you can probably think up some unique situations by yourself, as well.
How WooCommerce Private Store Helps You Hide Your Store
Like many of Barn2 Mediaβs other WooCommerce plugins, rather than trying to offer a bunch of different functions, WooCommerce Private Store focuses on doing one thing really well.
In this case, that βthingβ is making your entire WooCommerce store private. That means everything will be hidden from both unauthorized users and search enginesβ prying eyes.
So how do users gain access to your store, then? Well, you can use two different methods:
- WooCommerce Login Form – with this method, users will need to enter a password. Once they enter the password once, the entire shop will be unlocked for a period of time that you can specify (no need to re-enter the password multiple times).
- Unlock For Logged In Users – with this method, the store will be automatically unlocked for any users who are logged in to your WordPress site. Non-logged in users will only be able to see the non-WooCommerce parts of your website. This is great for hooking your store up with a membership plugin, or something similar.
Whatβs neat is that, in addition to protecting your core shop pages (product listings, checkout, etc.), WooCommerce Private Store also protects:
- Navigation menu links
- Sidebar widgets
And it will also remove your store from:
- Search results
- XML sitemaps
All in all, itβs pretty thorough about making sure unauthorized people or search crawlers donβt have access to any part of your store.
How To Use WooCommerce Private Store – A Hands-on Look
Ok, so now you know the features. But how do all of these features actually come together to help you create a private WooCommerce store?
Using the plugin is pretty simple. In fact, the setup process will probably only take you a few minutes.
Once you install and activate the plugin, thereβs only one settings page that you need to complete by going to WooCommerce β Settings β Private Store.
In the top section, you can:
- Enter the password(s) to unlock your store. If desired, you can add multiple passwords by clicking the + icon.
- Choose how many days the store should remain unlocked after a user enters the password.
- Enter an (optional) page to redirect users to after they enter the password.
- Choose whether or not to automatically unlock the store for logged in users.
Below those settings, you can also configure the login form using the various options:
To add a login form, all you need to do is use the [ store_login ] shortcode (without the spaces).
By default, the plugin will pull information from the settings that you just entered. But if youβre planning to display a login form in multiple places, you can modify the shortcode on an individual basis with one of the three included parameters:
- message – lets you customize the message that displays above the login form.
- unlocked_message – lets you customize the message that displays after a user enters the password.
- visit_store – lets you customize the CTA displayed after a user enters the password (assuming youβre not already redirecting users to a custom page)
Hereβs what the raw shortcode looks like as part of a page or a widget using the default styling from the free Storefront theme:
Because you create the form with a shortcode, you should also be able to include it as part of a page builder layout with most popular page builders.
And you can also use your own CSS styling to customize how the form looks.
Wrapping Things Up
Because of its niche functionality, WooCommerce Private Store is not a must-have plugin for every single WooCommerce store.
But if you need to create a completely private WooCommerce store, WooCommerce Private Store can help you get up and running with all the functionality that you need in just a few minutes.
Just remember – WooCommerce Private Store is only for restricting access to your entire store. If youβd prefer to only restrict access to specific categories, youβll be better off with the WooCommerce Password Protected Categories plugin.
I hope you enjoyed the guide and it makes your WooCommerce life easier!
3 Responses
Hello Guys,
Thank you for sharing this nice article. I have found another alternatives with bit less price and more features. Still not sure which one to go for.
Can you please compare these 2 in your post?
Thanks a lot Colin for writing a class article, we have just started following your articles and found interesting and informative.
Another really great article, Colin! I’ve recently discovered that lots of people are also using WooCommerce Private Store to temporarily lock down their store – for example, because they only sell products on a seasonal basis or because their store is in development and hasn’t been launched to the general public yet. So this is another interesting use case for the private store plugin.