Installation
Step 1: Install Wordpress with Municipio
- Create project using the public boilerplate:
composer create-project municipio/municipio-boilerplate-headless cms.example.com - Add our package repository to composer.json:
{
"repositories": [
{
"type": "composer",
"url": "https://composer.whitespace.house/"
}
]
} - Mark ACF Pro as an MU plugin in composer.json:
{
"extra": {
"installer-paths": {
"wp-content/mu-plugins/{$name}/": [
"wordpress-premium/advanced-custom-fields-pro"
]
}
}
} - Install ACF Pro:
composer require wordpress-premium/advanced-custom-fields-pro:~5.10.0 - Create your Municipio config files using the
/config/*-example.phpfiles as templates. Especially update the database info. - Create the database:
wp db create - Download "database dump" and import it:
wp db import municipio_boilerplate.sql - Replace URLs in the database:
wp search-replace 'cms.municipio-boilerplate.test' 'cms.example.test' - Set admin password:
wp user update admin --user_pass='newpassword' - Configure Valet:
valet link --secure cms.example - Go to https://cms.example.test/wp-admin/ and log in
Step 2: Install Gatsby
- Install Gatsby for Municipio using the instructions for Municipio’s gatsby-starter-basic.
- Update your settings in
.env.tomland optionally create.env.local.tomlto set any local overrides. - Update site meta data in
gatsby-config.js - Run
yarn devand go tohttp://localhost:8000