Skip to main content

Configurations

WP-Next Admin Dashboard provides multiple configuration options to customize your setup.

.env​

When you initialize a project using the CLI (initAdmin), it automatically generates a .env (or .env.local) file with the following configuration keys:

WP_DB_HOST=localhost
WP_DB_USER=**
WP_DB_PASSWORD=**
WP_DB_NAME=wordpress
WP_DB_PORT=3306
WPAUTH_BASE_PATH=/admin
NEXTAUTH_SECRET=**

UPLOAD_PATH=uploads
WPADMIN_ENV=default
BASE_URL=http://localhost:3000

The values above may differ depending on the answers you provided during the initialization prompts.

Enable Email Sending​

Email is used for features like password resets and new account sign-ups.

WP-Next uses Nodemailer for email delivery and currently supports Gmail.

To enable email sending, follow the Nodemailer Gmail setup guide, then add the following to your .env file:

ENABLE_GMAIL=true # set to false to disable email sending
GMAIL_USER=***
GMAIL_PASSWORD=***

Login with External Providers​

WP-Next uses NextAuth.js for login (authentication). By default, it supports login with credentials stored in the WordPress database.

Additionally, WP-Next supports these external providers:

To enable them, add the corresponding OAuth credentials to your .env file:

GOOGLE_CLIENT_ID=**
GOOGLE_CLIENT_SECRET=**

GITHUB_CLIENT_ID=**
GITHUB_SECRET=**

WORDPRESS_CLIENT_ID=**
WORDPRESS_CLIENT_SECRET=**

wp.json​

The initAdmin CLI command is a wrapper around the WP-Node initialization command.

npx @rnaga/wp-node-cli -- init

which creates a wp.json file inside the _wp folder.

Here's an example wp.json generated during initialization:

{
"staticAssetsPath": "public",
"multisite": {
"enabled": true,
"defaultBlogId": 1,
"defaultSiteId": 1
}
}
  • staticAssetsPath: The root path for static files. It's recommended to leave this set to "public". See: Next.js public folder documentation
  • multisite.enabled: Whether the app should run in multisite mode.
  • multisite.defaultBlogId / multisite.defaultSiteId: Default blog and site IDs used when running in multisite mode.

Custom Post Types, Post Status, and Taxonomy​

For advanced configuration, see the WP-Node documentation: