Migrating from Firebase
Last updated Apr 21, 2026 In this tutorial, you will learn how to migrate an existing Firebase application to Cloudflare Pages. You should already have an existing project deployed on Firebase that you would like to host on Cloudflare Pages.
Finding your build command and build directory
To move your application to Cloudflare Pages, you will need to find your build command and build directory.
You will use these to tell Cloudflare Pages how to deploy your project. If you have been deploying manually from your local machine using the firebase command-line tool, the firebase.json configuration file should include a public key that will be your build directory:
firebase.jsonjson
{
"public": "public"
}
Firebase Hosting does not ask for your build command, so if you are running a standard JavaScript set up, you will probably be using npm build or a command specific to the framework or tool you are using (for example, ng build).
After you have found your build directory and build command, you can move your project to Cloudflare Pages.
Creating a new Pages project
If you have not pushed your static site to GitHub before, you should do so before continuing. This will also give you access to features like automatic deployments, and deployment previews.
You can create a new repository by visiting repo.new ↗︎ and following the instructions to push your project up to GitHub.
Use the Get started guide to add your project to Cloudflare Pages, using the build command and build directory that you saved earlier.
Cleaning up your old application and assigning the domain
Once you have deployed your application, go to the Firebase dashboard and remove your old Firebase project. In your Cloudflare DNS settings for your domain, make sure to update the CNAME record for your domain from Firebase to Cloudflare Pages.
By completing this guide, you have successfully migrated your Firebase project to Cloudflare Pages.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/pages/migrations/migrating-from-firebase/#page","headline":"Migrating from Firebase","description":"This tutorial explains how to migrate an existing Firebase application to Cloudflare Pages.","url":"https://developers.cloudflare.com/pages/migrations/migrating-from-firebase/","inLanguage":"en","image":"https://developers.cloudflare.com/pages/migrations/migrating-from-firebase/og.png?v=35cc02f5f58e010b","dateModified":"2026-04-21","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Learn how to migrate from Netlify to Cloudflare. This guide includes instructions for migrating redirects and headers. title: Migrating from Netlify to Pages image: https://developers.cloudflare.com/pages/migrations/migrating-from-netlify/og.png?v=e3e3591f595a5454
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/pages/llms.txt
Use this file to discover all available pages before exploring further.
Docs