Root Files
Configuration Files
Build Configuration
Environment Configuration
Dependency Management
Documentation Files
Plugin Files
Key Directories
/packages/
Source code of WordPress packages. Each package can be:
- Production packages: Shipped as WordPress scripts (e.g.,
wp-components,wp-editor) - Development tools: Available on npm (e.g.,
@wordpress/scripts,@wordpress/env)
/lib/
PHP source code of the Gutenberg plugin.
lib/compat/wordpress-X.Y/.
/phpunit/
Unit tests for PHP code:
/test/
JavaScript and end-to-end tests:
/docs/
Project documentation:
/bin/
Scripts and tools:
/platform-docs/
Documentation for non-WordPress developers using Gutenberg:
- Deployed at: https://wordpress.org/gutenberg-framework/
/storybook/
Configuration for Gutenberg Storybook.
/.github/
GitHub-specific configuration:
/tools/
Build and development tools:
Key Directories Reference
Quick reference for common development tasks:| Task | Directory |
|---|---|
| JavaScript packages | /packages/ |
| PHP code | /lib/ |
| PHP tests | /phpunit/ |
| JavaScript tests | /packages/{name}/src/**/*.test.js |
| E2E tests | /test/e2e/ |
| Documentation | /docs/ |
| Build scripts | /bin/ |
| Configuration | Root directory |
Package Organization
Production Packages
Loaded as WordPress scripts (wp-* handles):
@wordpress/block-editor- Generic block editor (WordPress-agnostic)@wordpress/editor- WordPress post-type-aware editor@wordpress/edit-post- Full post editor screen@wordpress/edit-site- Full site editor screen@wordpress/components- Reusable UI components@wordpress/data- State management
Development Packages
Available as npm packages:@wordpress/scripts- Build and development scripts@wordpress/env- Local WordPress environment@wordpress/eslint-plugin- ESLint configuration@wordpress/prettier-config- Prettier configuration
Block Library Structure
Blocks follow a specific file structure:Style Files
style.scss- Loads on both frontend and in editoreditor.scss- Loads only in editor
Next Steps
- Review Coding Guidelines for file organization conventions
- Check Architectural Decisions to understand package layering
- See Development Workflow for making changes