Levdbas / Create-WP-project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automate WP setup

This bash script automates the process of setting up new WP dev environments. Mainly testen on windows environments and is also compatible to run in WSL.

What is does

The script does the following tasks when running:

  • create a folder in the location set in the bash file in the following format: projectname.local
  • clones BedRock in this folder
  • removes .git folders from the bedrock clone
  • clones BasePlate in the theme folders and moves all the files to the right folders, removes .git folder as well
  • runs yarn for npm packages with fallback to npm install
  • runs composer
  • creates git repo in the project folder, adds node_modules to the .gitignore
  • set remote for git repo
  • creates .env file and fills it with correct values (check if values are correct for you)
  • generates and sets salts in .env file
  • installs WordPress with wp-cli, sets permalink structure and active theme.
  • updates example page to be the static front-page

Prerequisites

The following is needed before you can run the script.

  • duplicate example.variables.config to variables.config and fill in the details
  • install LTS or latest version of node.js
  • Install latest version of composer
  • install latest version of yarn
  • install GIT
  • add mysql to path
    • MAC: export PATH=${PATH}:/usr/local/mysql/bin/
    • Windows: follow this tutorial
    • Windows wsl apt install mariadb-client-core-10.1 -y
  • install wp-cli with install wp-cli with: composer global require wp-cli/wp-cli
  • instal dotenv with: wp package install aaemnnosttv/wp-cli-dotenv-command:^1.0

Contributing

Please let me know if you have suggestions for enhancements for this project

To do

  • Test script on mac/linux

Authors

  • Erik van der Bas - Initial work - Levdbas

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About


Languages

Language:Shell 100.0%