
Overview
When you make changes in the Drupal admin interface (adding fields, configuring content types, etc.), those changes are stored in the database. To deploy these changes to other environments or share them with your team, you need to export them as YAML files.
Prerequisites
- Docker container running with Drupal installed
- Drush installed in the container
- Git repository initialized
Steps
Make the desired in Drupal UI
The quickest way to apply changes is to use the admin UI:
- Log in to your Drupal site:
http://localhost:8081/user/login
- Navigate to the relevant admin section (e.g., Structure → Taxonomy → Manage fields)
- Make your desired changes:
- Add new fields
- Configure content types
- Update display settings
- Modify permissions
- etc.
- Save your changes
Export Configuration
Enter the container
# Enter the container
docker exec -it web bash
Navigate to Drupal root
cd /opt/web
# Export all configuration
../vendor/bin/drush config:export -y
# Exit the container
exit
Commit your changes
# Stage all config changes
git add config/sync/
# Commit with descriptive message
git commit -m "Add Active field to example taxonomy"
# Push to repository
git push