A Docker Container which setups up WordPress with PHP-FPM, Nginx with a self-signed SSL certificate, WordPress CLI, MariaDB, memcache and phpMyAdmin. In addition, the setup script will install the WordPress VIP MU Plugins and the NBCOTS VIP repository if you have access. You will need to learn the Docker Compose commands to spin down containers and spin them back up.
Here are a list of frameworks you need to have pre-installed on your machine. If you happen to shortcut the installation the local development environment will not run properly.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install php
ini
file.
cd /usr/local/etc/php/7.3/conf.d
touch myphp.ini
; Fix for PCRE "JIT compilation failed" error
[Pcre]
pcre.jit=0
myphp.ini
file you just created.brew install npm
brew install composer
Docker Desktop is running
./local_init.sh
require_once( ABSPATH . 'wp-settings.php' );
in your wp-config.php
:require_once( ABSPATH . 'wp-content/vip-config/vip-config.php' );
http://localhost/wp-admin
on your browser and sign in using credentials stored inside of the .env
file.wp-content
folder. DO NOT commit to the main Docker Container repository.Run the following commands to ensure orphaned containers are removed.
docker-compose down --remove-orphans
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
If you get an error similar to:
Uncaught Error: Call to undefined function NBC\get_site_host() ...
It's likely the nbc-station
theme didn't get activated. Run this to fix:
docker-compose run wp-cli theme enable nbc-station --network
docker-compose run wp-cli theme activate nbc-station
Have you got questions? Problems with the installation? Use Google, ask your neighbor or ask questions in Slack.