Deploying the WP SSR framework means wiring together a Bedrock-structured WordPress backend and a Vite-compiled React SPA that consumes it. Because configuration is fully environment-driven there is no code to change between environments — onlyDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Ahondev/portfolio-v2/llms.txt
Use this file to discover all available pages before exploring further.
.env values. The checklist below covers a complete production setup from an empty server to a running site.
1 — Environment Setup
Copy and fill .env
Copy the example file to Minimum required values for production:See the Environment Variables reference for the full list.
.env in the project root, then fill in every required variable:Generate WordPress salts
Visit roots.io/salts.html and paste the generated block into
.env:2 — Install Dependencies
Install PHP dependencies
Run Composer with production flags to skip dev packages and optimise the autoloader:WordPress core, plugins, and the
wp-ssr mu-plugin are all managed by Composer and will be placed in the correct Bedrock directories automatically per composer.json:3 — Web Server Configuration
Set the document root
Point your web server’s document root to the
web/ directory. All requests must be routed through web/index.php (standard WordPress setup).- Nginx
- Apache
Understand the framework rewrites
The
Static cache files generated during SSG pre-rendering are served from:Ensure your web server user has write permission to this directory.
AppServiceProvider registers two important rewrite rules inside WordPress:| Incoming path | Resolves to | Purpose |
|---|---|---|
/api/v1/* | index.php?rest_route=/api/v1/$matches[1] | Maps clean /api/v1/ URLs to the WP REST API |
/admin | wp-login.php | Provides a clean admin URL |
4 — WordPress Setup
Install WordPress core
Run the standard WP-CLI install command (the Alternatively, visit
wp-cli.yml in the project root pre-configures --path=web/wp):https://example.com/wp/wp-admin/install.php in a browser.Activate required plugins
ACF Pro must be present in
web/app/plugins/ (install it by adding it to composer.json or uploading the zip). Activate it along with any other plugins:Mu-plugins in
web/app/mu-plugins/ (including wp-ssr itself) are loaded automatically by WordPress — they do not need to be activated.5 — Initial Page Sync
Once WordPress is running and all plugins are active, sync the code-defined routes to WordPress pages. BecauseWP_ENV=production disables automatic page registration, this step is required after every fresh deployment or route change:
6 — SSG Pre-Generation
The framework supports pre-rendering pages to static HTML via an external render API. This step is optional but recommended for optimal Time to First Byte on public-facing pages.Ensure WEB_RENDER_TOKEN is set
The render API at
api.ahon.dev authenticates requests with a Bearer token. Confirm it is present in .env: