I use WordPress Studio for almost all my WordPress development. It gives me clean, disposable environments with a predictable folder structure — ideal for a fast, modern workflow. One simple technique makes it even better: symlinking your plugin’s development folder directly into the WordPress installation.
This avoids copying files, prevents version drift, and keeps everything clean inside Git.
Here’s the workflow, how to manage symlinks safely, and a small convenience trick to bring the correct debug.log into your plugin folder.
Table of Contents
- Why symlinking your plugin folder improves development
- Why this works perfectly with WordPress Studio
- How to symlink a plugin folder (and how to remove it safely)
- Checking where a plugin folder is symlinked
- Linking the related
debug.logfrom where you’re testing the plugin - Make it nicer with a VS Code extension
- Clean your symlinks
- Wrap-up
Why symlinking your plugin folder improves development
Instead of maintaining two copies of your plugin (one in Git, one in WordPress), you link WordPress to your development folder:
wp-content/plugins/my-plugin → /path/to/your/git/repo/my-pluginBenefits:
- Only one plugin folder to maintain
- WordPress loads your development version instantly
- No copying or syncing files
- Git branches instantly change the live plugin
- Cleaner, faster development
This is especially good when iterating quickly or debugging tricky code.
Why this works perfectly with WordPress Studio
Studio creates WordPress sites using a simple, consistent layout:
studio-site/wp-content/plugins/Because the structure is predictable, symlinking always works as expected. You keep your plugin code wherever you want, and Studio loads it directly through the symlink. No special configuration, no surprises.
How to symlink a plugin folder (and how to remove it safely)
1. Create the symlink
Inside the WordPress Studio site:
cd path/to/studio-site/wp-content/plugins
ln -s /path/to/your/plugin/folder my-pluginOr directly:
ln -s /absolute/path/to/plugin /absolute/path/to/studio/wp-content/plugins/my-pluginCheck it:
ls -lYou should see:
my-plugin -> /Users/you/Projects/my-plugin2. Remove the symlink safely
To delete only the symlink:
rm my-pluginor:
unlink my-plugin⚠️ Warning
- Never include a trailing slash
rm my-plugin/targets the real plugin folder, not the symlink. - Never use
rm -rfon a symlink
It follows the link and deletes your actual plugin — including your Git repo.
Stick to rm my-plugin or unlink my-plugin exactly.
Checking where a plugin folder is symlinked
When working with WordPress Studio and symlinked plugins, it’s often useful to check where a given plugin folder actually points to.
Since your development folder is the target of the symlink (not the symlink itself), you can’t detect this from inside the folder. But you can scan your Studio sites to find any matching symlinks.
Here’s a small helper script, that assumes all Studio installations are under:
/Users/juanmanuelgarrido/STUDIO/…and reports every symlink that points to your current plugin folder.
Create the following check-wp-link.sh script in ~/bin and make it executable (chmod +x check-wp-link.sh).
#!/usr/bin/env bash
# Replace this with your WordPress Studio folder
# (where WP installations folders are created)
STUDIO_DIR="/Users/juanmanuelgarrido/STUDIO"
TARGET="$(pwd -P)"
TARGET_SLASH="$TARGET/"
echo "Searching for symlinks pointing to:"
echo " $TARGET"
echo ""
results=$(find "$STUDIO_DIR" \
-maxdepth 4 \
-path "*/wp-content/plugins/*" \
-type l \
\( -lname "$TARGET" -o -lname "$TARGET_SLASH" \) \
-print)
if [[ -z "$results" ]]; then
echo "No Studio site is currently linking this plugin."
else
echo "Symlinked from:"
echo "$results" | sed 's/^/ /'
fi- Replace
/Users/juanmanuelgarrido/STUDIO/with the path where WordPress Studio is creating your WP folders - make sure
~/binis in your PATH (add to~/.zshrcor~/.bashrcif needed):
export PATH="$HOME/bin:$PATH"Once the script is created, with the right permissions, and in your system’s PATH, run it from inside your plugin folder:
check-wp-link.shIf your plugin is linked into a Studio site, you’ll see:
Symlinked from:
/Users/.../STUDIO/site-name/wp-content/plugins/your-pluginThis gives you a fast, reliable way to confirm exactly which Studio environment is using your plugin.
Linking the related debug.log from where you’re testing the plugin
When your plugin is symlinked into a Studio site, WordPress writes logs to:
studio-site/wp-content/debug.logYou can link this log manually in your plugin’s folder for quick access and checking:
cd /path/to/your/plugin
ln -s /path/to/studio-site/wp-content/debug.log debug.logThis keeps the log right next to your code — useful when debugging.
If you symlink debug.log from another path, do not forget to add debug.log to .gitignore to avoid Git to track the symlink
Make it nicer with a VS Code extension
If you use VS Code, pair this setup with an extension such as Log File Highlighter. It gives you:
- color-coded log messages
- cleaner timestamps and stack traces
- live updates as WordPress writes to the file
- an easier debugging experience overall
With the symlink plus highlighting, your plugin folder becomes your full development environment — code and logs together in one place.
Clean your symlinks
If your plugins’ folder starts filling up with symlinks, you can clean them out quickly by running this command directly from inside that folder:
find . -maxdepth 1 -type l -print -deleteWrap-up
Symlinking your plugin folder makes WordPress development faster, simpler, and far more Git-friendly. Add the small debug.log symlink trick, and debugging becomes much smoother too.
Leave a Reply