Quick Start
Know what you're doing and using a Unix-like system? Make sure you have all the prerequisites in place, then follow the base install instructions below, and create your plugin or theme.
If you need more detailed instructions or if you're using Windows, we have in-depth explanations on setting up your local environment, base WordPress installation and plugins/themes.
Base Install With Valet
Prerequisites
- macOs
- Valet
- PHP >= 8.1 (CLI and server)
- WP CLI
- Node.js 18.x lts/hydrogen
- cURL/Wget
- Composer ^2
- Bash
- Forme Codegen ^2.1
Steps
Set up a new MySQL database and make a note of the credentials
Change to your sites directory. For example:
bash
cd ~/sites
- Install and configure a new WordPress site directory (you'll be prompted for the database credentials):
bash
forme base new hello-world
- Change into this new site directory:
bash
cd hello-world
- Add the Valet driver if you haven't already:
bash
cp utils/FormeServerValetDriver.php ~/.config/valet/Drivers/FormeServerValetDriver.php
- Enable HTTPS:
bash
valet secure
- Visit the site e.g.
https://hello-world.test
in your browser and set up the admin user
Base Install With Docker
Prerequisites
- macOS/Linux
- Docker & docker-compose - you can get both of these by installing Docker Desktop
- PHP >= 8.1 (CLI)
- WP CLI
- Node.js 18.x lts/hydrogen
- cURL/Wget
- Composer ^2
- Bash
- Forme Codegen ^2.1
Steps
- Change to your sites directory. For example:
bash
cd ~/sites
- Install and configure a new WordPress site directory:
bash
forme base new hello-world
- Change into this new site directory:
bash
cd hello-world
- Initialise Docker configuration:
bash
forme ketch init
- Launch Docker:
bash
forme ketch up
- Visit the site at
http://localhost
in your browser and set up the admin user
New Plugin / Theme
Prerequisites
- macOS/Linux
- PHP >= 8.1 (CLI)
- Forme Codegen ^2.1
- Node 18.x lts/hydrogen
- Git
- Composer ^2
- Bash
- Git Cliff (optional)
Steps
- Change to your repos directory. For example:
bash
cd ~/repos`
- Create a new plugin or theme:
bash
# plugin
forme new plugin hello-world
# theme
forme new theme hello-world
- Change to the base WordPress installation directory:
bash
cd ~/sites/hello-world
- Symlink the repo directory into your base WordPress site installation or link it to your Docker:
bash
# base installation e.g. valet
forme base link ~/repos/hello-world-plugin/
# docker
forme ketch link ~/repos/hello-world-theme/
# you might also need to restart container if it's running
forme ketch restart
- Update PHP dependencies:
bash
composer update