Ask three HubSpot developers where they test a change and you may get three different answers, and all three may be right, because they are thinking of three different kinds of change. HubSpot does not have one staging environment. It has several tools that each isolate a different thing: the code of a theme or app, the content of pages, and the loop on a developer's machine. Teams get into trouble when they use one for the job of another, trying to test a module change in content staging, or a page redesign in a sandbox that has none of the site's content.
In this guide, I will lay out the three environments and the job each is built for, add the fourth tool most people forget, theme test mode, and then put them together into a workflow where a change moves from a developer's machine to production through the right stops. The organizing idea is the one that runs through all of Content Hub: structure and content are separate, and so are the places you test them. It is the same separation that shapes how you launch and manage a HubSpot Content Hub website over its whole life, and the environments are where it becomes practical.
Part of the guide: HubSpot implementation: the guide and checklist
Local development: the daily loop
Local development is not an environment in HubSpot; it is the developer's own machine, connected to a portal through the CLI. You edit theme files in your editor, hs watch uploads them on save, and you preview the result in the portal you are connected to. This is where the hour-to-hour work happens, and its strength is speed and tooling: version control, code review, your own editor, and a loop measured in seconds.
Its limitation is that it is a loop, not an isolation. Whatever portal the CLI is pointed at is where your saves land. Pointed at production, local development is live editing with extra steps. That is why local development is always paired with one of the other environments: you develop locally and upload to somewhere that is not production. Which somewhere depends on what you are changing.
Developer sandbox: for theme, template and module code
A developer sandbox is a separate HubSpot account, created from your production account, meant for building and testing assets: themes, templates, modules and app code. It is the right target for your local development loop when the change is structural. You point the CLI at the sandbox, build and test the theme there, and when it is right, deploy the same assets to production. When the change is a new visual direction and not a fix, a child theme adds a second layer of isolation, since it inherits the main theme and overrides only what changes.
The thing to understand about a sandbox is what it does not contain: your production content. It is an account-level copy of settings and assets, not of your pages and their text. That makes it ideal for testing code, because you can break things freely, and wrong for judging how a redesign looks with the real home page copy, because the real copy is not there. HubSpot's own guidance is explicit that for changes to themes, templates and modules, the sandbox is the recommended place.
Content staging: for page redesigns with real content
Content staging solves the opposite problem. It is an environment inside your production account, on a staging domain, where you duplicate existing pages, with all their real content, images and settings, redesign them, and then publish the staged versions over the live ones, several pages at a time. It is built for the moment when the question is not whether the code works but whether the new design works with the actual content of the actual pages.
That makes content staging the tool for a site redesign or a page overhaul: the structure is settled, and what you are testing is the content in its new layout. It is not the place to test a module change, because the module code is what it is on the account; staging a page does not isolate the theme. Use it when the change is to pages, and use the sandbox when the change is to the theme the pages are built on.
Theme test mode: the tool people forget
There is a fourth tool that sits between the two and answers a narrow but common question: do my theme settings work as intended? Theme test mode opens the theme editor against your real site without changing it. You adjust the theme's fields, colors, fonts, spacing, see the effect across templates, and nothing is published, because publishing is blocked in test mode. You can tell you are in it by the testmode=true parameter in the address bar.
Reach for it when the change is a theme setting rather than theme code or page content. It is faster than a sandbox for that question and safer than editing live settings. It also lets you copy the theme settings as JSON to paste into your local fields.json, which closes the loop back to local development.
A tip from someone who has been burned: before you test anything, say out loud whether you are changing structure or content. Structure, meaning theme, template or module code, goes to a sandbox from your local loop. Content, meaning pages and their copy, goes to content staging. Settings go to theme test mode. The failures all come from answering that question wrong and sending a change to the environment built for the other kind.
Putting them together: a change's path to production
A healthy workflow routes each kind of change through the right stops. A theme or module change starts on a developer's machine, is uploaded to the sandbox through hs watch, is reviewed in version control, and is deployed to production once tested. A page redesign starts in content staging, where the team iterates on real content, and is published over the live pages when approved. A theme setting is tried in test mode and then applied. None of these touches production until the change is proven in the environment that can actually prove it.
The workflow also decides who does what. Developers live in local development and the sandbox. Marketing lives in content staging and the live editor. Theme test mode is shared, because settings sit on the boundary. Giving each team the environment that matches their kind of change is what keeps them from stepping on each other, and from stepping on production.
Why this matters for your operation
Environments are what let a site change without fear. A team that tests code in a sandbox, content in staging and settings in test mode ships improvements continuously, because every change is proven before it is live. A team that has only production, or that uses the wrong environment for the change, slows down as the fear of breaking something grows, and the site freezes in the version it launched with.
The cost of getting this right is small: a sandbox account, a staging domain, a habit of asking which kind of change this is. The cost of getting it wrong is the kind of incident everyone remembers: a module change that broke the home page because it was tested against staged pages instead of the theme, or a redesign that looked perfect in a sandbox and fell apart against the real copy. Match the environment to the change and both incidents stop happening.
In practice: the redesign tested in the wrong place
A team redesigned its site in a developer sandbox, where the new templates looked clean, and deployed to production confident. The live pages, with their real headlines, long product descriptions and legacy images, broke the new layout in a dozen places the sandbox's placeholder content had never exercised. The code was fine. It had been tested against the wrong content.
The second attempt split the work by kind. The new theme code was built and tested in the sandbox, then deployed. The page redesign then happened in content staging, where each page was duplicated with its real content, adjusted until the new layout held, and published over the live version. The same redesign that had broken production went live cleanly, because each half was tested where it could be seen.
Checklist for choosing the environment
- Is the change to structure, theme, template or module code, pointing to a developer sandbox from your local loop?
- Is the change to pages and their content, pointing to content staging?
- Is the change to a theme setting, pointing to theme test mode?
- Is your CLI pointed at the sandbox, not production, while you develop?
- Do page redesigns get tested against real content in staging before publishing over live pages?
- Does each team work in the environment that matches its kind of change?
Frequently asked questions
What is the difference between a sandbox and content staging?
A developer sandbox is a separate account for testing theme, template, module and app code, without your production content. Content staging is an environment inside your account, on a staging domain, for redesigning real pages with their real content before publishing over the live versions.
Where should I test a module change?
In a developer sandbox, uploaded from your local development loop. Content staging does not isolate the theme, so a module change cannot be properly tested there.
Where should I test a site redesign?
Theme code in the sandbox first, then the page redesign in content staging, where you duplicate pages with their real content and publish the staged versions over the live ones once they hold.
What is theme test mode?
A way to open the theme editor against your real site without changing it. Publishing is blocked, so you can try colors, fonts and spacing safely. The address bar shows testmode=true when you are in it.
Is local development an environment?
No, it is the loop on the developer's machine, connected to a portal through the CLI. It should always be pointed at a sandbox, not production, so that saves land somewhere safe.
Can marketing use content staging on their own?
Yes. Content staging is built for page work with real content, which is marketing's domain, while developers work in local development and the sandbox. Matching teams to environments is part of the point.
Let's talk? Want a HubSpot environment setup where code, content and settings each have a safe place to be tested? At Insight Sales we design the workflow and configure the sandbox, staging and tooling. Talk to our team and find out how we can help.