Skip to main content

Installation

Prerequisites

WP-Next requires a running WordPress database. If you don’t already have WordPress installed, see the Prerequisites section for instructions on running it with Docker.

Initialize Project (Admin Dashboard)

WP-Next provides a CLI tool to initialize the Admin Dashboard.
Run the following command and follow the prompts:

npx @rnaga/wp-next-cli -- initAdmin

Example setup:

✔ Enter your database hostname: · localhost
✔ Enter your database port: · 33306
✔ Enter your database username: · wp
✔ Enter your database password: · **
✔ Enter your database name: · wordpress
✔ Is it a multi-site? · No
✔ Enter your static assets path: · public
✔ Enter your Admin URL: · http://localhost:3000
✔ Enter project path (What is your project named?): · admin

The CLI will automatically install and configure the following:

  • Initialize a Next.js project (App Router enabled)
  • Add Pages and Layouts required for Admin Dashboard
  • Set up configuration files and hooks for Admin Dashboard

Run and Build the Admin Dashboard

To run the Admin Dashboard in development mode (Next.js dev mode):

npm run dev

To build and start the app in production mode:

npm run build
npm run start

For more details on production deployment, see the Next.js deployment guide.