Skip to main content

Overview

This quickstart will get you from zero to a working WooCommerce development environment with your first customization in under 10 minutes.
This guide assumes you have basic familiarity with Git, command line, and either PHP or JavaScript development.

Prerequisites

Before you begin, ensure you have:
1

Node.js (via NVM)

Install Node Version Manager to manage Node.js versions:
2

PNPM

Install PNPM package manager globally:
3

PHP 7.4+ and Composer

Install PHP and Composer for your operating system:

Get Started in Three Steps

Step 1: Clone and Install

Clone the WooCommerce repository and install dependencies:
The pnpm install command installs dependencies for all packages in the monorepo. The pnpm build command compiles TypeScript, bundles JavaScript, and prepares all packages for development.

Step 2: Start WordPress Environment

Start a local WordPress development environment with WooCommerce:
First start will take 5-10 minutes as Docker downloads WordPress and sets up the database. Subsequent starts are much faster.
Once started, access your development site:

Step 3: Make Your First Change

Let’s add a custom message to the WooCommerce product page:
1

Create a custom plugin

Create a new file plugins/woocommerce/.wordpress-org/local-plugins/wc-quickstart.php:
2

Activate the plugin

Visit http://localhost:8888/wp-admin/plugins.php and activate “WooCommerce Quickstart”.
3

View your change

Visit any product page at http://localhost:8888/shop/ and see your custom message appear below the product title!
Congratulations! You’ve just created your first WooCommerce customization using action hooks.

What You Just Did

Let’s break down the hook you used:
  • add_action(): Hooks your function into a specific WooCommerce action
  • woocommerce_single_product_summary: The hook that fires on product pages
  • Function: Your custom code to execute
  • 6: Priority (controls when your code runs relative to other hooked functions)
WooCommerce has hundreds of hooks like this that let you customize every aspect of the store without modifying core code.

Next Steps

Now that you have a working environment, here’s what to explore next:

Learn About Hooks

Master WooCommerce’s extensive hook system

Build an Extension

Create a complete WooCommerce extension

Explore the REST API

Integrate with products, orders, and customers

Theme Development

Customize the storefront appearance

Common Development Tasks

Running Tests

Building Assets

Working with wp-env

Troubleshooting

Another application is using port 8888. Stop it or configure wp-env to use different ports by editing .wp-env.json in plugins/woocommerce/.
wp-env requires Docker. Install Docker Desktop and ensure it’s running before starting wp-env.
Try cleaning and reinstalling:
Make sure you have all required PHP extensions:
If any are missing, install them via your package manager.

Learn More

Development Environment

Detailed environment setup guide

Project Structure

Understanding the monorepo

Architecture

Learn WooCommerce architecture

Get Help

Stuck? Here’s where to get help: