Prerequisites
Before getting started, make sure you have the following in place:
- A live WordPress site with LearnPress installed.
Your WordPress site will act as the data source (backend) for this application. - The LearnPress Add-on for Mobile App plugin installed and activated on your WordPress site.
This plugin exposes the REST API endpoints that this application relies on to fetch courses, users, and other LearnPress data. - Node.js 22 or higher and npm installed on your server or local machine.
Verify your versions:node -v npm -vIf Node.js is not installed, download it from https://nodejs.org (choose the latest LTS version).
Installation
Step 1 — Extract the package
Unzip the wordnext.zip file you received and navigate into the folder:
unzip wordnext.zip cd wordnext
Step 2 — Install dependencies
npm install
This will download all required libraries. It usually takes 1–2 minutes.
Step 3 — Configure environment variables
Create your local environment file from the provided example:
cp .env.example .env.local
Open .env.local and set your WordPress site URL:
WP_API_BASE=https://your-wordpress-site.com
Replace https://your-wordpress-site.com with the actual URL of your WordPress site.
Running the Application
Development mode
npm run dev
Open your browser and go to http://localhost:3000.
Production mode
Build first, then start:
npm run build npm start
Available Commands
| Command | Description |
|---|---|
npm run dev | Start the development server (with hot-reload) |
npm run build | Build the application for production |
npm start | Start the application after building |
npm run typecheck | Check for TypeScript errors |
npm run clean | Remove build artifacts and temporary files |
Updating to a Newer Version
When an update is available, run the following command inside the application folder:
npm update @learnpress/api @learnpress/utils
Then rebuild:
npm run build
