Made in Europe, buy from Europe.

Black Friday

65% off Annual plans

25% off Lifetime · 10 per week

Ends December 2

Get the deal →

7 min read

How to Create a Password-Protected Gallery in WordPress

Password-protected gallery in WordPress: lock one gallery per client, keep the rest of the page public, and fix a password that stops working.

How To Create Password-Protected Image Galleries

Sooner or later, every photographer with a WordPress site needs a gallery only one client should see. Make it a password-protected gallery, and the rest of the page stays public.

WordPress itself only locks whole pages, so you need a gallery plugin. We make Modula, and with it the setup takes two minutes.

In short

  1. Switch on Password Protect in Modula → Extensions (Trio plan and up).
  2. Open your gallery and click Protect in the left rail.
  3. Turn on Password protect, type a password in Set password and a short note in Protect text.
  4. Click Embed, copy the shortcode and add it to a page.

The clicks are the easy part. Below is what nobody writes down: why galleries lock each other, why a password works once and then stops, and what it can’t protect.

When you need a password-protected gallery (and when you don’t)

Use a password when the photos are meant for a few people, not the whole internet:

  • Client deliveries. A wedding, a newborn session, a boudoir shoot: the couple sees their 300 photos, the neighbor doesn’t.
  • Event photos. A school play or a company retreat, for the people who were there.
  • Team assets. Product shots before a launch.
  • Members-only previews. A first look for patrons before the work goes public.

Portfolio and shop galleries? Leave them public: search engines can’t see photos behind a password.

Private gallery or password-protected: which do you need?

To keep gallery photos private, first decide who gets in. For private client galleries, you’ve got four options:

OptionWho sees the photosGood for
PublicAnyonePortfolio, shop, blog posts
Password-protectedAnyone with the passwordDeliveries, events, team folders
WordPress “Private”Your site’s admins and editorsYour own drafts
Invite-only (proofing)The clients you inviteProofing rounds, picking favorites

Careful with “private.” Hosted services like Pic-Time use it for invite-only galleries and call a shared password an “access code”: “a general password for the gallery” (checked October 2026).

WordPress’s own Private setting is a trap. It hides the page from everyone but your admins and editors, clients included.

Before you start

Password Protect is part of Modula Pro, in the Trio plan and up. Install Modula and Modula Pro (installation guide), then switch on Password Protect in Modula → Extensions.

Modula Extensions page with Password Protect switched on

On the free version, Password protect shows an upgrade prompt instead.

No gallery yet? Go to Modula → Content → New gallery, click + Add for your photos and pick one of the 14 gallery types under Layout → Type. No Save button to forget: the editor saves as you go (All changes saved).

Turn on password protection

Open the gallery in Modula and click Protect in the left rail. Then:

  1. Turn on Password protect.
  2. Type the password in Set password.
  3. In Protect text, write the note visitors see above the form. For example: This gallery is private. Use the password from your delivery email.
The Protect section with Password protect on, a password and a Protect text note

Tip

One client, one password. Make it hard to guess. Send it by email or text, never on the page. It’s case-sensitive, so Garden-Party isn’t garden-party.

Add the gallery to a page and test it

Click Embed in the top right, copy the Shortcode and paste it into a page. The Modula block, page builder modules and Modula Link are protected the same way (see the shortcode guide).

The Embed menu with the shortcode, PHP code and Modula Link

Now test it, and expect a surprise: you’ll see the password form even as a logged-in admin. WordPress lets nobody skip a post password. After you type it once, your browser stays unlocked, so test again in a private window, which starts fresh like your client’s phone.

And don’t put a WordPress page password on top. The browser remembers only one of the two, so the page and gallery keep relocking each other. Keep the gallery’s.

What your visitors see

Until someone types the password, a password-protected gallery shows just your note, a Password field and an Enter button.

The password form a visitor sees instead of the gallery
  • Right password. The gallery appears and stays unlocked in that browser for 10 days. A new phone or cleared cookies means typing it again.
  • Wrong password. The form comes back for another try.
  • The page stays public. Keep the client’s full name out of its title and URL. Use a page, not a blog post, so it stays out of your feed.
  • No photos in the page. Until the password is typed, search engines find no photo addresses there.

Sharing galleries with several clients

Password-protected photo sharing works best one client at a time: their own gallery, their own password. Two WordPress quirks explain why.

A browser remembers one gallery password at a time. WordPress keeps a single cookie with the last password typed. Put two galleries with different passwords on one page, and unlocking one locks the other again.

