Overview
This guide will help you set up a complete development environment for working with the WooCommerce monorepo. Whether you’re building extensions, themes, or contributing to core, you’ll need these tools installed.Prerequisites
Operating System
A POSIX-compliant operating system (Linux or macOS) is recommended. Windows users should use WSL (Windows Subsystem for Linux) available since Windows 10.
Required Tools
1
Node Version Manager (NVM)
NVM ensures you’re using the correct Node.js version for WooCommerce development.Installation:Verify installation:
The WooCommerce repository contains an
.nvmrc file that specifies the required Node.js version.2
PNPM Package Manager
PNPM is used to manage dependencies and run scripts in the monorepo.Installation:Verify installation:
3
PHP 7.4 or Higher
WooCommerce requires PHP 7.4+ for development and runtime.Check existing PHP:Installation (Ubuntu/Debian):Installation (macOS with Homebrew):
4
Composer Dependency Manager
Composer manages PHP dependencies for WooCommerce and its packages.Installation:Verify installation:
Clone the Repository
Once all prerequisites are installed, clone the WooCommerce monorepo:Install Dependencies
1
Set Node.js version
Use the version specified in This will install and activate the correct Node.js version.
.nvmrc:2
Install all dependencies
Install PHP and JavaScript dependencies for all packages:
This command installs dependencies for all plugins, packages, and tools in the monorepo. It may take a few minutes.
3
Build all packages
Build all plugins, packages, and tools:This compiles TypeScript, bundles JavaScript, and prepares all packages for development.
WordPress Development Environment
For plugin development and testing, you’ll need a WordPress installation. WooCommerce uses@wordpress/env for local WordPress environments.
Setting Up wp-env
1
Navigate to the plugin directory
2
Start the environment
First start may take several minutes as Docker images are downloaded.
3
Access your development site
After starting, your site will be available at:
- Site URL: http://localhost:8888
- Admin URL: http://localhost:8888/wp-admin
- Username: admin
- Password: password
wp-env Commands
IDE Setup
Recommended IDEs
- Visual Studio Code: Popular, with excellent PHP and JavaScript support
- PHPStorm: Professional PHP IDE with deep WordPress integration
- Cursor: AI-powered editor based on VS Code
VS Code Extensions
Recommended extensions for WooCommerce development:EditorConfig
The repository includes an.editorconfig file that enforces consistent coding styles:
Environment Verification
Verify your setup is complete:Verification Checklist
Verification Checklist
Troubleshooting
PHP Extensions Missing
If you see errors about missing PHP extensions:- Ubuntu/Debian
- macOS
PNPM Install Fails
Ifpnpm install fails:
Docker Issues with wp-env
If wp-env won’t start:Port Conflicts
If port 8888 is already in use:Next Steps
With your environment set up, you’re ready to start developing:Project Structure
Learn about the monorepo organization
Extension Development
Start building extensions
Contributing
Contribute to WooCommerce core
Testing
Learn about testing requirements