Requirements

  • php 8.3
  • composer
  • mysql
  • wp-cli

Preparation

Activate the php-mysql extension by uncommenting it in php.ini.

Install the wp-cli dotenv plugin:

wp package install aaemnnosttv/wp-cli-dotenv-command:^2.0

Create a new project from the bedrock template:

composer create-project roots/bedrock

Initialize the .env file:

wp dotenv init --template=.env.example --with-seeds

Now edit the .env file, add database info and basic site info like WP_HOME.

Next, create a database and user and grant privileges:

create user user@localhost identified by 'password';
create database db;
grant all privileges on db to user@localhost;

Go to the folder web/app/themes and install the Sage theme, then also install Acorn:

composer create-project roots/sage mytheme
composer require roots/acorn

Install the theme dependencies and build the assets:

yarn
yarn build

Edit the file bud.config.js and update the local url to localhost:8080

Installation

Start the built-in php webserver from inside the web directory:

php -S localhost:8080

Go open http://localhost:8080 in your browser and install Wordpress.

Now activate the Sage theme in the UI, then finish the acorn configuration by running this in the folder of your theme:

wp acorn acorn:install