Deployment
Deploy WooNuxt to Netlify, Vercel, or any static host
WooNuxt supports three output modes. Choose the one that fits your hosting and catalog size.
Output Modes
| Mode | Command | Best For |
|---|---|---|
| Static (SSG) | nuxt generate | Small–medium catalogs, cheapest hosting |
| Server (SSR) | nuxt build | Large catalogs, always-fresh data |
| Hybrid (ISR) | nuxt build + ISR routes | Large catalogs with caching |
Netlify
Static Generation (Recommended)
- Connect your GitHub repo in the Netlify dashboard
- Set Build command:
npm run generate - Set Publish directory:
.output/public - Add environment variables (see below)
Build Hook (Trigger Rebuild from WordPress)
When content changes in WooCommerce (new products, price updates), you can trigger a rebuild automatically:
- In Netlify: Site settings > Build & deploy > Build hooks → create a hook
- Copy the hook URL
- In WordPress: Settings > WooNuxt > Build Hook → paste the URL
- Click Trigger Rebuild to test
The rebuild button appears in the WooNuxt Settings admin page only when a Build Hook URL is configured.
Vercel
- Import your GitHub repo in the Vercel dashboard
- Framework preset: Nuxt.js (auto-detected)
- Build command:
npm run generate(SSG) ornpm run build(SSR) - Add environment variables
Build Hook for Vercel
- In Vercel: Project > Settings > Git > Deploy Hooks → create a hook
- Copy the URL and paste it into Settings > WooNuxt > Build Hook in WordPress
Required Environment Variables
Set these in your hosting provider's environment variables panel:
# Required
GQL_HOST=https://yourwordpress.com/graphql
NUXT_IMAGE_DOMAINS=yourwordpress.com,cdn.yourwordpress.com
# Optional — overrides WooNuxt Settings plugin values
NUXT_PUBLIC_PRODUCTS_PER_PAGE=24
NUXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_...
PRIMARY_COLOR=#7F54B2
# Optional — ISR cache lifetime (SSR/hybrid mode only)
CATALOG_ISR_TTL=3600
⚠
Never commit your .env file. All secrets should be set via your hosting provider's environment variables UI.
SSL for Local Development
If you need HTTPS locally (Stripe, PWA, OAuth providers):
# Install mkcert
brew install mkcert
mkcert -install
# Generate local certificate
mkcert localhost
# Run dev server with SSL
npm run dev:ssl
The dev:ssl script is pre-configured in package.json.