Title: plugin_dir_url() breaks with symlinks
Last modified: August 30, 2016

---

# plugin_dir_url() breaks with symlinks

 *  [theMikeD](https://wordpress.org/support/users/themiked/)
 * (@themiked)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/plugin_dir_url-breaks-with-symlinks/)
 * The docs suggest that getting the plugin url is done using
 * plugin_dir_url( __FILE__ );
 * But this doesn’t work when the plugin folder is a symlink, because “__FILE__ 
   is the full path and filename of the file with symlinks resolved” ([http://php.net/manual/en/language.constants.predefined.php](http://php.net/manual/en/language.constants.predefined.php))
 * Anyone know of a way around this?

The topic ‘plugin_dir_url() breaks with symlinks’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [theMikeD](https://wordpress.org/support/users/themiked/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/plugin_dir_url-breaks-with-symlinks/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
