Welcome to the Rentaly Headless WordPress Demo Project! This repo features a HTML template for a fake car rental website called Rentaly. We use OPS to host WordPress locally. For more information on OPS, visit OPS GitHub.
- Install OPS
- Clone this repo and place it in your
~/Sites
folder - Copy the example environment file:
cp .env.example .env
- Navigate to the WordPress directory and copy the local environment file:
cd wordpress cp .env.local.example .env.local
- Create an
auth.json
file under/wordpress
and include your ACF license details:{ "http-basic": { "connect.advancedcustomfields.com": { "username": "{find on keeper}", "password": "{find on keeper}" } } }
- Install dependencies:
npm install composer install
You now have a blank WordPress site! To update the site from Pantheon (production), install Terminus and authenticate your machine: Terminus Installation Guide.
Once authenticated, run:
ops sync-db
You can now sign in using the admin account (details in Keeper).
- Navigate to the Faust directory:
cd faust
- Copy the example environment file:
cp .env.example .env
- Configure environment variables:
NEXT_PUBLIC_WORDPRESS_URL=
: Enter the WordPress instance URL. For local, useheadless-wp.imarc.io
FAUST_SECRET_KEY=
: Find the key in WordPress under Settings -> Faust -> Secret Key (via the Faust plugin)
- Install dependencies:
npm install
- Start the development server:
npm run dev
You should now be able to see the headless WordPress site!
Happy coding! 🚗💨
Feel free to reach out with any questions or issues. Enjoy building with Rentaly!