---
description: Build Essential Blocks Pro and package it into a distributable zip via wp dist-archive
---

Build the plugin and package it as a distributable zip using WP-CLI's `dist-archive` command (which reads `.distignore`).

## Steps

1. Run the production build from the plugin root:
   ```bash
   npm run build
   ```
   Stop and report the error if the build fails — do not continue to packaging.

2. From the plugin's **parent directory**, run `wp dist-archive`:
   ```bash
   cd .. && wp dist-archive essential-blocks-pro
   ```
   This produces `essential-blocks-pro.<version>.zip` in the parent directory, respecting `.distignore`.

3. Report the final zip path and its size (`ls -lh essential-blocks-pro.*.zip`).

## Notes

- Run step 1 from the plugin root (`/Users/sumaiyasiddika/Local Sites/essential-blocks/app/public/wp-content/plugins/essential-blocks-pro`).
- Run step 2 from the parent directory (`wp-content/plugins/`).
- Requires WP-CLI with the `dist-archive-command` package (installable via `wp package install wp-cli/dist-archive-command` if missing).
- The zip's top-level folder is `essential-blocks-pro/`, ready to drop into `wp-content/plugins/`.
