Run on localhost
Step 1 - Requirements:
System Requirements: Node.js 16.14 or later.
Completed step Step 2. Install the WP theme & plugins. and step Step 3. Check Your Permalinks and WPGraphQL Settings
You need to have the environment variables ready and correct - Step 4. Update environment variables. Note, that you need to have the
.env
or.env.local
file by copying the.env.local.example
file available in the root directory of the Ncmaz-faust project.
Step 2 - Try deploying on the localhost:
System Requirements: Node.js 16.14 or later.
Run
npm run dev
to start the development server.Visit
http://localhost:3000
to view your application.Runs
next build
to build the application for production usage.Runs
next start
to start a Next.js production server -http://localhost:3000
Note when developing localhost: npm run dev
In case the WordPress URL is like: http://localhost/your-blog and your Front-end Site URL is http://localhost:3000, the conflict error will also occur, because they have the same localhost origin.
And then this error may occur: "Error - Validation Failed: Your Faust front-end site URL value is misconfigured. It should NOT match the NEXT_PUBLIC_WORDPRESS_URL."
So the solution is to customize one of those two URLs so they are different, you should consider using Atlas and/or Local for your local WordPress. Or simply temporarily remove the Front-end Site URL field in Settings → Faust
(only do this temporarily during localhost development and cannot customize the URLs)
Video try to run dev on the localhost
Last updated