Skip to main content

Installation

Step 1: Install Wordpress with Municipio

  1. Create project using the public boilerplate:
    composer create-project municipio/municipio-boilerplate-headless cms.example.com
  2. Add our package repository to composer.json:
    {
    "repositories": [
    {
    "type": "composer",
    "url": "https://composer.whitespace.house/"
    }
    ]
    }
  3. Mark ACF Pro as an MU plugin in composer.json:
    {
    "extra": {
    "installer-paths": {
    "wp-content/mu-plugins/{$name}/": [
    "wordpress-premium/advanced-custom-fields-pro"
    ]
    }
    }
    }
  4. Install ACF Pro:
    composer require wordpress-premium/advanced-custom-fields-pro:~5.10.0
  5. Create your Municipio config files using the /config/*-example.php files as templates. Especially update the database info.
  6. Create the database:
    wp db create
  7. Download "database dump" and import it:
    wp db import municipio_boilerplate.sql
  8. Replace URLs in the database:
    wp search-replace 'cms.municipio-boilerplate.test' 'cms.example.test'
  9. Set admin password:
    wp user update admin --user_pass='newpassword'
  10. Configure Valet:
    valet link --secure cms.example
  11. Go to https://cms.example.test/wp-admin/ and log in

Step 2: Install Gatsby

  1. Install Gatsby for Municipio using the instructions for Municipio’s gatsby-starter-basic.
  2. Update your settings in .env.toml and optionally create .env.local.toml to set any local overrides.
  3. Update site meta data in gatsby-config.js
  4. Run yarn dev and go to http://localhost:8000