This is a command line tool that I created to automate the process of setting up a WordPress website for development. Every developer has their own way of setting up WordPress. I have found this way to be most efficient for me.

The tool sets up an empty git repository, then downloads WordPress from GitHub as a submodule and makes some changes to configuration files. Basically, it does everything I used to do manually for every project.

Here are some instructions on how to use it:

First, download the installer using Composer:

composer global require niklasdahlqvist/wordpress-git-installer

Make sure to place composer’s system-wide vendor bin directory in your $PATH so the wordpress-git-installer executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include:

Once installed, the wp-git-installer new command will create a fresh WordPress installation in the directory you specify. For instance, wp-git-installer new blog will create a directory named blog containing a fresh WordPress installation:

wp-git-installer new blog