How to Create a Shopify Demo Button That Bypasses the Password Page

Give your clients instant access to your Shopify demo store! Learn how to create a demo button that bypasses the password page with a simple script. Step-by-step guide for Shopify store owners and developers.

Md Jahid Hasan - Jahid Studio Founder

Jahid Hasan, Digital Marketer

How Does the Bypass Work?

How Does the Bypass Work

Table of Contents

Shopify protects unpublished stores with a password page. For demos, this can be a hassle. With a simple script, you can create a “View Demo” button that automatically submits the password and redirects your client to the store—no manual entry needed!

Step-by-Step Guide: Bypass Shopify Password Page

Step 1: Add a Hidden Password Form
				
					<form id="shopifyPasswordForm" method="post" action="https://your-store.myshopify.com/password" style="display:none;">
  <input type="hidden" name="form_type" value="storefront_password">
  <input type="hidden" name="utf8" value="✓">
  <input type="password" name="password" value="YOUR_PASSWORD">
</form>
				
			
Step 2: Add a “View Demo” Button
				
					<button id="viewDemoBtn">View Demo</button>
				
			

Step 3: Add the JavaScript

				
					<script>
  document.addEventListener("DOMContentLoaded", () => {
    const btn = document.getElementById("viewDemoBtn");
    if (!btn) return;

    btn.addEventListener("click", e => {
      e.preventDefault();

      if (localStorage.getItem("shopify_passed") === "true") {
        window.location.href = "https://your-store.myshopify.com";
      } else {
        localStorage.setItem("shopify_passed", "true");
        document.getElementById("shopifyPasswordForm").submit();

        setTimeout(() => {
          window.location.href = "https://your-store.myshopify.com";
        }, 2000);
      }
    });
  });
</script>
				
			

Step 4: Customize for Your Store

  • Replace your-store.myshopify.com with your actual store URL.

  • Replace YOUR_PASSWORD with your store’s password.

Is This Safe?

This method is only for demo or development stores. Never use it on a live store or with sensitive data. For extra security, change your password after the demo or use Shopify’s built-in preview links for clients.

Best Practices for Client Demos
  • Use a unique password for each demo
  • Remove the script after the demo period
  • Let your client know this is a temporary, demo-only feature
Need Help With Shopify?

If you want to make your Shopify demos easier for clients—or need help with Shopify store design, digital marketing, or SEO—contact Jahid Studio. I help freelancers, agencies, and business owners in Bangladesh, Europe, and beyond get the most out of Shopify!

Table of Contents