# Distribution Files

> Generate optimized distribution files for deploying your WordPressify theme.

Source: https://wordpressify.co/distribution-files

> For the complete documentation index, see [llms.txt](https://wordpressify.co/llms.txt).

# Distribution Files

Generate production-ready files for your WordPress theme:

<CodeTabs tabs={[{ label: "npm", code: "npm run export" }, { label: "Docker", code: "docker compose run --rm nodejs npm run prod" }]} />

`npm run export` is a wrapper around the Docker command: the production build always runs inside the Node.js container, so both produce identical output. Use the Docker command directly if Node.js is not installed locally. If the Docker stack was not already running, `npm run export` automatically stops it again when the build finishes.

## What Gets Generated

The `dist/` folder contains your compiled theme:

- **CSS** - Minified with cssnano, autoprefixed.
- **JavaScript** - Transpiled with Babel, minified.
- **Theme files** - Block templates, `theme.json`, and PHP, copied as-is from `src/theme/`.
- **Assets** - Images and fonts from `src/assets/`.
- **Zip archive** - `dist/wordpressify.zip`, ready to upload to WordPress.

## Backups

To back up your local WordPress installation (core files, themes, plugins, and uploads), run:

```bash
npm run export:backup
```

This zips the full `build/` directory into `backups/<date>.zip`. The database is not included, as it lives in a Docker volume. Like `export`, it auto-stops the Docker stack afterwards if it was not already running.

## Deployment

You can upload `wordpressify.zip` manually through the WordPress admin (Appearance > Themes > Add New > Upload Theme), or set up automated deployments with GitHub Actions.

<Card title="Auto Deploy" icon="Rocket" href="/auto-deploy">
  Set up automatic deployment with GitHub Actions via FTP or SSH.
</Card>
