Is there a way to get path to the root plugin folder as a remote URL instead of a local path.
For Example:

Instead of: c:\xampp\htdocs\wordpress\wp-content\plugins\my_plugin\

I want to get: localhost/wordpress/wp-content/plugins/my_plugin/

Is there a way to get the 'web' path instead of local one?

1 Answer 1


Check out the plugins_url() and plugin_dir_url() functions.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.