Wordpress plugin development, symlink not working
Asked Answered
V

1

6

It used to works before maybe a year ago. now i'm trying to build new plugin using symlink. but wordpress not detecting that symlinked plugin.

i tried ln -s /plugin-source/ /site/wp-content/plugins/plugin-name i've also tried using 'sudo ln'. but it's not showing in wordpress plugin. when i copy it directly it works fine. anyone know why symlinked plugin not detected by latest wordpress? Thanks!

Update

answer below works. in my case it was osx not letting wordpress to access symlinked pluging from my desktop (not sure what's reason). so i move it to htdoc directory and it worked fine.

Vociferation answered 13/6, 2021 at 8:17 Comment(3)
How did you add your path? Did you use the relative path? If you can mention the plugin source path exactly the way you put it, that would help.Paleography
yes i did it like ln -s ~/Desktop/wp_plugins/plugin-name/ /Applications/MAMP/htdocs/site/wp-content/plugins/plugin-nameVociferation
it does create symlink in plugin directory but wordpress is not showing that plugin in admin plugin pageVociferation
P
3

According to your comment, it seems to me that you have tried to add it as a relative path. You should be able to make it work using the absolute path.

sudo ln -s /Users/username/Desktop/wp_plugins/plugin-name /Applications/MAMP/htdocs/site/wp-content/plugins/plugin-name

Replace username with your username. It should be able to fix your problem.

Paleography answered 14/6, 2021 at 3:5 Comment(3)
i tried it. but as before it creates symlink inside plugins directory. but wordpress is not showing it in admin plugins.Vociferation
it looks like wordpress can't access plugin symlink to my desktop( even sudo didn't help). i've move it to htdoc and now it works fine. not sure if OSX have made changes to file permissions. anyway thanks @Tharindu PramudithaVociferation
Thanks for a second there I was like OMG it is not really supported! turns out the stupid macos's make alias GUI makes it relativeFramboise

© 2022 - 2024 — McMap. All rights reserved.