⚠️ PHP 7.3 + Webpack version moved to webpack branch -- The 7.4 version theme makes use of Vite, so there are breaking updates to current developments!
⚠️ master branch changed to main
- Install Node for your platform.
- Install Docker for your platform.
- Install docker-compose for your platform (if necessary).
Clone this repository:
git clone git@github.com:pie-inc/docker-wordpress-multisite.git <TARGET FOLDER>
Then install dependencies: npm i
or yarn
Once all packages have been installed, run yarn start
to build the docker images, start the docker containers and watch all source files for changes.
Alternatively you can just run npm run serve
, yarn serve
or docker-compose up -d
❔ to download/build the docker images and start the server.
A few folders and files will be created inside ./data
for debugging, mainly mysql
. These folders are local and will not be included in the git flow.
Go through the famous 5-minute wordpress instalation by going to http://localhost:8080
In line 220
or data/docker-entrypoint.sh
, update the email section to the admin email.
Jump into the wordpress container, enable multisite with WP-CLI and update the .htaccess, making a backup of the original.
docker-compose exec wp bash
wp core multisite-convert
mv .htaccess backup.htaccess
mv multisite.htaccess .htaccess
You will need install makecert.
Using homebrew:
brew install mkcert
brew install nss # if you use Firefox
mkcert -install
Then, you will have to generate the Certificates and dh parameters
mkcert localhost 127.0.0.1 ::1
openssl dhparam -out dh.pem 2066
And finally copy the certificates from the mentioned location in the terminal into ./data/certs/
nginx expects the files to have the following naming structure: dh.pem ssl.crt ssl.key
. The nomenclature can be updated at data/nginx/wordpress.conf
You can also generate your own, or use existing ones you might have. (Using openSSL)
Nope.
You have to change quite a few settings, like the nginx configuration file.
Type npm run reset
or yarn reset
and voilà!
Although it might work in Windows, I have only used this process in *NIX machines. Some commands might have to be altered in package.json
to adapt for proper Windows usage.