{"slug": "build-and-deploy-hosted-sites-from-codex-with-the-sites-plugin", "title": "Build and deploy hosted sites from Codex with the Sites plugin", "summary": "OpenAI has launched the Sites plugin for Codex, enabling users to create, save, deploy, and inspect hosted websites, web apps, and games directly from prompts without a separate deployment workflow. The feature is currently in preview for ChatGPT Business and Enterprise workspaces, with Enterprise admins required to enable it through role-based access control. Every deployment URL is a production release, though users can save versions for review before making them live.", "body_md": "Sites lets Codex create, save, deploy, and inspect websites, web apps, and\ngames hosted by OpenAI. Use the **Sites** plugin when you want to turn a prompt\nor a compatible existing project into a hosted site without setting up a\nseparate deployment workflow.\n\nEvery Sites deployment URL is a production deployment. If you want to review a build before it becomes live, ask Codex to save a version without deploying it.\n\n## Get started with Sites\n\nSites is in preview and currently available for ChatGPT Business and Enterprise\nworkspaces, with more plans rolling out later. For ChatGPT Enterprise\nworkspaces, an admin must turn it on through role-based access control (RBAC)\nbefore members can use it. Compare support by plan in\n[Feature availability](/codex/pricing#feature-availability).\n\n-\nEnable Sites for an Enterprise workspace\n\nIf you use ChatGPT Enterprise, ask your workspace admin to open the RBAC controls in\n\n[ChatGPT admin settings](https://chatgpt.com/admin/settings)and turn on Sites for the appropriate role. ChatGPT Business workspaces can skip this step because Sites is enabled by default. -\nAdd the Sites plugin\n\nIf\n\n**Sites** isn’t already available, open**Plugins** in the Codex app, find**Sites**, and add it to Codex. Start a new thread after installing a plugin. -\nStart a Sites task\n\nIn a thread, describe the site you want to create or publish. You can name the plugin explicitly with\n\n`@Sites`\n\n, especially when your task should end in a hosted deployment. -\nReview whether to save or deploy\n\nAsk Codex to validate the site’s build. Then tell it either to save a deployable version for review or to deploy the approved saved version.\n\n-\nReturn to deployed sites\n\nOpen\n\n**Sites** in the app sidebar to return to your Sites projects. You can also ask Codex to inspect saved versions, check deployment status, or change who can access a deployed site.\n\n## Prompt Sites for common tasks\n\nFor a new website, dashboard, or internal tool, include the audience, core experience, and required data:\n\n```\n@Sites Build a project request dashboard for my operations team. Let team\nmembers submit requests, see who owns each one, update the status, and filter\nthe list. Require people to sign in with their workspace account, and keep the\nrequest data saved between visits.\n```\n\nFor an existing project, ask Sites to prepare and publish the current app:\n\n```\n@Sites Deploy this project. Check whether it is compatible with Sites, make any\nrequired changes, and give me the deployment URL.\n```\n\nWhen a site needs durable application data or uploaded files, say so in the request:\n\n```\n@Sites Add persistent player scores and avatar uploads to this game. Use\nthe appropriate Sites storage and deploy the updated game.\n```\n\nBrowse the [Sites showcase](/showcase/sites) for deployed internal apps and\nthe full prompts used to create them.\n\n## Understand projects, versions, and deployments\n\nA Sites project links a local source project to hosting managed through Sites.\nCodex stores that linkage and optional storage binding names in\n`.openai/hosting.json`\n\n. A newly created local starter can begin without a\n`project_id`\n\n; Sites adds one after it provisions the hosted project.\n\nFor example, a provisioned site that uses a relational database binding and no file storage can contain:\n\n```\n{\n  \"project_id\": \"<project-id>\",\n  \"d1\": \"DB\",\n  \"r2\": null\n}\n```\n\nSites publishing has two separate stages:\n\n**Save a version.** Codex builds the deployable site and associates that version with the source Git commit used for the build. Use this stage when you want a reviewable deployment candidate.**Deploy a version.** Codex publishes a saved version and reports the production URL when deployment succeeds. Use this only when you intend for the selected audience to access the site.\n\nAsk Codex to list or inspect saved versions when you need to identify a previous deployment candidate.\n\n## Choose a supported site shape\n\nSites hosts projects that build Cloudflare Worker-compatible output as ES modules. For new projects, the Sites workflow can start with its recommended site starter. For an existing site, ask Codex to confirm that the project’s build can produce compatible deployment artifacts before you request a deployment.\n\nTell Codex about the product behavior you need so it can select the appropriate site shape:\n\n| Site need | What to ask Sites for |\n|---|---|\n| Content-led website or landing page | A site with no persistent application state unless the experience requires it |\n| Saved records, user progress, or game scores | D1, a relational database for durable structured data |\n| Images, documents, audio, video, or other uploads | R2, object storage for files |\n| Uploaded files with searchable metadata | D1 for metadata and R2 for file contents |\n| Internal site that needs the current workspace user’s identity | Workspace-authenticated user identity |\n| Public sign-in or an external identity provider | An authentication-enabled Sites project |\n\nDon’t request durable storage for temporary presentation state, such as a theme choice or a dismissed banner. Do request it for product data that people expect the hosted site to remember.\n\n## Control access and secrets\n\nSet the audience before you share a deployed URL. For a new site, keep access limited to the owner and workspace admins until you have reviewed the content, data handling, and expected audience.\n\nYou can ask Sites to apply one of these access modes:\n\n| Access mode | Who can access the site |\n|---|---|\nOwner and admins (`admins_only` ) | The site owner and workspace admins |\nWorkspace (`workspace_all` ) | All active users in the workspace |\nCustom (`custom` ) | Specific active users or workspace groups that you choose; Sites continues to allow the owner |\n\nFor example:\n\n```\n@Sites Change this deployed site's access to everyone in my workspace after\nshowing me the current site and confirming the deployment URL.\n```\n\n### Configure runtime environment values\n\nOpen **Sites** in the app sidebar and select a project to add, update, or remove\nhosted environment variables and secrets in the Sites panel. Don’t store these\nvalues in `.openai/hosting.json`\n\n. Keep local `.env`\n\nand `.env.example`\n\nfiles\naligned with the keys needed for local development, and don’t commit secret\nvalues.\n\nWhen you add, update, or remove hosted environment values, ask Codex to redeploy the approved saved version so the next deployment uses the updated configuration.\n\n## Review before you share\n\nBefore you deploy or widen access:\n\n- Review the source changes and any database migrations in the Codex\n[review pane](/codex/app/review). - Confirm that the build succeeded and that the selected saved version is the version you intend to publish.\n- Check that only the intended audience can access the site.\n- Confirm that you configured runtime secret values through Sites and didn’t commit them in source files.\n- After deployment, ask Codex to confirm deployment status and the production URL before you share it.\n\n## Related documentation\n\n[Plugins](/codex/plugins)explains how to install and invoke Codex plugins.[Codex app](/codex/app)introduces app navigation and project threads.[Review and ship changes](/codex/app/review)explains how to inspect source changes before publishing them.", "url": "https://wpnews.pro/news/build-and-deploy-hosted-sites-from-codex-with-the-sites-plugin", "canonical_source": "https://developers.openai.com/codex/sites", "published_at": "2026-06-03 01:43:14+00:00", "updated_at": "2026-06-03 02:17:41.957867+00:00", "lang": "en", "topics": ["ai-products", "ai-tools"], "entities": ["OpenAI", "Codex", "ChatGPT", "Sites"], "alternates": {"html": "https://wpnews.pro/news/build-and-deploy-hosted-sites-from-codex-with-the-sites-plugin", "markdown": "https://wpnews.pro/news/build-and-deploy-hosted-sites-from-codex-with-the-sites-plugin.md", "text": "https://wpnews.pro/news/build-and-deploy-hosted-sites-from-codex-with-the-sites-plugin.txt", "jsonld": "https://wpnews.pro/news/build-and-deploy-hosted-sites-from-codex-with-the-sites-plugin.jsonld"}}