This guide will teach you how to use [create-woo-extension](https://www.npmjs.com/package/@woocommerce/create-woo-extension) to scaffold a WooCommerce extension. There are various benefits to using create-woo-extension over manually creating one from scratch, including:
Once your extension is set up, we'll show you how to instantly spin up a development environment using [wp-env](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/).
-`composer.json` - contains a list of your PHP dependencies which is referenced by Composer.
-`composer.lock` - this file allows you to control when and how to update these dependencies
-`includes` - The primary purpose of an "includes" folder in PHP development is to store reusable code or files that need to be included or required in multiple parts of a project. This is a PHP developer convention.
-`languages` - contains POT files that are used to localize your plugin.
-`node-modules` - help you form the building blocks of your application and write more structured code
-`package.json` - is considered the heart of a Node project. It records metadata, and installs functional dependencies, runs scripts, and defines the entry point of your application.
-`README.md` - An introduction and instructional overview of your application. Any special instructions, updates from the author, and details about the application can be written in text here.
-`src` - keeps the root directory clean and provides a clear separation between the source code and other assets
-`tests` - can hold unit tests for your application, keeps them separate from source files
-`vendor` - holds project dependencies, and 3rd party code that you did not write
-`webpack.config.js` - webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser
We recommend using `wp-env` to spin up local development environments. You can [learn more about wp-env here](https://make.wordpress.org/core/2020/03/03/wp-env-simple-local-environments-for-wordpress/). If you don't already have wp-env installed locally, you can install it using
Once you've installed `wp-env`, and while still inside your `my-extension-name` folder, run `wp-env` start. After a few seconds, a test WordPress site with your WooCommerce and your extension installed will be running on `localhost:8888`.
If you didn't set a custom name for your extension, you can visit [here](http://localhost:8888/wp-admin/admin.php?page=wc-admin&path=%2Fmy-extension-name) to see the settings page generated by /src/index.js. The default username/password combination for `wp-env` is `admin` / `password`.
[Check out wp-env's command reference to learn more about advanced functionality](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/#command-reference)