Skip to content

Commit a43fe7e

Browse files
committed
Add the local environment for local dev, setup script
1 parent 7d25d83 commit a43fe7e

File tree

4 files changed

+175
-2
lines changed

4 files changed

+175
-2
lines changed

.lando.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: bea-content-sync-fusion
2+
recipe: wordpress
3+
config:
4+
webroot: ./wordpress/
5+
services:
6+
appserver:
7+
run_as_root:
8+
- ln -s /app/ /app/wordpress/wp-content/plugins/bea-content-sync-fusion
9+
events:
10+
# Runs composer install and a custom php script after your app starts
11+
post-start:
12+
- appserver: cd $LANDO_MOUNT && composer install
13+
tooling:
14+
setup:
15+
service: appserver
16+
description: 'Setup env'
17+
cmd:
18+
- wp db reset --yes
19+
- rm -f /app/wordpress/wp-config.php
20+
- wp config create --dbname=wordpress --dbuser=wordpress --dbpass=wordpress --dbhost=database --path=/app/wordpress
21+
- wp core multisite-install --url=https://bea-content-sync-fusion.lndo.site --title="Content sync fusion" --admin_password=admin [email protected] --path=wordpress --skip-email
22+
- wp plugin install --activate-network query-monitor
23+
- wp plugin activate --network bea-content-sync-fusion
24+
- wp site create --slug=site-1 --title="Site 1"
25+
- wp site create --slug=site-2 --title="Site 2"
26+
- wp site create --slug=site-3 --title="Site 3"
27+
- wp site create --slug=site-4 --title="Site 4"
28+
- cp /app/tests/bin/htaccess /app/wordpress/.htaccess

composer.lock

+130-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/bin/htaccess

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# BEGIN WordPress
2+
RewriteEngine On
3+
RewriteBase /
4+
RewriteRule ^index.php$ - [L]
5+
6+
# add a trailing slash to /wp-admin
7+
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
8+
9+
RewriteCond %{REQUEST_FILENAME} -f [OR]
10+
RewriteCond %{REQUEST_FILENAME} -d
11+
RewriteRule ^ - [L]
12+
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
13+
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
14+
RewriteRule . index.php [L]
15+
# END WordPress

wp-cli.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
url: https://bea-content-sync-fusion.lndo.site
2+
path: /app/wordpress

0 commit comments

Comments
 (0)