# Lock a Page to Members Only

> Checks what a page or post already restricts, then limits it to the plan you pick.

- Job: [Content & SEO](https://storeagent.ai/mcp-recipes/job/content/)
- What it does: Asks first: changes your store, only after you say yes
- Time saved: ~15 min vs doing it by hand
- Requires: StoreAgent (free plugin, MCP on every plan) + WooCommerce Memberships
- Works in: Claude, ChatGPT, Cursor and any MCP client connected to the store through StoreAgent MCP
- Web page: https://storeagent.ai/mcp-recipes/members-only-content/

## The prompt

```text
Show me the current membership restriction rules for the page or post with ID [post ID], including any rules it inherits. Then restrict it so only members of the [plan name] plan can see it, with access starting straight away. Show me the new rules and wait for my OK before you save them.
```

## What happens when you paste it

You: Show me the current membership restriction rules for the page or post with ID [post ID], including any rules it inherits…

Assistant: Post 482 has no rules of its own. It inherits 1 rule from the Guides category. Calling: `woocommerce-memberships/plans-list`, `woocommerce-memberships/post-restriction-rules-get`, `woocommerce-memberships/post-restriction-rules-update`.

Assistant: This will make changes in WooCommerce. Do you want me to go ahead?

Assistant: Saved. Only Gold members can view post 482 now. The inherited Guides rule still applies.

## Abilities this recipe calls

- **List membership plans** (`woocommerce-memberships/plans-list`, read only, from WooCommerce Memberships): Lists your membership plans with access, length and rules.
- **Get content restriction rules** (`woocommerce-memberships/post-restriction-rules-get`, read only, from WooCommerce Memberships): Shows which membership plans can see a post or page, including inherited rules.
- **Update content restriction rules** (`woocommerce-memberships/post-restriction-rules-update`, asks first, from WooCommerce Memberships): Changes which membership plans can see a post or page.

## Variations

Add one of these to the end of the prompt. Swap anything in [brackets] for your own details.

- Delay access until 30 days after someone joins.
- Give access to both the [plan name] and [plan name] plans.

## Related recipes

- [Write Descriptions for Your Newest Products](https://storeagent.ai/mcp-recipes/new-product-descriptions.md): Drafts proper long and short copy for every product you added recently, in your tone, ready for you to check.
- [Write Alt Text for a Batch of Images](https://storeagent.ai/mcp-recipes/image-alt-text-batch.md): Paste in a list of image IDs and get accessible, search-friendly alt text written back to every one.
- [Remove Pages the Chat Assistant Should Not Learn From](https://storeagent.ai/mcp-recipes/ai-memory-cleanup.md): Finds old, test or private-looking pages in the assistant's memory so it stops quoting them to shoppers.

---

Part of the StoreAgent WooCommerce MCP Recipes directory: https://storeagent.ai/mcp-recipes/ (index for LLMs: https://storeagent.ai/mcp-recipes/llms.txt). Get StoreAgent free: https://app.storeagent.ai/sign-up/
