This is my base for starting any WordPress project. There is a focus on best practices, portability (Docker), and both end-user and developer performance.
How to get WordPress up and running locally. The IP mapping assumes your local Docker host is running on IP 127.0.0.1 (i.e., Docker for Mac/Linux).
git clone https://github.com/cameronmalek/wordpress.git my-project cd my-project git submodule init git submodule update ./htdocs.sh docker-compose up -d sudo -- sh -c -e "echo '127.0.0.1 example.com' >> /etc/hosts"; sudo -- sh -c -e "echo '127.0.0.1 www.example.com' >> /etc/hosts"; open https://www.example.com
Wait a few seconds if you're getting a database connection error; it takes a bit for the database container to boot fully for the first time.
A large portion of the
wp-config.php file is based off of lewg/wordpress-docker.