Moving a Cloudflare Pages Site from Personal GitHub to an Organization

A GitHub repository transfer can move source-code ownership from a personal account to a company organization. For a Cloudflare Pages site, the deployment connection needs separate attention: plan to create a new Pages project connected to the transferred repository, validate it, and then move the production domain.

The important distinction

GitHub can transfer the repository, commit history, issues, pull requests, releases, and other repository data to the receiving organization. Cloudflare Pages is a separate integration. After the repository moves, create a new Pages project connected to the repository under its new GitHub owner rather than assuming the existing Pages project will continue to deploy.

Before transferring the repository

Record the current Cloudflare Pages configuration before making changes:

  • Production branch: Usually main
  • Build command: The command Cloudflare Pages runs
  • Output directory: The directory Pages publishes
  • Root directory: Relevant for monorepos or subdirectory deployments
  • Runtime version: Node.js or another build runtime
  • Environment variables: Record names and store secret values securely
  • Custom domains: Hostnames to move during the cutover
  • Functions and bindings: Pages Functions, KV, D1, R2, or similar resources

This record becomes the configuration checklist for the replacement Pages project. Keep secret values outside the repository and outside the article draft.

Also confirm that the company organization can accept the repository transfer and that Cloudflare can be authorized to access the organization and repository.

Transfer the repository

In the existing GitHub repository, open Settings, find the Danger Zone, and select Transfer. Choose the company GitHub organization and complete GitHub’s confirmation process.

Afterward, update local repository remotes to reference the organization directly:

git remote set-url origin [email protected]:company-github-org/client-site.git
git remote -v

Review GitHub Actions workflows, webhooks, deploy keys, repository secrets, and scripts for references to the prior GitHub owner.

Create a replacement Pages project

Keep the existing Pages project available until the replacement project is working.

  1. In Cloudflare, open Workers & Pages.
  2. Create a new Pages application and choose Connect to Git.
  3. Authorize the company GitHub organization if needed.
  4. Select the transferred repository and intended production branch.
  5. Re-enter the build settings recorded earlier.
  6. Recreate environment variables, secrets, and any required bindings.
  7. Deploy and test the new project using its temporary pages.dev hostname.

A successful build is only the first check. Confirm that the generated site, forms, integrations, redirects, and any dynamic features work as expected.

Move the production domain

Once the replacement project has been tested:

  1. Confirm the new project is deploying from the intended branch.
  2. Confirm environment variables and bindings are present.
  3. Remove or detach the custom domain from the old Pages project if Cloudflare requires it.
  4. Add the production hostname to the new Pages project.
  5. Test the live hostname immediately after cutover.
  6. Keep the old project available as a rollback reference until the new deployment is stable.

Final checks

  • Push a harmless change and confirm that Cloudflare deploys from the organization repository.
  • Test the home page, key content pages, forms, redirects, and HTTPS.
  • Confirm monitoring, analytics, and any external integrations.
  • Record the final repository, Cloudflare project, domain, and administrator ownership.

Takeaway

Treat this work as two coordinated changes: transfer GitHub ownership, then rebuild and validate the Cloudflare Pages Git integration. The extra preparation keeps the company in control of the source repository and reduces the chance of an unexpected deployment outage.