Quick answer
Run Codex in a local website folder, build and preview the site there, then publish the finished files through your tested hosting connection. The tool’s account is separate from your Interactive Online hosting account. SSH must be enabled for the cPanel account you want to use.
Use the connection for an actual website change
After the connection is ready, identify the website format before editing. For an HTML project, ask for one reviewed file change, preview the complete public output, and publish selectively. For WordPress, preserve its editor and native data. For Joomla, distinguish content, modules, templates, and extensions. Repeated connection setup is unnecessary for each content edit.
- Complete HTML editing and publication workflow
- Complete WordPress coding workflow
- Complete Joomla coding workflow
- Review the exact change before deployment
Before you start
You need access to the coding tool, a local project folder, an eligible hosting service, and a tested secure transfer path. Have the assigned host, SSH port, cPanel username, and document root ready. Check your account’s available tools.
If you are changing an existing website, download the relevant source through SFTP or File Manager first. Keep the original download as a recovery copy. For WordPress, files alone do not contain all page content; its database and editor need their own local/staging setup.
If the SSH key folder is missing on your computer, follow the named-key folder and file checks before generating or authorizing a key. Keep existing identities and import only the public key into cPanel.
1. Install Codex and sign in
Use the current official Codex CLI installation instructions. On Windows, use the Windows installer tab; on macOS use the macOS instructions. The official standalone installer addresses are shown below so you can check the source. Download or inspect the script before running it.
If Node.js and npm are already installed, the official npm package is another supported route: npm install -g @openai/codex. Open a fresh terminal after installation. Run codex --version, then codex and complete the offered sign-in flow. An API key or paid plan is not something to paste into a hosting support message.
Windows installer: https://chatgpt.com/codex/install.ps1
macOS installer: https://chatgpt.com/codex/install.sh
# Verify an existing installation
codex --version2. Choose a project and permissions
Create a new folder for this website and open Codex from that folder. Use a local project for the beginner workflow. A remote SSH project runs the agent on the remote host and has separate installation, account, and resource requirements.
Use /status to inspect the session and /permissions for the permissions supported by your version. Keep access appropriate to the task. If SSH is blocked inside Codex, compare its network/approval settings with the ordinary terminal where the connection works. Do not disable every protection to get past a connection error.
Download and run the official installer
If you choose the standalone installer, use the commands for your own operating system. Choose a fresh installer filename if one already exists. Read the downloaded script and confirm its source before the final execution command. Follow any organization/device restrictions; ask your IT administrator if local policy blocks installation.
# Windows PowerShell
Invoke-WebRequest -Uri "https://chatgpt.com/codex/install.ps1" -OutFile "$env:TEMP/codex-website-setup.ps1"
Get-Content "$env:TEMP/codex-website-setup.ps1"
& "$env:TEMP/codex-website-setup.ps1"
# macOS Terminal
curl -fsSL "https://chatgpt.com/codex/install.sh" -o /tmp/codex-website-setup.sh
less /tmp/codex-website-setup.sh
sh /tmp/codex-website-setup.sh3. Create the local website folder
Choose a fresh folder name. The commands below only create a local working directory and start the coding tool; they do not publish anything. If you already have a project, open its existing folder instead.
# Windows PowerShell
New-Item -ItemType Directory -Path "$env:USERPROFILE/Documents/my-business-website"
Set-Location "$env:USERPROFILE/Documents/my-business-website"
codex
# macOS Terminal
mkdir -p ~/Documents/my-business-website
cd ~/Documents/my-business-website
codex4. Give the tool a concrete website brief
Supply your real business facts, services, page list, contact details, and assets you have permission to use. Describe the customer action you want, such as requesting an estimate. Use this starting prompt and replace its examples with your own information:
Create a small static website in this folder with Home, Services, and Contact pages. Use separate HTML and CSS files, working links, readable headings, and a layout that works on phones. Use only the business facts and assets I provide. Ask about missing details instead of inventing testimonials, prices, credentials, or contact information. List every generated file. Do not publish, connect to hosting, install paid services, or add tracking. If a contact form needs a backend, explain what remains to be connected.5. Review and preview the files
Ask the tool to list the entry page, stylesheet, scripts, and assets. For a simple static site, expect an index.html and the other linked pages. Confirm you can open and edit the files outside the conversation.
Follow the local-preview steps to serve the public folder at a loopback address. Open the home page, follow every menu link, and reload the Contact page directly. Read the text, replace placeholders, and check that images are licensed. A locally running development server must not be advertised as the published website.
6. Request one useful revision
Name the page, current behavior, and desired result. For example: “On Services, replace the second service description with this text. Keep the menu and other pages unchanged. Show which files changed.” Review the result in the local browser again.
If you use Git, inspect the diff before and after the change and keep a checkpoint of the working version. Git tracks source changes; it is not a complete backup of a hosted CMS, database, or mailbox.
7. Set up and test the hosting connection
- Create a dedicated SSH key on your computer, then import and authorize only its public key in cPanel. Generate the key and authorize the public key.
- Create a local SSH alias using your actual host, user, port, and private-key path. Set up the alias. Test it in your normal terminal before asking the coding tool to use it.
- Verify the server host-key fingerprint through trusted support/account information. After connecting, use whoami and pwd to confirm the account and location. Exit after the check.
- Give Codex the alias and exact remote document root for a read-only inspection. Keep the private key and its passphrase outside the conversation. A dedicated key remains subject to the permissions of the cPanel account; it does not automatically isolate one domain.
8. Publish the reviewed version
Download a current copy of the files you will replace and check whether someone has changed the live site since your working copy was made. Confirm the destination in cPanel > Domains.
Ask Codex to list the proposed upload files and target before granting a deployment. Upload only the public website output through the tested SSH/SFTP method. You can perform the upload yourself in an SFTP client. Follow the full publishing and verification guide.
For an Astro or other build-based project, run the documented production build locally and deploy its static output. Do not upload node_modules or start a persistent development server on shared hosting. SSR and other server runtimes need separate account support.
9. Check the live website and make future updates
Test the real HTTPS home page and nested pages, navigation, images, downloads, and the actual form delivery path. Compare the published files with the version you intended to release. Keep the working source and pre-deployment copy.
For the next update, return to the same project, check newer live edits, make the smallest change, preview it, and publish the changed public files. If a release fails, restore those files from the recovery copy. Protect newer orders or submissions before considering a database restore.
Troubleshooting
- codex is not recognized: open a new terminal and follow the official installation/PATH troubleshooting. Confirm you installed it in the environment you are using.
- SSH works in your terminal but fails in the coding tool: check the tool’s environment, key path, network permissions, and approval prompts.
- Permission denied (publickey): check username, selected key, public-key authorization, and shell availability. Troubleshoot that exact error.
- Upload succeeds but the page is unchanged: check domain mapping, document root, index file, filename case, and cache.
- The website needs PHP, a database, SSR, or another runtime: stop before uploading and check the account’s supported deployment model.
Contact support
Include the domain, service name, connection method, host/port, timestamp/time zone, and redacted error. Describe whether the command ran on your computer or on the server. Do not send private keys, provider tokens, passwords, or session URLs.
Codex cannot connect over SSH
Compare the ordinary terminal with the Codex session: local or remote environment, SSH alias, private-key path, account username, assigned port and permitted network access. A working connection on your computer does not establish that a cloud or remote session has the same files or network route. Check the session's current permission controls and authorize only the connection needed.
Use a read-only identity/folder check before an upload. If the error is Permission denied (publickey), use the key-authentication checks rather than changing website code. If you want persistent project rules, use the AGENTS.md and CLAUDE.md project guide. Instructions do not create access to an ineligible hosting account.
Related help
- Connect Claude Code or Codex to cPanel: complete Windows and Mac setup
- Generate an SSH key on your computer for an AI coding workflow
- Import and authorize a public SSH key in cPanel
- Create a local SSH alias for a website coding assistant
- Publish an AI-generated static HTML website to cPanel
- Is my AI command running on my computer or on the hosting server?
- Fix Permission denied (publickey) when connecting an AI coding tool
- Find the correct document root before an AI tool uploads files
Official references
Last content review: October 31, 2026. Check the version and features available in your own account.
Task guidance and related-help review: November 1, 2026.
AI editing guidance and linked workflow documentation reviewed November 2, 2026. Existing video and earlier review history retained.