# How do YOU perform local development? Tips wanted

**URL:** <https://community.dotcms.com/t/how-do-you-perform-local-development-tips-wanted/140>\
**Category:** Product Discussions\
**Tags:** developer, developer-workflows, devops\
**Created:** [May 19, 2025, 3:43pm UTC](https://community.dotcms.com/t/how-do-you-perform-local-development-tips-wanted/140 "2025-05-19T15:43:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcaruth](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.dotcms.com/tcaruth/32/36_2.png) [@tcaruth](https://community.dotcms.com/u/tcaruth)\
**Post date:** [May 19, 2025, 3:43pm UTC](https://community.dotcms.com/t/how-do-you-perform-local-development-tips-wanted/140/1 "2025-05-19T15:43:07Z")

</div>

This is how we’re currently setup:

1. I run the docker command to clone my environment
2. `dotcli instance` to the remote instance i just cloned
3. `dotcli pull` to get the files locally in a better folder structure
4. `dotcli instance` to switch to my local instance
5. `dotcli push -w` to push changes i’m making to vtl and js files “live”
6. Refresh the dotCMS page in my browser to view my changes  
I make changes and when I’m finished I commit them. Currently, we’re manually keeping our remote in sync with GitHub, but I’ll setup GitHub actions to do this soon.

Pros:

- This lets me have the entire instance run locally. This is vital since it lets me use the IDE tools and snippets we’ve already created
- “migration” seems as easy as `dotcli config` ing another remote instance and `dotcli push`ing

Cons:

- dotcli push -w 1 seems to be the fastest “sync” i can get, and sometimes i refresh to see my changes before it’s finished pushing
- /files directory also contains images, videos, and other media used on the site. We can use `git lfs` for those or just ignore them

This largely supports the direction given in this article.

> **[Integrating dotCMS CLI Into CI/CD Pipelines With GitHub Actions: A Modern...](https://www.dotcms.com/blog/integrating-dotcms-cli-into-ci-cd-pipelines-with-github-actions)**
>
> Learn how to seamlessly integrate dotCMS CLI into CI/CD pipelines using GitHub Actions in this comprehensive guide. Discover modern configuration management techniques to automate workflows, streamline deployments, and ensure consistent version...

Is there anything I’m making more difficult for myself? Anybody have something drastically different?

---

<div class="post-metadata">

**Author:** ![fmontes](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.dotcms.com/fmontes/32/13_2.png) [@fmontes](https://community.dotcms.com/u/fmontes)\
**Post date:** [May 20, 2025, 1:25pm UTC](https://community.dotcms.com/t/how-do-you-perform-local-development-tips-wanted/140/2 "2025-05-20T13:25:58Z")

</div>

Hi, one thing that I do while coding is to make `dotcli` watch only the file or folder I’m working on, so the sync is quicker.

Maybe we can add to `dotcli` a watch with glob patterns?

---

<div class="post-metadata">

**Author:** ![nollymar](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.dotcms.com/nollymar/32/65_2.png) [@nollymar](https://community.dotcms.com/u/nollymar)\
**Post date:** [May 20, 2025, 10:54pm UTC](https://community.dotcms.com/t/how-do-you-perform-local-development-tips-wanted/140/3 "2025-05-20T22:54:22Z")

</div>

Hi!

If you already have a GitHub repo with the files, configuring the GitHub action integration can make the work easier for you.

Nolly!

---

<div class="post-metadata">

**Author:** ![tcaruth](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.dotcms.com/tcaruth/32/36_2.png) [@tcaruth](https://community.dotcms.com/u/tcaruth)\
**Post date:** [May 21, 2025, 1:47pm UTC](https://community.dotcms.com/t/how-do-you-perform-local-development-tips-wanted/140/4 "2025-05-21T13:47:27Z")

</div>

Thanks Nolly, it’s in the plans!

> I make changes and when I’m finished I commit them. Currently, we’re manually keeping our remote in sync with GitHub, but I’ll setup GitHub actions to do this soon.

I’m curious what other “hot tips” people have

---

<div class="post-metadata">

**Author:** ![tcaruth](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.dotcms.com/tcaruth/32/36_2.png) [@tcaruth](https://community.dotcms.com/u/tcaruth)\
**Post date:** [May 21, 2025, 4:32pm UTC](https://community.dotcms.com/t/how-do-you-perform-local-development-tips-wanted/140/5 "2025-05-21T16:32:46Z")

</div>

I’ve seen other cli tools watch for changes in the files directly, instead of polling. Is that something that was explored?

---

<div class="post-metadata">

**Author:** ![wezell](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.dotcms.com/wezell/32/10_2.png) [@wezell](https://community.dotcms.com/u/wezell)\
**Post date:** [August 4, 2025, 6:25pm UTC](https://community.dotcms.com/t/how-do-you-perform-local-development-tips-wanted/140/6 "2025-08-04T18:25:57Z")

</div>

Watching a folder was explored but I believe using watching, at least as it worked in our CLI, caused file locking issues on Windows boxes. We fell back to a polling mechanism which works out of the box cross platform and has decent performance even with large directories.

---

<div class="post-metadata">

**Author:** ![tcaruth](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.dotcms.com/tcaruth/32/36_2.png) [@tcaruth](https://community.dotcms.com/u/tcaruth)\
**Post date:** [August 4, 2025, 9:13pm UTC](https://community.dotcms.com/t/how-do-you-perform-local-development-tips-wanted/140/7 "2025-08-04T21:13:50Z")

</div>

Interesting. Thanks for the info!

After thinking a bit more I wondered if a `dotcli sync` would be a nice addition. Sometimes, in the moment it’s easy to use the web ui to make a quick change and see the results. I’m often finding I forget to pull the contents back from the running instance into my local environment. I need all the help I can get saving me from myself 😅

---

<div class="post-metadata">

**Author:** ![tom.ethode](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.dotcms.com/tom.ethode/32/105_2.png) [@tom.ethode](https://community.dotcms.com/u/tom.ethode)\
**Post date:** [August 4, 2025, 9:52pm UTC](https://community.dotcms.com/t/how-do-you-perform-local-development-tips-wanted/140/8 "2025-08-04T21:52:22Z")

</div>

Hello,

If you’re using Vite’s dev server, referencing JS, TS, styles, etc using Vite’s backend integration, there’s a plugin for Vite called `vite-plugin-full-reload`. this allows you to auto-refresh on any glob (eg: `src/**/{*.vtl|*.vm}`. We use this on VTL files to auto refresh the page we’re working on.

You’ll can also set a custom delay for however long it takes for the file(s) to upload to dotcms.
