Where Does Docusaurus Store Cache and Build Output?
Docusaurus keeps its generated cache in .docusaurus and final output in build, both inside your site folder and both safe to delete.
Last updated
Docusaurus state lives inside the site folder in two generated directories. The .docusaurus folder is the framework's working cache (routes, plugin data, registry). The build folder is the static output that gets deployed. Both regenerate from source, so neither deserves a backup.
Real configuration is docusaurus.config.js at the site root plus sidebars files. When something breaks after a version bump, the fix is almost always deleting the cache and rebuilding. Never hand-edit files inside .docusaurus; your edits vanish on the next build.
Where Docusaurus stores this, by platform
[SiteDir]\.docusaurus
Framework cache: routes and plugin output. Safe to delete any time; recreates on build or start. Never edit inside it, since every file is overwritten automatically.
[SiteDir]/.docusaurus
Same in-folder layout on macOS. Deployment output goes to build beside it. Node modules stay in node_modules; Docusaurus-specific state is only ever these two folders.
[SiteDir]/.docusaurus
Same arrangement. Cache staleness after upgrades is the classic failure mode, and wiping .docusaurus plus build before rebuilding fixes most of it.
Frequently asked questions
My Docusaurus build is broken after an upgrade. What do I wipe?
Delete .docusaurus and build, then run the build again. The cache directory regenerates from your content and config, and most mysterious broken-build states clear up with this reset.
Should .docusaurus and build be committed to git?
Yes. Both are pure output. Commit docusaurus.config.js, sidebars.js, docs, blog, src, and static. The .gitignore from the official template already excludes the right folders.
Notice an outdated path? Let us know.