# Developing plugin locally

**URL:** https://discourse.roots.io/t/developing-plugin-locally/4835
**Category:** plugins
**Created:** 2015-09-25T15:42:13Z
**Posts:** 13
**Showing post:** 9 of 13

## Post 9 by @fullyint — 2018-01-07T20:30:08Z

@yaaax

The [Vagrant docs on synced folders](https://www.vagrantup.com/docs/synced-folders/basic_usage.html) is the most fundamental resource.

When I wrote the quoted post a couple year ago, I linked the [model snippet](https://github.com/roots/trellis/blob/d9fbf934b0b0e6094970e4cab7f3bef3e48f4f1e/Vagrantfile#L53-L54) people could use in customizing their `Vagrantfile` to add an extra sync folder. However, as of [roots/trellis#828](https://github.com/roots/trellis/pull/828), Trellis enables you to set up additional `vagrant_synced_folders` more conveniently.

You could override the empty list of `vagrant_synced_folders` in the Trellis core file [`vagrant.default.yml`](https://github.com/roots/trellis/blob/7d81e08d921768f5a0c39976be2105694db2ff0e/vagrant.default.yml) by creating the following `vagrant.local.yml` in your `trellis` directory:

```
# vagrant.local.yml

vagrant_synced_folders:
- local_path: /Users/philip/myplugin
  destination: /srv/www/example.com/current/web/app/plugins/myplugin
  create: false
  type: nfs
  bindfs: true
  mount_options: []
  bindfs_options:
    u: 'vagrant'
    g: 'www-data'
    o: 'nonempty'
```

The `Vagrantfile` would load that config info [here](https://github.com/roots/trellis/blob/7d81e08d921768f5a0c39976be2105694db2ff0e/Vagrantfile#L13-L16) and create the corresponding `vagrant_synced_folders` [here](https://github.com/roots/trellis/blob/7d81e08d921768f5a0c39976be2105694db2ff0e/Vagrantfile#L94-L108). You’ll have to look at this code and the [sync options](https://www.vagrantup.com/docs/synced-folders/basic_usage.html#mount_options) details to decide your sync config. If you are using macOS High Sierra, perhaps you’ll need these extra [`mount_options`](https://discourse.roots.io/t/high-sierra-upgrade-issues-with-filesystem/10594/8).

**Edit.** You probably wouldn’t have the plugin already in the bedrock directory, and if you did, it would already be synced. To make the example more realistic, I edited the plugin’s `local_path` to be outside the bedrock directory.

```
vagrant_synced_folders:
- - local_path: ../site/web/app/plugins/myplugin
+ - local_path: /Users/philip/myplugin
    destination: /srv/www/example.com/current/web/app/plugins/myplugin
```

---

_[View the full topic](https://discourse.roots.io/t/developing-plugin-locally/4835)._
