Pocket guide to

Feature Flags

A feature flag separates deploying code from releasing it. You merge the change turned off, then decide from PostHog who gets it: your team first, then 5% of users, then everyone. If errors climb at 5%, you flip the flag off, and nobody waits on a revert.

This guide follows one flag, new-checkout, through its whole life: checked in code, rolled out a few people at a time, switched off when something breaks, tuned with a payload, tested as an experiment, and removed once it has done its job.

Where to start

New to flags? Start with Feature Flags 101.

Jump to the page for what you are working on:

Every page assumes a PostHog SDK is in your app. Install it yourself, or let the wizard install it for you:

Learn more