A bash script for quickly creating local WordPress sites on Ubuntu in WSL.

View on GitHub

Usage

  1. Create and/or navigate to the directory where you want to create WordPress sites:
    mkdir -p /path/to/dev/directory && cd /path/to/dev/directory
  2. Clone the repository:
    git clone [email protected]:joshmckibbin/wp-create.git .
  3. Make sure you have execute permissions:
    chmod +x wp-create.sh
  4. Copy the .env-sample file to .env and replace the environment variables accordingly:
    cp .env-sample .env
  5. Run the script
    ./wp-create.sh

There is also a wp-destroy.sh script that undoes everything.
Visit the GitHub page for more info.

Why is this necessary?

Why not just use LocalWP?

LocalWP uses its own Docker containers and cannot be ran directly in WSL, which makes it run pretty slow. It also means that you have to do all of your coding directly in Windows and not WSL. I much prefer coding in a Linux environment.

Why not just use WordPress Playground?

No data persistence, so database development and testing is impossible.

What about wp-env?

In my experience, wp-env is incredibly buggy and inconsistent.