Local setup - agencychief/iip-map GitHub Wiki
- 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
-
Run
lando start
-
Download WordPress core using
lando wp core
or download directly from wordpress.org. -
Copy
wp-config-sample.php
towp-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
- Create yourself a user account
lando wp user create first.last [email protected] --role=administrator
- Log in and clear the permalink cache (Settings > Permalinks > Save Changes)
- Add a new map by going to
/wp-admin/post-new.php?post_type=iip_map_data
- Enter a Screendoor Project ID. This can be either
5561
or5541
. The latter is test data and only contains 2 markers.5561
contains last years data and is suitable for testing. - Follow the tabbed steps, and publish the map.
- In order to view your new map, copy and paste the generated shortcode into a new post/page.