,

A practical symlink workflow for plugin development with WordPress Studio

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

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-plugin

Benefits:

  • 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.

Inside the WordPress Studio site:

cd path/to/studio-site/wp-content/plugins
ln -s /path/to/your/plugin/folder my-plugin

Or directly:

ln -s /absolute/path/to/plugin /absolute/path/to/studio/wp-content/plugins/my-plugin

Check it:

ls -l

You should see:

my-plugin -> /Users/you/Projects/my-plugin

To delete only the symlink:

rm my-plugin

or:

unlink my-plugin

⚠️ Warning

  • Never include a trailing slash
    rm my-plugin/ targets the real plugin folder, not the symlink.
  • Never use rm -rf on 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 ~/bin is in your PATH (add to ~/.zshrc or ~/.bashrc if 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.sh

If your plugin is linked into a Studio site, you’ll see:

Symlinked from:
  /Users/.../STUDIO/site-name/wp-content/plugins/your-plugin

This gives you a fast, reliable way to confirm exactly which Studio environment is using your plugin.

When your plugin is symlinked into a Studio site, WordPress writes logs to:

studio-site/wp-content/debug.log

You 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.log

This 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.

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 -delete

Wrap-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

Navigation

About

Writing on the Wall is a newsletter for freelance writers seeking inspiration, advice, and support on their creative journey.

Discover more from JuanMa Codes

Subscribe now to keep reading and get access to the full archive.

Continue reading