index-dev-env

September 4, 2026 · View on GitHub

Local development environment for CreativeCommons.org (project name: index).

Overview

This repository manages the local development environment for CreativeCommons.org (project name: index). It relies on Docker and requires the component repositories.

Code of conduct

CODE_OF_CONDUCT.md:

The Creative Commons team is committed to fostering a welcoming community. This project and all other Creative Commons open source projects are governed by our Code of Conduct. Please report unacceptable behavior to conduct@creativecommons.org per our reporting guidelines.

Contributing

See CONTRIBUTING.md.

Index components

The CreativeCommons.org website (project name: index) is comprised of five components that are split into two categories:

  1. Static components
  • CC Legal Tools ("licenses")
  • Chooser
  • FAQ
  • Platform Toolkit
  1. Dynamic component
  • WordPress (Vocabulary Theme)

Static component repositories

Component nameComponent repositories
CC Legal Toolscc-legal-tools-app, cc-legal-tools-data
Chooserchooser
FAQfaq
Platform Toolkitmp

Static component URIs

The following URIs and their children/subpaths mustn't be used by WordPress. They are reserved for the static components:

PathComponent name
/cc-legal-toolsCC Legal Tools
/chooseChooser
/chooserChooser
/faqFAQ
/licenceCC Legal Tools
/licencesCC Legal Tools
/licenseCC Legal Tools
/licensesCC Legal Tools
/nsCC Legal Tools
/ns.htmlCC Legal Tools
/platformPlatform Toolkit
/rdfCC Legal Tools
/schema.rdfCC Legal Tools

These URIs are controlled by Apache2 configurations:

Dynamic component repository

Component nameComponent repository
WordPressvocabulary-theme

Dynamic component URIs

WordPress is the default handler for URIs. WordPress handles all URIs except the Static component URIs, listed above.

Docker containers

The docker-compose.yml file defines the following containers:

  1. index-db - Database server for WordPress
  2. index-phpmyadmin - Database administration
  3. index-web - Web server (WordPress and static HTML components)

Setup

  1. Ensure the following repositories are cloned adjacent to this repository:
    PARENT_DIR
    ├── cc-legal-tools-data
    ├── chooser
    ├── dev-index-env
    ├── faq
    └── mp
    
    • [creativecommons/cc-legal-tools-data][gh-data]
    • [creativecommons/chooser][gh-chooser]
    • [creativecommons/faq][gh-faq]
    • [creativecommons/mp][gh-mp]
  2. Create the .env file:
    cp .env.example .env
    
  3. Update .env to set desired values for variables (WP_VERSION, WP_MOD_TYPE, WP_MOD_NAME, etc.)
  4. Build/start Docker:
    docker compose up
    
  5. Wait for build and initialization to complete
  6. Setup WordPress:
    ./setup-wordpress.sh
    
  7. Optional (CC staff only): import production data
    1. Ensure you have access to the production server and your local machine is properly configured to access it
    2. Pull production data
      ./staff_migrate.sh pull
      
    3. Import production data
      ./staff_migrate.sh import
      

Environment URLs

Path labelDev linkStage linkProd link
ChooserDev /chooseStage /chooseProd /choose
FAQDev /faqStage /faqProd /faq
LicensesDev /licensesStage /licensesProd /licenses
Platform ToolkitDev /platform/toolkitStage /platform/toolkitProd /platform/toolkit
Public DomainDev /publicdomainStage /publicdomainProd /publicdomain
WordPressDev / (default)Stage / (default)Prod / (default)
WordPress AdminDev /wp-adminStage /wp-adminProd /wp-admin

Dev configuration

Apache2

See config/web-sites-available/000-default.conf.

WordPress core

NameVersion
WordPress6.3.1

Also see .env.example.

WordPress plugins

NameVersion
Advanced Custom Fields6.2.1
Advanced Custom Fields: Menu Chooser1.1.0
Classic Editor1.6.3
Monster Insights Google Analytics8.19
Redirection5.3.10
Tablepress2.1.7
Wordfence7.10.4
WordPress Importer0.8.1
Yoast SEO21.2

Also see config/composer/composer.json.

WordPress themes

NameVersion
[Vocabulary Theme][gh-vocab-theme]2.9

Also see config/composer/composer.json.

vocabulary-theme QA Checklist

vocabulary-theme release testing QA checklist (click to expand)
  1. run setup-wp script (again to make sure WP is current version)
  2. be sure to clear/disable caches locally
  3. review any new context/template/page
  4. review pages:

Stage and Prod configuration

The staging server and production server are configured via Salt managed in the creativecommons/sre-salt-prime repository. The list below include the specifics (is non-exhaustive):

Copying

CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
button

COPYING: All the content within this repository is dedicated to the public domain under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.