Local setup - agencychief/iip-map GitHub Wiki

  1. Create a new directory and copy the following into a .lando.yml file.
name: yali 
recipe: wordpress
config:
  webroot: .
  php: '7.2'
  database: mysql:5.7
services:
  pma:
    type: phpmyadmin
    hosts:
      - database
      - database2
  database:
    type: mysql:5.7
  database2:
    type: mysql:5.7
  node:
    type: node:6.12
tooling:
  core:
    service: appserver
    description: Downloads WordPress core
    cmd: wp core download
events:
  post-set:
    - echo "Created a wp-config file. Now you may import the db using 'lando db-import <filename>'."
  post-db-import:
    - appserver: cd $LANDO_WEBROOT && wp rewrite flush
  1. Run lando start

  2. Download WordPress core using lando wp core or download directly from wordpress.org.

  3. Copy wp-config-sample.php to wp-config.php. The connection details are as follows:

/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress' );

/** MySQL database username */
define( 'DB_USER', 'wordpress' );

/** MySQL database password */
define( 'DB_PASSWORD', 'wordpress' );

/** MySQL hostname */
define( 'DB_HOST', 'database' );

/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8mb4' );

5. Clone this repo into wp-content/plugins

6a. If using Migrate DB, add the following find/replace row:

Find: //chief-yalimap.clientapp.com  Replace: //yali.lndo.site

6b. Or, if you are using the command line to export the database, run the following command after importing to your local.

lando wp search-replace "chief-yalimap.clientapp.com" "yali.lndo.site" --url=yali.lndo.site
  1. Create yourself a user account
lando wp user create first.last [email protected] --role=administrator
  1. Log in and clear the permalink cache (Settings > Permalinks > Save Changes)

Creating new/test maps

  1. Add a new map by going to /wp-admin/post-new.php?post_type=iip_map_data
  2. Enter a Screendoor Project ID. This can be either 5561 or 5541. The latter is test data and only contains 2 markers. 5561 contains last years data and is suitable for testing.
  3. Follow the tabbed steps, and publish the map.
  4. In order to view your new map, copy and paste the generated shortcode into a new post/page.
⚠️ **GitHub.com Fallback** ⚠️