[wp-hackers] plugins_url function

John Blackbourn johnbillion+wp at gmail.com
Tue Dec 13 15:00:15 UTC 2011


On 13 December 2011 14:30, Phillip Lord <phillip.lord at newcastle.ac.uk> wrote:
> Okay, that's not ideal for me. In practice, I think it's easier to
> unwind the symlinks -- or just turn them around, so that the real
> directory is under wp-content/plugins then I symlink to this for ease.

Yeah reversing the symlinks can work, depending on the situation. More
commonly though I'll have a plugin in one central location which I
want to symlink to multiple installs.

Out of interest, what do you mean by unwinding the symlink? If you
mean resolving the symlink, then unfortunately it can't be done in PHP
(see Otto's PHP bug link).

Re-reading your first email - If you're keeping all of your plugins in
a separate directory then you can just define the WP_PLUGINS_DIR and
WP_PLUGINS_URL constants so they point at your ~/wordpress-plugins
directory, and then you don't need to bother with symlinks at all. I
do this on my dev box where I have many WordPress installs and just
one directory that contains the plugins.

John


More information about the wp-hackers mailing list