Coder Social home page Coder Social logo

wp-starter's Introduction

WP Starter Project

Installation

Local VVV Wordpress Site

  1. Go to the www directory of Vagrant
  2. Clone this repo, change MyApp to the real project name
  3. Find & replace example-project with the real project name
  4. Provision
git clone https://github.com/nikosolihin/wp-starter.git MyApp && cd $_
find ./ -type f -maxdepth 1 -exec sed -i '' -e 's/example-project/myapp/g' {} \;
cd ../..
vagrant up --provision

Build Tool

Utilize Gulp Starter as project builder:

svn checkout https://github.com/vigetlabs/gulp-starter/trunk/src src
svn checkout https://github.com/vigetlabs/gulp-starter/trunk/gulpfile.js gulpfile.js
svn export https://github.com/vigetlabs/gulp-starter/trunk/package.json

Add php.js and twig.js from older projects to gulpfile.js/tasks. Edit name, version and description in package.json.

Clean unnecessary folders and .git folder to start a fresh history:

rm -rf .git
rm -rf ./src/html ./src/images
rm -rf ./gulpfile.js/tasks/html.js ./gulpfile.js/tasks/images.js
npm install

Initial Commit

Tell .gitignore to ignore htdocs and VVV config files:

echo "htdocs/\nvvv-hosts\nvvv-init.sh\nvvv-nginx.conf\nwp-cli.yml" >> .gitignore # We can now ignore the destination folder after vagrant provision
git init
git add .
git commit -m 'Allons-y!'

Then use Tower app to initiate Git-Flow.

Setting up remote repo

Create a new Github repo without .gitignore and README.md. Then add the new origin to our local repo:

git remote add origin https://github.com/USERNAME/REPOSITORYURL.git

Do a git push to make sure everything's good.

Setting up remote deploy repo

Prepare the bare repo for deployment using this prep.sh and post-receive hook:

ssh -i .ssh/KEYNAME user@host
cd ~
curl -O https://gist.githubusercontent.com/nikosolihin/7b4eabe087ccec339eca6d8e60d1c56f/raw/7e433ce5a235e1b150d2eeb2fec9c1f0d664b42a/prep.sh
chmod +x prep.sh && ./$_

Preparing Travis CI

  1. Head to Travis CI account settings, sync repo and toggle the project's repo.
  2. Copy the markdown of the status badge.
  3. Revise the project's README.md and paste the badge.
  4. Copy the private key that Travis will use to the folder. Don't commit!
  5. Run travis login and travis encrypt-file deploy-key --add to add the needed env vars and update .travis.yml
  6. rm deploy-key
  7. Customize .travis.yml
  8. Cut and paste the openssl part to _travis/install.sh
  9. Make sure _travis/deploy.sh looks good
  10. If using Basecamp, update the Zapier webhooks URL in .travis.yml

wp-starter's People

Contributors

nikosolihin avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.