DEV Community 👩‍💻👨‍💻

Cover image for Not Ready for NEW Netlify Pro?
mike ritter
mike ritter

Posted on

Not Ready for NEW Netlify Pro?

Developer-favorite hosting platform Netlify recently announced a major change affecting end users on their free service tier: effective September 30, 2022 websites hosted in private organization repositories must move the their paid "Pro" hosting tier https://www.netlify.com/pricing/private-org-repo-faq/?_ga=2.48367394.50871513.1660645843-1993254338.1660645843

Options for Avoiding the Pro Version

The FAQ linked above describes the move and options for developers who need to avoid the pro version.

If you are not ready for the NEW Netlify Pro--like the author--you have to determine the option right for you and your client.

I prefer the simplicity of Netlify's automated builds so moving to a CLI option was not for me.

I am not keen on opening my website source to the public and my clients are not contributing to the organization-owned repository, so the solution that seems right is moving the sites to private repos on my GitHub account.

I was able to accomplish the migration fairly simply.

Moving Netlify Sites to Private Personal GitHub Repositories

  1. Create new repository on personal account
  2. Set privacy
  3. Copy repository URL
  4. Change remote URL in local repository
  5. Push to new repository
  6. Change repository in Netlify Site Settings
  7. Confirm successful build

Create a New Repository

Log in to your GitHub account. Instead of using an organization, create a NEW repository in your own account. You will be pushing your existing repository to this one so do not add README.md or anything else.

Set Privacy

The whole reason for migrating from the organization account is that you want to keep your repository private, so set the privacy before you publish your new repo.

Copy Repository URL

Once the new empty repository opens up copy the URL.

Change the Remote URL in Local Repository

First, make sure your local repository is up to date with your production. If not, merge those. Then change the remote URL in your local repository. The following code works in terminal:

git remote set-url origin https://github.com/username/link-to-repo.git
Enter fullscreen mode Exit fullscreen mode

Push to New Repository

Now you are ready to push your code to your new empty private repo on your account.

git push origin master
Enter fullscreen mode Exit fullscreen mode

Change Repository in Netlify Site Settings

Now go to Netlify. In your site Settings under "Build and Deploy" select the "Manage repository" button to "Link to a different repository". Here, you'll select your new repository (you are also given other git hosts).

Confirm Successful Build

Once you configure your build you'll be able to trigger a new build. Watch the dialog to confirm your build was successful. If all goes well you have successfully migrated your website and redeployed with zero downtime and you are free from the upgrade fees.

Top comments (0)

🌚 Browsing with dark mode makes you a better developer.

It's a scientific fact.