Using Junctions for multi-environment WordPress development

Alt text: Editorial-style illustration of a Windows 11 development workbench where a central ‘plugin code’ crate (D:\GitHub\wp-rename-divi-projects) connects via ‘JUNCTION’ pipes to two WordPress site boxes labelled ‘Divi 4’ and ‘Divi 5 beta’, with callouts ‘Single source of truth’ and ‘no copying’ and a Visual Studio Code window above.
One plugin code directory being pulled into two WordPress environements for testing

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.

Continue reading Using Junctions for multi-environment WordPress development