# Local + direnv + VS Code

**URL:** <https://community.localwp.com/t/local-direnv-vs-code/51139>\
**Category:** Workflow\
**Created:** [August 14, 2025, 12:30pm UTC](https://community.localwp.com/t/local-direnv-vs-code/51139 "2025-08-14T12:30:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![soderlind](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/soderlind/32/24675_2.png) [@soderlind](https://community.localwp.com/u/soderlind)\
**Post date:** [August 14, 2025, 12:30pm UTC](https://community.localwp.com/t/local-direnv-vs-code/51139/1 "2025-08-14T12:30:15Z")

</div>

Inspired by [Vscode and wp-cli - #3 by ben.turner](https://community.localwp.com/t/vscode-and-wp-cli/43924/3) , I’ve written a guide on how to use direnv with Local and VS Code. It’s available at [local-direnv-vscode-setup.md · GitHub](https://gist.github.com/soderlind/a470af7652a61ee07e302ea815d786df)

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [August 15, 2025, 1:41pm UTC](https://community.localwp.com/t/local-direnv-vs-code/51139/2 "2025-08-15T13:41:31Z")

</div>

Thank you for sharing this @soderlind!

---

<div class="post-metadata">

**Author:** ![soderlind](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/soderlind/32/24675_2.png) [@soderlind](https://community.localwp.com/u/soderlind)\
**Post date:** [August 15, 2025, 2:47pm UTC](https://community.localwp.com/t/local-direnv-vs-code/51139/3 "2025-08-15T14:47:06Z")

</div>

@Nick-B I would appreciate it if Local added an .envrc by itself.

---

<div class="post-metadata">

**Author:** ![nickc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nickc/32/21209_2.png) [@nickc](https://community.localwp.com/u/nickc)\
**Post date:** [August 24, 2026, 12:12pm UTC](https://community.localwp.com/t/local-direnv-vs-code/51139/4 "2026-08-24T12:12:38Z")

</div>

Local does now add a direnv file (`.envrc`) by default since Local 10.1.1.

> [@Using direnv with Local](https://community.localwp.com/t/using-direnv-with-local/52246):
>
> By default, using tools like [wpcli](https://wordpress.org/cli/) with a Local site requires clicking the “Site Shell” button for any site you want to work with. This can become tedious when changing between multiple sites with the same primary terminal. Installing a third-party tool like [direnv](https://direnv.net/) helps reduce that friction so that you can easily work with multiple Local sites within a single shell instance. Local already generates a .envrc file for each site — direnv just picks it up automatically, giving you access to the si…

You can also optionally disable direnv support from Advanced Preferences (since Local 10.1.2).
