How to Rename Documents in Firebase Firestore

Cloud Firestore has amazing realtime and scaling capabilities, but the Firebase Console is missing some essential features like renaming a document (change the document ID). Previously you had to create a new document with the same data and delete the old document manually or write a script that does this for you. When the document contained subcollections, they needed to be transferred to the new document as well.

Luckily now there’s Firefoo, the Firestore GUI client that lets you rename documents with the click of a button!

Step by Step Instructions

  1. Download and install Firefoo.

6. Change the last part of the Target Path to the new document name.

7. That’s it! Confirm with OK.

If your document contains subcollections, Firefoo will automatically copy them over to the new location, which might take some time. You can track the progress in the Tasks popup, reachable through FileTasks.

About Firefoo

Firefoo is the sophisticated GUI admin tool for Firebase Cloud Firestore. It helps you organize your data by working around the limitations of the Firebase Console. Features include…

  • Table View

You can also rename, duplicate and delete documents, collections and fields, edit them as JSON and copy data to the clipboard. Undo changes, query with multiple where and order-by clauses and work with your local emulator!

FAQ

How many requests will this use from my quota?

Renaming a document will use at least 4 requests: two reads, one write and one delete. The two reads are due to the additional request to check whether the document has subcollections or not.

If there are subcollections, these same 4 requests are repeated for every document in the subcollections.

VP of Engineering at Bliq: Transforming Gig-work in mobility | Creator of Firefoo: The powerful GUI client for Firebase Firestore