
If you’ve been building for the Divi ecosystem lately, you know the challenge. We are currently in a ‘dual-world’ phase. We have Divi 4, the reliable workhorse, and Divi 5, the lightning-fast, Gutenberg-compatible future currently in beta.
When I was updating my plugin, WP Rename Divi Projects – which lets users rebrand Divi’s ‘Projects’ custom post type into something more semantic like ‘Books’ or ‘Properties’ – I hit a challenge. I needed to ensure the code worked perfectly on both versions of Divi without constantly switching Git branches or, worse, manually copying files back and forth.
I wanted:
- One ‘single source of truth’ directory with my plugin code
- One Visual Studio Code window
- Two live WordPress sites
Here is how I set up a seamless Windows 11 development environment using a hidden gem of the filesystem: Junctions.
The development stack
- OS: Windows 11 Home
- Editor: Microsoft Visual Studio Code
- Local dev: WordPress Studio
- The secret sauce: Windows directory Junctions
The architectural problem
Normally, if you have two sites in WordPress Studio (one for Divi 4 and one for Divi 5), they exist in separate folders on your C: drive. So, if you want to test your plugin on both, you usually have to maintain two copies of the code.
That’s a recipe for disaster! You fix a bug in the Divi 4 site, forget to copy it to the Divi 5 site, and suddenly you’re debugging old code.
The solution: directory Junctions
I kept my actual development code in D:\GitHub\wp-rename-divi-projects. To make WordPress think the plugin was actually inside its own /wp-content/plugins/ folder, I used a Junction.
A Junction is like a shortcut on steroids. To the Windows API and WordPress, the junction is the folder. It doesn’t just point there; it acts as if the files are physically present in both locations.
Step 1: Setup
- Open Command Prompt as an Administrator (this is crucial for mklink).
- Navigate to your WordPress Studio plugin folders.
- Run the following commands (adjusting for your actual usernames/paths):
For the Divi 4 site:
mklink /J "C:\Users\Username\Studio\divi-4\wp-content\plugins\wp-rename-divi-projects" "D:\GitHub\wp-rename-divi-projects"
For the Divi 5 Beta site:
mklink /J "C:\Users\Username\Studio\divi-5-beta\wp-content\plugins\wp-rename-divi-projects" "D:\GitHub\wp-rename-divi-projects"
Step 2: Workflow
Once the junctions are created, the magic happens:
- Activate the plugin in both WordPress dashboards.
- Open the D: drive folder in Visual Studio Code. (I created a workspace with only the GitHub folder with my plugin code.)
- Code using Visual Studio Code and the Codex AI (GPT 5.3) extension. Because there is only one source of truth, the AI indexing is flawless—no duplicate file confusion.
- Save once. Refresh both sites. The changes are instant on both versions of Divi.
Why this beats branching
While Git branches are great for features, they are annoying for simultaneous environment testing. With this setup:
- Zero file copying: You never hit Ctrl+C and Ctrl+V between folders.
- Real-time feedback: You can see how a PHP 8.x function or a specific Divi 5 hook behaves immediately after typing it.
- Clean Version Control: Your Git history stays tidy because you aren’t fighting with local path differences.
The result
This setup transformed a potentially messy upgrade process into a streamlined, professional workflow. If you are a developer on Windows juggling multiple PHP versions, CMS versions, or in this case, the massive leap from Divi 4 to 5, stop copying files. Start using junctions.
It’s stable, it’s fast, and it’s exactly how a modern Windows dev environment should feel.
How to safely remove a Junction
When you have finished testing your plugin against both Divi 4 and Divi 5 and you want to ‘unplug’ the connection without touching your actual code on the D: drive, follow these steps:
The safe Command Line method
Open your Command Prompt (you don’t usually need Admin just to delete a junction you created, but it doesn’t hurt) and use the rmdir command.
Even though it looks like a folder, Windows treats the junction as a directory link, so we ‘remove the directory’ link like this:
rmdir "C:\Users\Username\Studio\divi-4\wp-content\plugins\wp-rename-divi-projects"
Why this is safe
- rmdir on a junction only deletes the link.
- It does not touch the files in D:\GitHub\wp-rename-divi-projects.
- Your Git repository remains perfectly intact.
How to tell it’s a Junction in File Explorer
If you are ever unsure whether a folder is a real folder or a junction, look for the small curved shortcut arrow on the folder icon in Windows File Explorer.

In the “Type” column of File Explorer, it may still say File folder, but if you run the dir
command in the parent directory via Command Prompt, you will see <JUNCTION> listed next to the name instead of <DIR>.
Final thoughts
By using Junctions, you aren’t just working harder; you’re working according to the DRY (Don’t Repeat Yourself) principle – not just in your code, but in your entire filesystem architecture.
It allows you to stay focused on one set of files, keeps your Git history clean, and lets you toggle between Divi 4 and Divi 5 environments as fast as you can hit refresh.