Swell has sunsetted our solution for hosted storefronts. If your storefront is currently hosted by Swell, you may continue using it as before, however, support for this feature will be reduced and we highly recommend migrating to a new hosting provider.
To streamline the transition of your hosted storefront from Swell to another provider, we have created this guide to walk through the process of exporting your code and migrating it to a new hosting vendor of your choice.
We will also explore some of the best vendors for hosting Swell's headless storefront apps, including Vercel, Netlify, Cloudflare, and Heroku. Each of these hosting vendors has unique features and benefits, such as fast deployment times, easy scalability, or built-in security measures. By exploring these options, you can find a hosting solution that best suits your needs and provides a reliable and stable platform for your storefront.
Please note that the migration process can be complex and requires some technical knowledge. Specifically, you should have some familiarity with SSH key management, git version control, and setting up the storefront app build environment.
The first step is to generate an SSH key. You can refer to GitHub's documentation for instructions on how to generate an SSH key. Once generated, add it to your Swell Dashboard by navigating to the 'Storefronts' section and selecting your hosted storefront. From there, go to 'Settings → Developer → SSH Keys' and enter your key and a name for it.
After adding the SSH key from within your terminal, clone your personal storefront repository—this will clone the current code that runs your storefront, in the exact current version. It will look something like this:
git clone email@example.com:your-store-id.git
git clone firstname.lastname@example.org:your-store-id.git
To view your recently cloned storefront repository, use the following command:
Once you've added your SSH key to your Swell Dashboard, you will be able to access your storefront's codebase just as it was hosted by Swell. You can also customize your storefront's theme code by accessing the corresponding git repository and pushing updates. This gives you full control over the look and functionality of your storefront, allowing you to create a unique and engaging shopping experience for your customers.
Before you can host your Swell storefront theme with another hosting provider, you'll need to set up a remote repository and push your codebase to it. We recommend using GitHub for this purpose, as it is compatible with all the hosting platforms we will be discussing later on in this guide.
You can use alternatives like GitLab, but you may need to confirm its compatibility with the hosting platform of your choice before setting up your repository.
After creating your private repository on GitHub/GitLab, set it up as a remote for your local storefront repository, it should look like this:
git remote add origin <git-repository-url>
And then, you can push your local codebase to the newly created remote repository:
git push --set-upstream origin master
Vercel is a cloud platform for static sites and serverless functions. It is an excellent choice for hosting your Swell storefront because it offers a fast and secure hosting environment. Vercel also provides a wide range of features such as custom domains, SSL certificates, automatic deployments, and much more.
To migrate your storefront app to Vercel, you can follow the steps from this guide:
Storefronts on Vercel
Netlify is another popular platform for hosting Git-based apps and websites. It offers a simple and intuitive user interface, making it easy to deploy and manage your app. Netlify also provides features such as continuous deployment, automatic SSL, and CDN caching.
To migrate your storefront app to Netlify, you can follow the steps from this guide:
Storefronts on Netlify
Cloudflare Pages is a platform that is specifically designed for hosting Git-based websites. It offers many of the same features as the other hosting options, such as automatic deployments, SSL encryption, and custom domains. It also provides a fast and reliable hosting environment with global caching and CDN support. Additionally, Cloudflare Pages integrates seamlessly with other Cloudflare services, such as Workers and Workers KV, making it an excellent choice for hosting storefront apps with advanced caching strategies.
To migrate your storefront app to Cloudflare Pages, you can follow the steps from this guide:
Storefronts on Cloudflare Pages
Heroku is a cloud platform that supports a wide range of programming languages, including Node.js, Ruby, Python, and PHP. It provides fast and reliable hosting with automatic scaling and easy deployment. Heroku also offers a range of add-ons, such as databases, logging, and monitoring.
To migrate your storefront app to Heroku, you can follow the steps from this guide:
Storefronts on Heroku