Two password-protected galleries on one page: typing gallery 1's password opens it, then typing gallery 2's password opens gallery 2 and locks gallery 1 again.

One client with ceremony, reception and portrait galleries? Give them one password, or group them in a password-protected album.

A reused password opens every gallery that has it. The cookie remembers the password, not which gallery it was for. Give two June weddings summer26, and each couple can open the other’s gallery if they find its address. WordPress closed Trac #16483 as won’t-fix in 2024.

To end someone’s access, change the password.

Good to know

What to send: “Your photos are ready: [gallery link]. Password: lily-pond-0614. It’s case-sensitive, and your browser will remember it for 10 days.”

Let clients download their photos

Switch on Modula’s Download extension (Business plan), click Interact and turn on Enable download. Then pick Download one image, Download the whole gallery (a ZIP) or both.

Set Download size to Full, too. It starts at Thumbnail, and nobody wants thumbnail-sized wedding photos.

And downloads wait for the password: Modula refuses every download while the gallery is locked. More in the downloadable gallery guide.

When a password isn’t enough: invite-only proofing

Image Proofing (Business plan) is Modula’s invite-only option, for when you want a separate invitation per client or want clients to pick favorites. Only invitations open a proofing gallery, and invitations can expire. See what photo proofing is.

One catch: invite links open the gallery’s own page, which needs Modula → Settings → Galleries → Galleries get their own page. That gives every gallery a public address, so delivery galleries outside proofing need their own password. How to deliver photos to clients covers both routes.

What a password doesn’t protect

A password-protected gallery isn’t the same as password-protected photos. It hides the gallery, not the image files:

  • Files keep public addresses. Each photo’s URL opens without a password. Image Guardian’s Hide the real file address signs the main image’s address so it breaks when pasted elsewhere, but the real files stay reachable through the page’s srcset, and the signed copies load through PHP, which is slower and skips the image CDN. More in how to protect media files.
  • Unlocked visitors can save images. Right-click blocking (Image Guardian, Trio) slows them down, and a watermark (Business) keeps your name on every copy.
  • Passwords get forwarded. Anyone who has it gets in.
  • Switching the extension off unlocks everything. Turn Password Protect off in Extensions and every gallery and album loses its password. Modula asks first.
A Modula gallery still shows its password form while one of its photos, baby-1024x683.jpg, opens by its file address with HTTP 200 and no password.

For the full toolkit, see how to protect images from theft.

If the password stops working

A gallery password that stops working is almost always a page cache problem. The symptoms:

  • the password works once, then the gallery shows to everyone
  • the right password isn’t accepted
  • it works in Chrome but not in Safari on an iPhone

After the right password, WordPress saves a cookie starting with wp-postpass_. A cache that ignores it serves a saved copy of the page, sometimes the unlocked one. Two settings fix it:

  1. Keep protected pages out of the cache. In LiteSpeed Cache, list them under Cache → Excludes → Do Not Cache URIs, plus each gallery’s own address, and add every new one.
  2. Let the wp-postpass_ cookie skip the cache. It’s one site-wide setting: Do Not Cache Cookies (same Excludes tab) in LiteSpeed Cache, or Bypass Cache for Cookies in FlyingPress, where it’s enough on its own.

Clear the cache and test in a private window. If your host caches pages, ask them to do both. Details: Password Protect docs.

Start with a single client gallery

Lock one gallery, send one client the password, and check it on your phone in a private tab. Once that works, you’ve got client delivery on your own domain. Password Protect comes with Modula’s Trio plan and up.

Frequently asked questions

Only the whole page. In the block editor, click the page’s Status, tick Password protected and type a password. If your Modula galleries get their own page, though, a gallery on a locked page stays open at its own address. Put the password on the gallery instead.

Yes. Each Modula gallery takes one password, and so does each album (Trio and up), so give every client their own gallery or album and password. Never reuse a password across clients: once typed, it opens every gallery that uses it.

Not in WordPress, where “Private” hides the page from everyone but your admins and editors, clients included. A password-protected gallery opens for anyone with the password. On hosted services like Pic-Time, “private” means invite-only, which in Modula is Image Proofing.

The page can, with its title and your note, but the photos can’t: Modula leaves them out of the page until someone types the password. To keep the page out of Google too, set it to noindex in your SEO plugin.

This guide covers galleries on your website. On Android, Google Photos has a Locked Folder (Collections → Locked) that opens with your screen lock. On an iPhone with iOS 16 or later, the Hidden album needs Face ID, Touch ID or your passcode.

Make your next gallery
the one people remember.