Closed bjuppa closed 8 years ago
The most successful way so far is to install wordpress from zip file in the public/
directory:
curl -sS https://wordpress.org/wordpress-4.6.1.tar.gz | tar --strip-components=1 -xvz -C public
That can be run in a deploy script or in composer.json
like so:
"scripts": {
"post-install-cmd": ["curl -sS https://wordpress.org/wordpress-4.6.1.tar.gz | tar --strip-components=1 -xvz -C public"]
}
One could also add this to the post-install-cmd
s to create wp-config.php
unless it exists:
"php -r \"file_exists('public/wp-config.php') || copy('public/wp-config-sample.php', 'public/wp-config.php');\""
Also add all the wp-stuff to .gitignore
to not check it in.
.gitignore
the files copied in from the wordpress install zip:
/public/wp-*
/public/index.php
/public/xmlrpc.php
/public/license.txt
/public/readme.html
After download follow https://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Install
Here's a Valet Driver for this wordpress setup: https://gist.github.com/bjuppa/f11c842fc5e7c5576b3f2c96583f8625
Then setup multisite following this: https://codex.wordpress.org/Create_A_Network#Step_2:_Allow_Multisite
I've now confirmed, this procedure is actually working!
We've tried all kinds of composer based installs of wordpress, but they all have in common that they install wp in a subdirectory to
public/
orweb/
which doesn't work well with wordpress multisite - see https://core.trac.wordpress.org/ticket/36507https://roots.io/bedrock/ https://wordplate.github.io
This guide is a bit old but interesting: https://roots.io/using-composer-with-wordpress/
I haven't tested these: https://github.com/gwa/bedrock-multisite-skeleton https://github.com/gwa/WpMultisiteDirectoryResolver