Run following code to clone from GitHub.
git clone [email protected]:grappler/WPZOO.git
Run composer to install the dependencies
composer install
Run the following command to install the dependencies without the devlopment plugins
composer install --no-dev
Run composer update
to update the plugins. Commit composer.lock
to git so that the updates can be saved.
The remote location needs to be added so that it can be pushed to Siteground.
git remote add sg-staging ssh://[email protected]:18765/home/wpzoo587/public_html/staging
git remote add sg-prod ssh://[email protected]:18765/home/wpzoo587/public_html/prod
When the code is pushed to Siteground it will automatically run composer install --no-dev
git push sg-staging develop
git push sg-prod master
- Clone the repo to a folder
git clone https://github.com/grappler/WPZOO.git folder_name
- Checkout the correct branch
- To be able to push to a non-bare repository you need to execute the following command:
git config receive.denyCurrentBranch ignore
- Create empty file to define production envoirnment e.g.
production
orstaging
- Setup the post-receive hook
- Create the
post-receive
file infolder_name/.git/hooks/
. The file encoding should "UTF-8 without BOM" and "UNIX/OSX EOL Format". - Paste the contents from https://gist.github.com/grappler/214afd6f861ece80af88 and save.
- Run
chmod +x .git/hooks/post-receive
so that the code can be executed. - For the first time run
composer install --no-dev --prefer-dist --optimize-autoloader