Documentation
The Navwp Onboarding Framework is a drop-in setup wizard for WordPress
themes and plugins. Everything shown in the wizard — its steps, the
required plugins, and demo content — is controlled from a single
config.php file.
Installation
Copy the navwp-framework folder into your theme (e.g. inc/navwp-framework) or plugin, then require its entry file once:
require_once get_template_directory() . '/inc/navwp-framework/navwp.php';
The framework detects on its own whether it's running from a theme or a plugin and builds the correct asset URLs automatically.
File Overview
navwp-framework/
├── navwp.php # Bootstraps the wizard, renders steps, enqueues assets
├── config.php # Steps, plugins and demos configuration
├── assets/
│ ├── navwp-navigator.js # Wizard step navigation + AJAX handlers
│ └── navwp-navigator.css # Wizard styling
├── includes/
│ ├── license.php # License verification AJAX handler
│ ├── plugin-installer.php # Plugin list/install/activate AJAX handlers
│ └── demo-importer.php # Demo content import AJAX handler
├── demos/ # Demo content files (xml/dat/wie/thumbnails)
└── docs/ # This documentation + landing page
Configuring Steps
The wizard ships with four built-in step types. Enable, disable
(skip), rename or reorder them from config.php:
'steps' => [
[ 'id' => 'license', 'label' => 'Account', 'enabled' => true ],
[ 'id' => 'plugins', 'label' => 'Plugins', 'enabled' => true ],
[ 'id' => 'demo', 'label' => 'Demo Import', 'enabled' => true ],
[ 'id' => 'finish', 'label' => 'Finish', 'enabled' => true ],
],
| Key | Description |
|---|---|
id | One of license, plugins, demo, finish. |
label | Text shown under the step number in the stepper header. |
enabled | Set to false to skip/hide the step. Removing the entry has the same effect. |
Example — skip the license step entirely:
'steps' => [
[ 'id' => 'license', 'label' => 'Account', 'enabled' => false ],
[ 'id' => 'plugins', 'label' => 'Plugins', 'enabled' => true ],
[ 'id' => 'demo', 'label' => 'Demo Import', 'enabled' => true ],
[ 'id' => 'finish', 'label' => 'Finish', 'enabled' => true ],
],
Configuring Required Plugins
'plugins' => [
[
'slug' => 'elementor',
'name' => 'Elementor Page Builder',
],
[
'slug' => 'wpforms-lite',
'name' => 'WPForms Lite',
],
],
Each entry needs a wordpress.org plugin slug and a display name. The wizard checks install/activation status automatically before offering to install or activate them.
Configuring Demo Content
'demos' => [
[
'slug' => 'gym',
'name' => 'GYM',
'thumbnail' => NAVWP_DEMO . '/gym/gym.jpg',
'files' => [
'content' => NAVWP_DEMO . '/gym/gym.xml',
'customizer' => NAVWP_DEMO . '/gym/gym.dat',
'widgets' => NAVWP_DEMO . '/gym/gym.wie',
],
'homepage' => 'home-page',
'menus' => [
'primary' => 'Primary',
],
],
],
NAVWP_DEMO points at the demos/ folder inside the framework, so demo files can live there directly.
Exporting the Demo Files
Each demo needs three files. Build them on a reference/staging site
using the plugins below, then drop the exported files into your
demo's folder under demos/<slug>/.
| File | Export with | How to export |
|---|---|---|
content.xml |
Built-in WordPress exporter (Tools → Export) | Go to Tools → Export, choose "All content" (or a specific post type), and click Download Export File. This produces a standard WXR .xml file that WP_Import can read. |
customizer.dat |
Customizer Export/Import | Install and activate the plugin, open Appearance → Customize → Export/Import, then click Export to download the .dat file with all Customizer/theme mod settings. |
widgets.wie |
Widget Importer & Exporter | Install and activate the plugin, go to Tools → Widget Importer/Exporter, and click Export Widgets to download the .wie file. |
Once exported, reference the files from config.php using
NAVWP_DEMO, exactly as shown in the demo config example above.
License Step
includes/license.php ships with a mock check for
demonstration (check_license() only accepts the literal
string valid-license-key). Replace this with a real call
to your licensing/API server before shipping to production.
For real-world license management (generating, validating, and
limiting license keys per site), we recommend
Licfy
— a license management plugin/service you can connect to the
verify_license() AJAX handler in includes/license.php
in place of the mock check.
Troubleshooting
| Symptom | Cause & Fix |
|---|---|
| Fatal error on the plugin activation step | get_plugins() was called before wp-admin/includes/plugin.php was loaded. Already fixed in the current version. |
| Garbled/invalid JSON while installing plugins | Stray PHP notices from the WordPress upgrader corrupted the AJAX response. The installer now buffers output and uses a silent upgrader skin. |
| Assets load on every wp-admin page | Scripts/styles are now enqueued only on the navwp-onboarding admin page. |
