A local AI-powered WordPress site generator. Describe a business, get a fully structured 4-page WordPress site with Gutenberg-compatible block markup, published directly to a LocalWP instance — no cloud services, no API costs.
- You type a business description (e.g. "perth plumber")
- The app sends a prompt to a local Ollama LLM (Mistral)
- The LLM returns structured JSON content for 4 pages: Home, Services, About, Contact
- The content is converted to Gutenberg block HTML
- Optionally, the pages are pushed directly to a LocalWP WordPress site via the REST API
- Node.js v18+
- Ollama running locally with the Mistral model
- LocalWP (optional, for publishing to WordPress)
- WP-CLI (optional, required if the app needs to run
wpcommands)
WP-CLI has limited Windows support — the official docs note it's primarily built for Linux/macOS environments. Some commands may not work as expected natively on Windows.
If you see 'wp' is not recognized as an internal or external command, the recommended approach is to use LocalWP's built-in site shell, which bundles its own WP-CLI and PHP in a Linux-like environment:
- In LocalWP, right-click your site → Open Site Shell
- Run
wpcommands from there
This is the most reliable option on Windows. Native global installation is possible but not officially supported and may have edge cases:
- Download
wp-cli.pharfrom https://wp-cli.org - Make sure PHP is on your PATH
- Create a
wp.batwrapper (e.g.C:\tools\wp.bat):@ECHO OFF php "C:\tools\wp-cli.phar" %*
If you run into issues with WP-CLI on Windows, consider using WSL (Windows Subsystem for Linux) as an alternative.
Download Ollama from https://ollama.com, then:
ollama pull mistralKeep Ollama running in the background while using the app.
cd wp-ai-builder
npm installCopy the example env file:
cp .env.local.example .env.localIf you're only generating content (not publishing), you can leave .env.local as-is.
To enable publishing to LocalWP, see the LocalWP setup section below.
npm run devOpen http://localhost:3000 in your browser.
- Type a business description in the input field, e.g.
perth electrician - Click "Generate Site"
- Wait for the LLM to respond — this takes 15–60 seconds depending on your hardware
- Review the generated Gutenberg HTML for each page
- Click "Publish to LocalWP" to push the pages directly to your local WordPress site
Download LocalWP from https://localwp.com and create a new WordPress site. Note the local URL shown in the app (e.g. http://mysite.local).
- Open WP Admin for your LocalWP site
- Go to Users → Your Profile
- Scroll to "Application Passwords"
- Enter a name (e.g.
wp-ai-builder) and click "Add New" - Copy the generated password
WP_URL=http://mysite.local
WP_USER=admin
WP_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxxRestart the dev server after saving. The "Publish to LocalWP" button will now push all four pages to your WordPress site. Re-running will update existing pages rather than create duplicates.
npm testTests validate that the renderer produces correct Gutenberg block structure for all page types.
wp-ai-builder/
├── app/
│ ├── page.js # Main UI
│ ├── layout.js
│ └── api/
│ ├── generate/route.js # LLM generation pipeline
│ └── publish/route.js # WordPress publish endpoint
├── lib/
│ ├── prompt.js # Builds the LLM prompt
│ ├── llm.js # Ollama API client
│ ├── renderer.js # JSON → Gutenberg HTML
│ └── wordpress.js # WP REST API client
├── tests/
│ └── renderer.test.js
└── .env.local.example