{"id":3751,"date":"2026-02-16T15:57:04","date_gmt":"2026-02-16T15:57:04","guid":{"rendered":"https:\/\/codingfix.com\/?p=3751"},"modified":"2026-04-04T19:05:34","modified_gmt":"2026-04-04T19:05:34","slug":"ddev-vs-code-integration-disk-cleanup-and-more","status":"publish","type":"post","link":"https:\/\/codingfix.com\/ddev-vs-code-integration-disk-cleanup-and-more\/","title":{"rendered":"DDEV for Dummies 3: VS Code Integration, Troubleshooting, and Disk Cleanup"},"content":{"rendered":"\n<div class=\"wp-block-greenshift-blocks-row gspb_row gspb_row-id-gsbp-f81e93c\" id=\"gspb_row-id-gsbp-f81e93c\"><div class=\"gspb_row__content\"> \n<div class=\"wp-block-greenshift-blocks-row-column gspb_row__col--12 gspb_col-id-gsbp-62df549\" id=\"gspb_col-id-gsbp-62df549\">\n<h2 id=\"gspb_heading-id-gsbp-ef025f1\" class=\"gspb_heading gspb_heading-id-gsbp-ef025f1 \">DDEV: VS Code integration, edit config end disk cleanup<\/h2>\n\n\n\n<p>Now that your DDEV environment is humming along, it\u2019s time to optimize. Local development on Windows with WSL2 is powerful, but it requires knowing a few &#8220;under-the-hood&#8221; tricks to keep things fast and clean.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1-precision-editing-with-nano\">1. Precision Editing with Nano<\/h2>\n\n\n\n<p>Sometimes you need to tweak the DDEV global settings (like changing ports or default behavior). While you <em>could<\/em> open these files with a Windows editor, you risk messing up the line endings (LF vs CRLF), which Linux hates.<\/p>\n\n\n\n<p>The safest way is to use <strong>Nano<\/strong>, the built-in Linux text editor.<\/p>\n\n\n\n<p><strong>How to edit <code>global_config.yaml<\/code>:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open your Ubuntu terminal.<\/li>\n\n\n\n<li>Type: <code>nano ~\/.ddev\/global_config.yaml<\/code><\/li>\n\n\n\n<li><strong>Navigation:<\/strong> Use the <strong>arrow keys<\/strong> to move around. There is no mouse support here!<\/li>\n\n\n\n<li><strong>Editing:<\/strong> Just start typing. To delete, use Backspace or Delete.<\/li>\n\n\n\n<li><strong>Saving:<\/strong> Press <code>Ctrl + O<\/code> (Write Out), then hit <strong>Enter<\/strong> to confirm the filename.<\/li>\n\n\n\n<li><strong>Exiting:<\/strong> Press <code>Ctrl + X<\/code>.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2-the-spring-cleaning-protocol-recovering-gbs-of-space\">2. The &#8220;Spring Cleaning&#8221; Protocol (Recovering GBs of Space)<\/h2>\n\n\n\n<p>Deleting a folder in Windows doesn&#8217;t always give you your disk space back because WSL2 uses a virtual disk that expands but rarely shrinks. Use this &#8220;Definitive Cleanup&#8221; when you finish a large project:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Inside Ubuntu:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Remove the DDEV metadata: <code>ddev delete --omit-snapshot<\/code><\/li>\n\n\n\n<li>Delete the files: <code>rm -rf ~\/websites\/projectname<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Close Everything:<\/strong> Exit VS Code and close all terminal windows.<\/li>\n\n\n\n<li><strong>On Windows (The Compactor):<\/strong>\n<ul class=\"wp-block-list\">\n<li>If you have a <code>pulisci_wsl.bat<\/code> file (a script that runs <code>wsl --shutdown<\/code> and the <code>diskpart<\/code> compact command), right-click it and choose <strong>&#8220;Run as Administrator&#8221;<\/strong>.<\/li>\n\n\n\n<li><em>Note: Only do this after deleting large projects, as restarting the WSL subsystem takes a couple of minutes.<\/em><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"3-vs-code-the-remote-reality\">3. VS Code: The &#8220;Remote&#8221; Reality<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"bridging-the-gap-connecting-vs-code-to-wsl\">Bridging the Gap: Connecting VS Code to WSL<\/h3>\n\n\n\n<p>To work effectively, VS Code needs to do more than just open files; it needs to &#8220;teleport&#8221; itself inside the Linux environment. This is where the magic happens.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"1-the-gateway-the-wsl-extension\">1. The Gateway: The WSL Extension<\/h4>\n\n\n\n<p>Before doing anything else, you must install the official <strong>WSL extension<\/strong> by Microsoft from the VS Code Marketplace. This is the bridge that allows Windows to talk to your Ubuntu distribution seamlessly.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"2-entering-the-remote-realm\">2. Entering the Remote Realm<\/h4>\n\n\n\n<p>Once the extension is installed, look at the very bottom-left corner of your VS Code window. You will see a small, green (or blue) icon that looks like two brackets <code>&gt;&lt;<\/code>.<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Click the Icon:<\/strong> A tooltip saying &#8220;Open a Remote Window&#8221; will appear.<\/li>\n\n\n\n<li><strong>Select &#8220;Connect to WSL&#8221;:<\/strong> A dropdown menu will open at the top of your screen. Choose &#8220;Connect to WSL&#8221; (or &#8220;Connect to WSL using Distro&#8221; if you have multiple setups).<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"3-a-new-interface-the-two-faces-of-vs-code\">3. A New Interface: The Two Faces of VS Code<\/h4>\n\n\n\n<p>After you connect, VS Code restarts, and the interface evolves. You are no longer in a Windows program; you are operating &#8220;inside&#8221; Linux.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>The Status Bar:<\/strong> The bottom-left corner now proudly displays <strong>WSL: Ubuntu<\/strong>.<\/li>\n\n\n\n<li><strong>The Extensions Sidebar:<\/strong> This is where beginners often get lost. When you open the Extensions view (<code>Ctrl+Shift+X<\/code>), you will now see two distinct sections:\n<ul class=\"wp-block-list\">\n<li><strong>Local &#8211; Installed:<\/strong> Extensions running on your Windows machine.<\/li>\n\n\n\n<li><strong>WSL: UBUNTU &#8211; Installed:<\/strong> Extensions running inside your Linux environment.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>Crucial Step:<\/strong> For tools like <strong>PHP Intelephense<\/strong> or <strong>Laravel Extra Intellisense<\/strong> to work, they <strong>must<\/strong> be installed in the &#8220;WSL: Ubuntu&#8221; section. If you see a blue button saying &#8220;Install in WSL,&#8221; click it. This allows the extension to &#8220;see&#8221; the PHP binary and the files living inside your DDEV containers.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"4-opening-your-project\">4. Opening your Project<\/h4>\n\n\n\n<p>Now that the bridge is active, here is how to get to work:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>From the Terminal (Recommended):<\/strong> In your Ubuntu terminal, navigate to your project folder and simply type: <code>code .<\/code><\/li>\n\n\n\n<li><strong>The Result:<\/strong> VS Code will open that folder immediately within the WSL context, with all your Linux-based tools ready to go.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"4-troubleshooting-vs-code-laravel\">4. Troubleshooting VS Code &amp; Laravel<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"php-executable-not-found\">&#8220;PHP Executable Not Found&#8221;<\/h3>\n\n\n\n<p>If Intelephense complains it can&#8217;t find PHP, remember: <strong>PHP lives inside the DDEV container<\/strong>, not on Windows or even directly in Ubuntu.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>The Fix:<\/strong> Usually, installing the PHP extension specifically inside the WSL remote session resolves this, as it will look for the Ubuntu PHP (if installed) or you can point it to the DDEV binary path (usually <code>\/usr\/bin\/php<\/code>).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"laravel-extra-intellisense-php-permission-denied\">Laravel Extra Intellisense: &#8220;PHP: Permission Denied&#8221;<\/h3>\n\n\n\n<p>If you see a wall of errors like <code>\/bin\/sh: 1: php: Permission denied<\/code> while using Laravel, don&#8217;t panic. This happens because the extension is trying to run PHP commands locally in Ubuntu, but your environment is inside DDEV.<\/p>\n\n\n\n<p><strong>How to fix it:<\/strong> You need to tell the extension to &#8220;talk&#8221; to DDEV instead of a local PHP. Go to VS Code <strong>Settings<\/strong>, search for <code>Laravel Extra Intellisense: Php Command<\/code>, and change the default to: <code>ddev php -r \"{code}\"<\/code><\/p>\n\n\n\n<p>This forces the extension to execute its logic inside the DDEV container where PHP has the correct permissions and access to your database.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-primary-color has-alpha-channel-opacity has-primary-background-color has-background\"\/>\n\n\n\n<div id=\"gspb_text-id-gsbp-0f14523\" class=\"gspb_text gspb_text-id-gsbp-0f14523 \">This article is the third chapter of the series <em>DDEV for Dummies<\/em>. You can find the other chapters below:<\/div>\n\n\n<div  class=\"ultp-post-grid-block wp-block-ultimate-post-post-grid-2 ultp-block-9a662e\"><div class=\"ultp-block-wrapper\"><div class=\"ultp-loading\"><div class=\"ultp-loading-blocks\" style=\"width:100%;height:100%;\"><div style=\"left: 0;top: 0;animation-delay:0s;\"><\/div><div style=\"left: 21px;top: 0;animation-delay:0.125s;\"><\/div><div style=\"left: 42px;top: 0;animation-delay:0.25s;\"><\/div><div style=\"left: 0;top: 21px;animation-delay:0.875s;\"><\/div><div style=\"left: 42px;top: 21px;animation-delay:0.375s;\"><\/div><div style=\"left: 0;top: 42px;animation-delay:0.75s;\"><\/div><div style=\"left: 42px;top: 42px;animation-delay:0.625s;\"><\/div><div style=\"left: 21px;top: 42px;animation-delay:0.5s;\"><\/div><\/div><\/div><div class=\"ultp-block-items-wrap ultp-block-row\"><div class=\"ultp-block-item post-id-3731\"><div class=\"ultp-block-content-wrap ultp-block-content-overlay\"><div class=\"ultp-block-image ultp-block-image-zoomOut ultp-block-image-overlay ultp-block-image-custom\"><a href=\"https:\/\/codingfix.com\/how-to-use-ddev-on-windows\/\" ><img decoding=\"async\"  alt=\"DDEV for Dummies: How to Use DDEV on Windows and Live Happily Ever After\"  src=\"https:\/\/codingfix.com\/wp-content\/uploads\/2026\/02\/feat-ddev-in-windows-870x528.webp\" \/><\/a><\/div><div class=\"ultp-block-content ultp-block-content-bottomPosition\"><div class=\"ultp-block-content-inner\"><div class=\"ultp-category-grid ultp-category-classic ultp-category-aboveTitle\"><div class=\"ultp-category-in\"><a class=\"ultp-cat-ddev\" href=\"https:\/\/codingfix.com\/category\/ddev\/\"  >DDEV<\/a><a class=\"ultp-cat-other-stuff\" href=\"https:\/\/codingfix.com\/category\/other-stuff\/\"  >Other stuff<\/a><\/div><\/div><h3 class=\"ultp-block-title \"><a href=\"https:\/\/codingfix.com\/how-to-use-ddev-on-windows\/\" >DDEV for Dummies: How to Use DDEV on Windows and Live Happily Ever After<\/a><\/h3><div class=\"ultp-block-meta ultp-block-meta-dot ultp-block-meta-icon\"><span class=\"ultp-block-author ultp-block-meta-element\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n  <circle cx=\"12\" cy=\"7\" r=\"4\" stroke=\"currentColor\" stroke-linejoin=\"round\" stroke-width=\"1.5\"\/>\n  <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M4 21v-3a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v3\"\/>\n<\/svg>\n<a class=\"\" href=\"https:\/\/codingfix.com\/author\/60dinf1i6s\/\">Marco Gasi<\/a><\/span><span class=\"ultp-block-date ultp-block-meta-element\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n  <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M3 5.5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-14ZM8 2v3m8-3v3M3 9h18\"\/>\n<\/svg>\nFeb 16, 2026<\/span><\/div><\/div><\/div><\/div><\/div><div class=\"ultp-block-item post-id-3743\"><div class=\"ultp-block-content-wrap ultp-block-content-overlay\"><div class=\"ultp-block-image ultp-block-image-zoomOut ultp-block-image-overlay ultp-block-image-custom\"><a href=\"https:\/\/codingfix.com\/ddev-advanced-commands-and-troubleshooting\/\" ><img decoding=\"async\"  alt=\"DDEV for Dummies 2: Troubleshooting, Pro Commands, and Hidden Gems\"  src=\"https:\/\/codingfix.com\/wp-content\/uploads\/2026\/02\/ddev-for-dummies22-870x528.webp\" \/><\/a><\/div><div class=\"ultp-block-content ultp-block-content-bottomPosition\"><div class=\"ultp-block-content-inner\"><div class=\"ultp-category-grid ultp-category-classic ultp-category-aboveTitle\"><div class=\"ultp-category-in\"><a class=\"ultp-cat-ddev\" href=\"https:\/\/codingfix.com\/category\/ddev\/\"  >DDEV<\/a><a class=\"ultp-cat-other-stuff\" href=\"https:\/\/codingfix.com\/category\/other-stuff\/\"  >Other stuff<\/a><\/div><\/div><h3 class=\"ultp-block-title \"><a href=\"https:\/\/codingfix.com\/ddev-advanced-commands-and-troubleshooting\/\" >DDEV for Dummies 2: Troubleshooting, Pro Commands, and Hidden Gems<\/a><\/h3><div class=\"ultp-block-meta ultp-block-meta-dot ultp-block-meta-icon\"><span class=\"ultp-block-author ultp-block-meta-element\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n  <circle cx=\"12\" cy=\"7\" r=\"4\" stroke=\"currentColor\" stroke-linejoin=\"round\" stroke-width=\"1.5\"\/>\n  <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M4 21v-3a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v3\"\/>\n<\/svg>\n<a class=\"\" href=\"https:\/\/codingfix.com\/author\/60dinf1i6s\/\">Marco Gasi<\/a><\/span><span class=\"ultp-block-date ultp-block-meta-element\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n  <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M3 5.5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-14ZM8 2v3m8-3v3M3 9h18\"\/>\n<\/svg>\nFeb 16, 2026<\/span><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"pagination-block-html\" aria-hidden=\"true\" style=\"display: none;\"><\/div><\/div><\/div>\n <\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":3784,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_gspb_post_css":"#gspb_row-id-gsbp-f81e93c{justify-content:space-between;margin-top:0;margin-bottom:0;display:flex;flex-wrap:wrap}#gspb_row-id-gsbp-f81e93c>.gspb_row__content{display:flex;justify-content:space-between;margin:0 auto;width:100%;flex-wrap:wrap}.gspb_row{position:relative}div[id^=gspb_col-id]{box-sizing:border-box;position:relative;padding:var(--gs-row-column-padding, 15px min(3vw, 20px))}body.gspb-bodyfront #gspb_row-id-gsbp-f81e93c>.gspb_row__content{max-width:var(--wp--style--global--wide-size, 1200px)}#gspb_col-id-gsbp-62df549.gspb_row__col--12{width:100%}@media (max-width:575.98px){#gspb_col-id-gsbp-62df549.gspb_row__col--12{width:100%}}","footnotes":""},"categories":[146,34],"tags":[],"post_folder":[142],"class_list":["post-3751","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ddev","category-other-stuff"],"_links":{"self":[{"href":"https:\/\/codingfix.com\/wp-json\/wp\/v2\/posts\/3751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codingfix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codingfix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codingfix.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/codingfix.com\/wp-json\/wp\/v2\/comments?post=3751"}],"version-history":[{"count":9,"href":"https:\/\/codingfix.com\/wp-json\/wp\/v2\/posts\/3751\/revisions"}],"predecessor-version":[{"id":3896,"href":"https:\/\/codingfix.com\/wp-json\/wp\/v2\/posts\/3751\/revisions\/3896"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codingfix.com\/wp-json\/wp\/v2\/media\/3784"}],"wp:attachment":[{"href":"https:\/\/codingfix.com\/wp-json\/wp\/v2\/media?parent=3751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codingfix.com\/wp-json\/wp\/v2\/categories?post=3751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codingfix.com\/wp-json\/wp\/v2\/tags?post=3751"},{"taxonomy":"post_folder","embeddable":true,"href":"https:\/\/codingfix.com\/wp-json\/wp\/v2\/post_folder?post=3751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}