-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins and themes can't be symlinked #20
Comments
If there is support for symlinks was also one of my first thoughts when I installed Studio. Unfortunately, symlinks do not (yet) work. This would be a big plus for Studio. |
Upvote! |
Really need this working. |
@AndrewBrightbulb We are in planning phases for this now, in fact! We'll ping on this issue when we have a build for you to test out. |
Hi, |
Hey @AndrewBrightbulb, I've tested version 1.1.3 and I confirmed that symlinks are working on my side. I wonder if you could share your case so we can take a look and try to debug it. Thanks 🙇 ! As an example, I symlinked the Gutenberg plugin for development:
|
I can confirm this is working for me in version 1.1.3 on macOS. Thank you! |
Hmm, it seems if a symlinked theme is activated and the site is stopped in Studio, when the site is restarted it goes back to the default theme. This does not happen if using a theme that is not symlinked. |
I was able to symlink plugins and themes. But it's true that the symlinked themes is replaced by the default one when restarting the site server. I've also experienced the same issue when just changing the window focus to Studio. It seems that the logic that captures the home screenshot resets the theme to the default one. default-theme-symlink-studio.mp4 |
I've identified where the error comes from, but I don't have a solution. It seems that when we run a PHP code or WP-CLI command by spawning a new child process in Commenting these two focus hooks, I can see the selected theme persists. Although stopping and starting seems to reset it some times. studio/src/hooks/use-chat-context.tsx Lines 133 to 142 in 587292a
studio/src/hooks/use-theme-details.tsx Lines 75 to 81 in 587292a
|
What
I would love to be able to symlink plugins and themes.
Why
As a plugin developer, I often spin up new sites to reproduce specific scenarios, discover edge cases, etc and I would like to be able to symlink plugin(s) into my studio managed sites so that I can use a canonical version of the plugin(s) on my machine across different studio sites.
How
I would like to be able to :
navigate to the plugins directory of my studio site:
cd ~/Studio/site-name/wp-content/plugins
symlink a plugin I have on my machine into the site:
ln -s ~/path/to/my/plugin
Activate the symlinked plugin in my studio site
Currently, I can symlink a plugin into the plugins directory and it shows properly symlinked on my machine, but the WP admin does not show the symlinked plugin as an available plugin to activate.
The text was updated successfully, but these errors were encountered: