Move your code to GitHub
Copy the repository behind a site into your own GitHub organisation, and keep editing it in Modulify.
On this page
Every Modulify site is a private GitHub repository that Modulify creates and writes to. Moving the repository hands that repository to a GitHub organisation or account you own. Modulify keeps editing and publishing from it there, so nothing about how you work changes. What changes is who owns the code.
Before you begin
Moving code to your own GitHub requires a paid plan. The GitHub tab in workspace settings and the Repository section on a site's Settings tab are always visible, but connecting an account and moving a repository are disabled and marked Paid on the Free plan. See Plans.
Two permissions are involved. Connecting a GitHub account to the workspace needs the Edit workspace permission. Moving a site's repository needs the Transfer projects permission. The workspace owner has both, and a custom role can be given them. See Members and roles.
You also need to be an owner of the GitHub organisation, or the account itself, because GitHub asks you to install the Modulify app there.
Connect a GitHub account to the workspace
GitHub accounts are connected once per workspace, and every site in the workspace can then move into any of them.
Open workspace settings
Open the dashboard, click Settings in the sidebar, then the GitHub tab. Its address is /dashboard/settings/github. The page reads Connect the GitHub organisations or accounts that can own your site repositories. With nothing connected yet it shows No GitHub accounts, Connect an organisation or personal account to own your site code.
Install the Modulify app on GitHub
Click Connect GitHub account. You are sent to GitHub, where you pick the organisation or the personal account to install the Modulify app on. Choose All repositories or, if you prefer to limit it, Only select repositories. Either works, but with a limited installation you must add the new repository to the app after the move, which is covered below.
Confirm your GitHub account
GitHub then asks you to authorize the Modulify app, which lets Modulify check that your own GitHub account really manages the installation you just made. Only a GitHub account that can see every repository the app reaches can connect it. An account that cannot manage the installation is refused with Your GitHub account cannot manage that installation, so it was not connected!, and an account that sees fewer repositories than the app reaches is refused with The Modulify app on that account reaches repositories your GitHub account cannot see, so only an owner of the account can connect it! If you decline the authorization, the account is not connected.
For an organisation, seeing the repositories is not enough. Your GitHub account must be an admin of every repository the app reaches, which an owner of the organisation always is. A member without those rights, even one who can read every repository, is refused with Only an owner of that GitHub organization can connect it, so it was not connected! The same answer comes back for an organisation installation that reaches no repository at all, so give the app access to at least one repository before you connect it. For a personal account, the GitHub account you authorize with must be that account itself.
Come back to Modulify
GitHub returns you to Modulify and the account appears in the list with a GitHub account connected toast. The row shows the account with an @, whether it is an Organization or a User, and whether the app can see All repositories or Selected repositories.
Verify an account connected earlier
An account connected before this confirmation step existed shows a Not verified badge and a Verify button in its row. Click Verify to go through the GitHub authorization above for that account. Until it is verified, the account cannot hold a moved site, its private repositories cannot be imported, and it is disabled in the GitHub account picker of the Move to your GitHub row. Moving a site into it is refused with Verify this GitHub account in workspace settings before moving a site into it! Verify needs the Edit workspace permission and a paid plan, like connecting.
A GitHub account can be connected to one Modulify workspace at a time. Connecting it from a second workspace answers that it is already connected to another workspace.
Disconnect removes the account from the workspace. It refuses while any site still lives in that account, and it does not uninstall the app on GitHub. To revoke Modulify's access completely, uninstall the Modulify app from the account's GitHub settings.
Move a site's repository
Open the Repository section
Open the site, click More in the tab strip, then Settings. Between General and Danger zone sits Repository, Own the code of this site in your GitHub organisation or account. The rest of the tab is covered in Project settings.
The Location row reads Managed by Modulify for a site that has not moved.
Choose the account and a name
In the Move to your GitHub row pick the connected account and set the Repository name. It is prefilled with your site's address slug. Names can hold letters, numbers, hyphens, underscores and dots. Beside Move repository sits a second button that takes you to the workspace GitHub tab. It reads Connect GitHub account while the workspace has none, and Manage repositories once at least one is connected. With no account connected, Move repository itself is disabled with the tooltip Connect a GitHub account in workspace settings first.
Confirm the move
Click Move repository and confirm. The dialog asks Move this repository? and explains that the code and its full history are copied into a new repository under that account, that Modulify keeps editing and publishing from there for as long as the Modulify app can access it, that the original stays archived with Modulify as a backup, and that the move cannot be undone from Modulify.
Wait for GitHub
The Location row switches to a Copy in progress badge while Modulify creates the repository in your organisation and pushes every commit, both branches and any tags into it. That usually takes a few seconds, and never more than a few minutes for a large history. The move is only marked complete once the copy has been checked commit for commit. A copy that does not finish within thirty minutes is marked Failed, the half made repository is removed from your organisation, and the row goes back to letting you start over.
When the copy completes the badge reads Connected, the row links to the repository on GitHub, and a Repository moved toast confirms it. The move is also recorded in the site's Backups tab as a Repository move entry.
What Modulify does after the move
Nothing you do in the editor changes. Chat edits, text edits, restores and publishes all commit to the repository at its new home, and the preview and production servers read from there. Every commit lands in your organisation under Modulify's own author identity, and the Backups tab in Modulify still names the person who made the change.
The repository keeps the layout Modulify gave it. The preview branch is what the editor shows and edits, and the production branch is what a publish builds. Modulify is the only writer to those two branches. Treat the repository as yours to read, clone, fork and run pipelines on, and make changes through Modulify rather than pushing to those two branches directly, because the next edit or publish overwrites them.
Modulify only moves repositories that it created. There is no way to attach an existing repository of your own, because the site tooling depends on the structure Modulify set up.
Handing the site to someone else
A site whose code lives in your GitHub can still be transferred to another person, or moved to another workspace, on its own or inside a folder. Modulify copies the code back into its own organisation as part of the handover, so the new owner receives an ordinary site.
The reason is that the repository and the app installation that reaches it both belong to your account. Without moving the code back, the new owner would be editing and publishing into your GitHub organisation, through your installation, with no way to take it over and no way for you to disconnect the account afterwards.
You do not need to do anything for this. It happens when the handover is accepted, or when the workspace move runs. Moving a folder copies back every site in it whose code lives in your GitHub before anything moves, and if one of them cannot be copied back, the folder and every site in it stay in the current workspace.
Modulify needs the Modulify app to still be installed on your organisation with administration access to copy the repository back. If it cannot, the handover stops with Modulify could not move this site's code out of your GitHub organisation, so the handover was stopped. Make sure the Modulify app is still installed there with administration access, then try again! and the site stays with you until you fix the installation.
A site whose copy failed is unaffected. Its code is still with Modulify, so it hands over and moves like any other site. A site whose copy is still in progress has to wait for the copy to finish. Accepting its transfer, or moving the folder it is in, answers The GitHub repository for this site is busy with another move. Try again in a moment!, and moving it together with other projects leaves it behind in its current workspace while the others move.
Moving the code back this way is the one path out of your own GitHub. There is no separate button for it.
If Modulify loses access
Modulify can only work on the repository while the Modulify app is installed on the account and can see that repository. If the app is uninstalled, suspended, or the repository is removed from a limited installation, the Location row switches to Access required and every edit and publish is refused with Modulify no longer has access to the GitHub repository that holds this site. Grant the Modulify GitHub app access to the repository and try again!
While the row reads Access required, Modulify does not read the repository at all. The Files tab shows Could not load files, the preview cannot load the code, and exporting the code answers Could not read your code from GitHub. Please try again in a moment! Modulify also only ever reaches a moved site through the GitHub account connected in the workspace the site is in, never through a connection in another workspace.
To fix it, open the Modulify app in that account's GitHub settings and give it access to the repository, or install it again. The row then shows Grant the Modulify app access to this repository in your GitHub settings, then refresh. with a Refresh button. Modulify also checks on its own every few minutes and reconnects as soon as it can see the repository again.
Renaming the repository on GitHub, or transferring it onward to another account where the Modulify app is installed, is picked up automatically. Deleting the repository on GitHub marks the site Deleted, and the site can no longer be edited or published.
If the workspace drops to the Free plan
Working on a site whose code lives in your GitHub needs a paid plan, exactly like moving it there did. If the workspace owner's subscription ends, every site whose Location row reads Connected opens on a Paid plan required dialog, The code for this site lives in your own GitHub, which needs a paid plan. Upgrade the workspace to keep editing and publishing it., and every chat edit, text edit, restore and publish is refused with the same message until the workspace is paid again. The dialog offers Upgrade plan to whoever can manage billing, and Refresh.
Nothing changes on GitHub. The repository stays in your organisation, the Modulify app stays installed, and the site picks up where it left off as soon as the workspace is on a paid plan again. Sites that still live with Modulify, including one whose move failed, are not affected, and finishing a Connect GitHub account flow that was started before the downgrade is refused as well.
Transferring the site to another person, or moving it to another workspace, still works on the Free plan, because the code is copied back to Modulify as part of the handover.
Cloning and deleting a moved site
Cloning a moved site creates the copy as a Modulify managed repository, exactly like a new site. The copy is not placed in your GitHub account.
Deleting a moved site removes it from Modulify but never deletes your repository. The code stays in your account.
Can I move a site into a personal GitHub account?
Not yet. GitHub does not let an installed app create repositories on a personal profile, so the move is refused with Moving code into a personal GitHub account is not available yet. Connect a GitHub organisation instead! Create a free organisation on GitHub, install the Modulify app on it, and move the site there.
Can I move the repository back to Modulify?
Not from Modulify. Contact support if you need a site returned.
Can I push my own commits?
The preview and production branches are written by Modulify and are overwritten by the next edit or publish. Work on your own branches, or make the change through Modulify.