Skip to main content
Get started with the Wagtail Bakery Demo in just a few minutes. This guide will help you quickly set up a running instance and explore Wagtail’s features.
The Wagtail Bakery Demo is designed as a learning tool and reference implementation. It’s not intended to be used as a starting point for your own site—instead, use wagtail start for new projects.

Quick Start with Gitpod

The fastest way to try the Wagtail Bakery Demo is through Gitpod, which provides a complete development environment in your browser.
1

Launch Gitpod

Click the button below to open the project in Gitpod (requires a GitHub account):Open in GitpodGitpod will automatically:
  • Set up the Python environment
  • Install all dependencies
  • Create and migrate the database
  • Load demo content
  • Start the development server
2

Access the Demo Site

Once Gitpod has fully started, a preview of the bakery website will appear in the “Simple Browser” panel. Click the arrow button to the right of the URL bar to open the website in a new tab.The site will be running at a URL like: https://8080-yourworkspace.gitpod.io
3

Login to the Admin

Navigate to /admin/ on your Gitpod URL and log in with:
Username: admin
Password: changeme

Quick Start with Docker

If you prefer to run locally, Docker is the fastest method.
1

Clone the Repository

git clone https://github.com/wagtail/bakerydemo.git --config core.autocrlf=input
cd bakerydemo
The --config core.autocrlf=input flag ensures proper line endings across different operating systems.
2

Build and Start Services

docker compose up --build -d
This command will:
  • Build the Docker image
  • Start PostgreSQL database
  • Start Redis cache
  • Start the Django application
3

Set Up the Database

Wait 10 seconds for the database to be ready, then run:
docker compose run app /venv/bin/python manage.py migrate
docker compose run app /venv/bin/python manage.py load_initial_data
If you get a database error, wait another 10 seconds and try again. The PostgreSQL container needs time to initialize.
The load_initial_data command will:
  • Copy media files (images) to the configured storage
  • Load all demo content from fixtures
  • Create sample pages, blog posts, breads, and locations
  • Update the search index
4

Start the Server

docker compose up
The demo site will be available at:Login with: admin / changeme

Docker Commands Reference

# Tail logs from all containers
docker compose logs -f

# View logs from specific service
docker compose logs -f app

Exploring the Demo

Once you have the demo running, here’s what to explore:

Admin Interface

Navigate to /admin/ to explore Wagtail’s editorial interface. Try creating, editing, and publishing pages.

Content Types

Explore the different content types:
  • Blog posts with rich text and images
  • Bread pages with ingredients and recipes
  • Location pages with operating hours
  • Gallery pages

Wagtail Features

Test out features like:
  • StreamField for flexible page layouts
  • Image management and focal points
  • Page tree organization
  • Workflow and moderation

API Endpoints

The demo includes Wagtail’s API:
  • /api/v2/pages/ - Pages API
  • /api/v2/images/ - Images API
  • /api/v2/documents/ - Documents API

Demo Users

The demo includes several users with different roles for testing permissions:
UsernamePasswordRoleSuperuser
adminchangemeFull accessYes
editorchangemeCan edit contentNo
moderatorchangemeCan approve contentNo
germanchangemeGerman localeYes
arabicchangemeArabic localeYes
inactivechangemeInactive userYes
Try logging in with different users to see how Wagtail’s permission system works.

What’s Included

The Bakery Demo showcases:
  • Multiple Apps: Organized project structure with separate apps for blog, breads, locations, and recipes
  • Custom Models: Examples of content types with custom fields and behaviors
  • StreamField: Flexible content blocks for rich page layouts
  • Snippets: Reusable content like bread categories, countries, and ingredients
  • Relationships: Many-to-many relationships via the ingredients feature
  • Wagtail Hooks: Customizations to the admin interface
  • Search: Database-powered search implementation
  • Forms: Contact forms with form builder
  • API: REST API endpoints for headless CMS usage

Next Steps

1

Explore the Code

The demo is designed for developers to read and learn from. Check out:
  • bakerydemo/base/models.py - Base page models and mixins
  • bakerydemo/blog/models.py - Blog implementation
  • bakerydemo/breads/models.py - Custom content with relationships
  • bakerydemo/base/wagtail_hooks.py - Admin customizations
2

Read the Installation Guide

For detailed setup instructions including Vagrant and venv methods, see the Installation Guide.
3

Create Your Own Site

Ready to build your own Wagtail site? Use the official starter:
pip install wagtail
wagtail start mysite
See the Wagtail Getting Started docs for more information.
The Docker configuration (docker-compose.yml) is for local development only and is not suitable for production use.

Build docs developers (and LLMs) love