# Newbie question: How to deploy Roots

**URL:** https://discourse.roots.io/t/newbie-question-how-to-deploy-roots/2040
**Category:** bedrock
**Tags:** deploys
**Created:** 2014-07-30T19:06:56Z
**Posts:** 9

## Post 1 by @springgrass — 2014-07-30T19:06:56Z

Hi everyone,

I read topics on the deploys section here. It seems there are different products for deploy Roots. So if I don’t want to use anything else, but just git. What is the best approach?

Here are my steps:

1. git clone on production to install theme
2. manually copy generated files to assets folder on production.

Thanks much.

---

## Post 2 by @cfx — 2014-07-30T20:56:34Z

Roots is just a WordPress theme. How you choose to deploy your WordPress installation is entirely up to you and there are countless ways.

There isn’t anything technically wrong with your existing steps, but the deploy method developers choose usually depends on many factors. If that works for you right now then no sense fixing something that isn’t broken.

---

## Post 3 by @JulienMelissas — 2014-07-30T23:27:45Z

@cfx put it well…

If you’re just trying to deploy your files, a simple copy and paste via FTP of the entire theme directory is probably the easiest way to do it. I don’t upload the node\_modules folder because you don’t need it and it’s usually pretty big.

One step above that simple way to do it would be to use git to track your entire theme directory/folder, and use a service like [Beanstalk](http://beanstalkapp.com/), [FTPloy](http://ftploy.com/), or [DeployHQ](https://www.deployhq.com/) to manually deploy commits to your development server when you make them on your localhost.

Of couse there a lots of other way to do this, but I would consider these some of the simplest approaches.

---

## Post 4 by @springgrass — 2014-07-31T21:18:16Z

Thanks much everyone.

I’ll just have to make the theme worked before streamlining the deploy process.

---

## Post 5 by @shaimoom — 2014-08-07T23:05:13Z

[http://discourse.roots.io/t/using-roots-7-0-with-git-deploy/1871/5](http://discourse.roots.io/t/using-roots-7-0-with-git-deploy/1871/5)

---

## Post 6 by @asuh — 2014-08-29T06:53:15Z

@shaimoom I’ll be interested to see this in person at the WordCamp LAX. I’m doing the same thing for a site currently so this was an interesting writeup.

Considering I don’t know how to use Composer or Capistrano, I’m first learning to do this manually. I’d assume that with the Bedrock plugin the deployment procedure knows exactly which files need to be uploaded to the production server.

It’d be nice to see a little more transparency about manual deployment and what’s not necessary (like `node_modules` folder) and what should be changed.

---

## Post 7 by @kalenjohnson — 2014-08-29T15:08:53Z

Looks awesome @shaimoom, I will see you there! Looking forward to your presentation :slight_smile:

---

## Post 8 by @shaimoom — 2014-08-29T17:39:21Z

Thanks @asuh and @kalenjohnson. I look forward to seeing you there. I have streamlined the process by using this [Gruntfile.js](https://gist.github.com/shaimoom/ee0b4e887435d6c39218) instead, so that [grunt watch also builds the minified assets](http://discourse.roots.io/t/add-x-min-css-x-min-script-to-watch/1920/3) (thanks @cfx). No more fiddling with `define('WP_ENV', 'development');` The modified Gruntfile.js also activates LiveReload if one is so inclined. Here is my revised writeup with the new file.

##Services/Software used

- Terminal
- [github.com](http://github.com)
- [Github for Mac](https://mac.github.com/) (desktop GUI for git)
- [Sublime Text](http://www.sublimetext.com/)
- [MAMP](http://www.mamp.info/en/)
- [Deploy](https://www.deployhq.com/) (deployment from git repositories)
- [modified `Gruntfile.js`](https://gist.github.com/shaimoom/ee0b4e887435d6c39218) (runs build task in watch task / activates LiveReload)
- [LiveReload](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en) (Google Chrome Extension)

For the purposes of this example, I am renaming the theme as ‘demo’.

###Part I: Github setup

1. Create a repository at [github.com](http://github.com) named ‘demo’

- Clone Roots repository from [github.com](http://github.com) to `wp-content/themes` folder as ‘demo’
- Change local Roots clone settings as follows:
  - Change Primary remote repository (origin) to: [https://github.com/shaimoom/demo.git](https://github.com/shaimoom/demo.git) (you can find this at the [github.com](http://github.com) repo for ‘demo’)
  - Delete the following from Ignored files (.gitignore):
    - `assets/css/*main*.css`
    - `assets/js/*scripts*.js`
    - `assets/js/vendor/modernizr.min.js`
    - `assets/manifest.json`

- Sync the local and remote repositories (initial commit)

###Part II: Local Dev Setup, Install Dependencies & Grunt

1. Right-click on the ‘demo’ repository in Github and select ‘Open in Terminal’

- Run `npm install` on theme root directory (vendor assets will be added to the theme)
- Run `grunt build` (build minified assets to see Bootstrap styled theme upon theme activation)
- Replace `Gruntfile.js` in theme root directory with this [Gist](https://gist.github.com/shaimoom/ee0b4e887435d6c39218) (runs build task in watch task / activates LiveReload)
- Run `grunt watch` on theme root directory in terminal to track changes and build minified assets
- Activate LiveReload in Chrome Extensions
- Activate theme
- Activate theme on production site

###Part III: Deployment

1. Make a change to local theme

- Create a commit in Github and sync
- Go to Deploy Add SSH & SFTP info (including theme file path)
- Click ‘Deploy Now’ to deploy from latest commit
- View changes deployed to production site

Repeat **Part III** to deploy local changes to production site (except step 3 - that is for setting up Deploy for the first time only).

---

## Post 9 by @cfx — 2014-08-29T18:06:59Z

Looks great! Thanks for the shout out :wink:
