> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: About Preview and Test Sites in Studio Two

## Article: About Preview and Test Sites in Studio Two

## Article Link: https://dev.wix.com/docs/studio-two/test-your-site/preview-and-test-sites/about-preview-and-test-sites-in-studio-two.md

## Article Content:

# About Preview and Test Sites in Studio Two

Before you publish code to your live site, you can try it in Preview in the Studio Two editor, or on a test site. Preview runs your current code, including changes you haven't published, but it doesn't render pages on the server, and it reads data with your permissions. A test site runs the way the live site does, but with your code from when you created the test site. So code that works in Preview might still fail on a test site or on the live site.

To open Preview, click **Preview** at the top of the editor. A test site is a separate version of your site with its own URL. To create one, see [Create a Test Site in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/create-a-test-site-in-studio-two.md).

## Preview, test sites, and the live site

The following table compares how your code runs in each place:

| | Preview | Test site | Live site |
|---|---|---|---|
| Who can open it | You, in the editor | Anyone with its link | Every site visitor |
| Which code runs | Your current code | Your code from when you created the test site, except for some service plugins | Your code from when you last published |
| Server rendering | No | Yes | Yes |
| Permissions for reading data | Yours, as the Wix user | The site visitor's | The site visitor's |
| Site data, such as CMS collections | Your site's data | Your site's data | Your site's data |
| Log entries from frontend code | Not written | Written to the **Logs** page | Written to the **Logs** page |
| **Developer Console** | Available | Not available | Not available |

## What to watch for

The differences in the table have these effects on how you test your code:

- **Server rendering:** Code that fails only during the server render doesn't fail in Preview. To check it, use a test site. For details, see [About Page Rendering](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-frontend/about-page-rendering.md).
- **Permissions:** A query that works in Preview can fail for site visitors. For example, when you're the Wix user who owns the site, a query of a CMS collection that only admins can read returns items in Preview. On a test site and on the live site, the same query fails for site visitors. On the live site, it fails for you too unless you sign in to the site.
- **Shared data:** Your site has no separate collections for testing. When code on a test site changes data in a CMS collection, the change appears on the live site too.
- **Log entries:** Log entries and uncaught backend errors from a test site appear on the **Logs** page together with the live site's, and nothing in an entry shows which one it came from.
- **Service plugins:** In Preview, Wix calls the eCommerce additional fees and validations service plugins with your current code, so you can test a change to either one in Preview before you publish it. On a test site, Wix calls the eCommerce additional fees service plugin with your published code, not the test site's code.

## See also

- [Create a Test Site in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/create-a-test-site-in-studio-two.md)
- [About Debugging Your Code in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/about-debugging-your-code-in-studio-two.md)
- [About Page Rendering](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-frontend/about-page-rendering.md)
- [Test Sites: Creating a Test Site](https://support.wix.com/en/article/test-sites-creating-a-test-site)