Prerequisites: Having a running install of Laravel Valet and the WordPress command-line interface wp
.
cd
to the directory where you have chosen to keep your valet sites.
valet paths
; the appropriate directory will not be the one with /.valet/
in its path.mkdir ~/sites/
will create a folder named sites
in your user's home directory. Then, run cd ~/sites/
to go there, and valet park
to register this directory with Valet so that all subdirectories will be served as .test
domains.git clone git@github.com:INN/umbrella-borderzine
git submodule update --init --recursive
cd umbrella-borderzine
wp core download
wp config create --dbname=example --dbuser=<user> --dbpass=<pass>
, where <user>
and <pass>
are the database username and password for your computer.wp db create
wp-config.php
. The best way to do that is
wp core install
wp core multisite-convert --subdomains --base=borderzine.test --title=foo
borderzine.test
is the domain created by Valet for this directory--title=foo
must be passed but is unimportant and will be reset when you load the database.wp db reset
wp db import database.sql
, replacing database.sql
with the path to the database you downloaded
ERROR 2006 (HY000) at line 488: MySQL server has gone away
or your mysql error log contains [Note] Aborted connection 10 to db: 'example' user: 'user' host: 'localhost' (Got a packet bigger than 'max_allowed_packet' bytes)
, this StackOverflow solution worked for Ben on 2018-08-22.
ps auxww | grep mysqld
and looking for a string like --log-error=/usr/local/var/mysql/example.local.err
wp search-replace borderzine.com borderzine.test --url=borderzine.com --all-tables-with-prefix
borderzine.com
with subdomain.org
and borderzine.test
with subdomain.borderzine.test
, and changing the --url=
parameter to match the valet domain that you just set everything to in the preceding search-replace:
wp search-replace subdomain.org subdomain.borderzine.com --url=borderzine.test --all-tables-with-prefix
wp search-replace subdomain.borderzine.com subdomain.borderzine.com --url=borderzine.test --all-tables-with-prefix
wp_blogs
table.valet secure
to serve this site locally over HTTPS using a self-signed certificate. For more about this command, see the Laravel Valet docs.package.json
, run npm install