Here's the file structure I use, and the script "kinda sorta" assumes a similar hierarchy; i.e. with the git root one level above the web root.
ProjectName/Repo/.git/
/public/
To start out, just create the Repo
directory in your project directory. The Repo
directory should be empty when you run the script. Then cd ProjectName/Repo
, and run the wp-up.sh
script, or maybe just copy the pieces that work for you.
I should note that I keep wp-config.php
one level above the web root. If that's not your thing, just remove (or skip) the line that reads mv ./public/wp-config-sample.php ./wp-config.php
.
Disclaimer: Do not copy things you do not understand from the internet into your terminal. I am not available for support. And if it all goes south because you made a mistake, you are on your own. Good luck.
Credit to the gist that inspired me to throw this together ... https://gist.github.com/BFTrick/11294357#gistcomment-2975609