WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using a plugin which has several instances where it is using a hardcoded path rather than using the WP function to find a path. The problem here is that it's referring to wp-content but I've changed the WP_CONTENT_FOLDERNAME setting in the wp-config file (there was a past requirement to do that).

Anyways, is there a way to achieve this without updating the plugin codebase itself (i.e. allow it to be upgradable in the future). I guess this goes with the whole idea of extending a plugin without having to edit the codebase.

share|improve this question

The plugin developer might include the changes into the core plugin if you submit the changes or offer a patch. You can't be the only one out there with the issue.

share|improve this answer

The Codex has a very useful page on Determining Plugin and Content Directories which looks like it may be just what you're after.

share|improve this answer

Not that I know of, this is the very reason why hardcoding this into a theme or plugin is bad. I think your best option is to fork it using git/hg then merge any new changes yourself, which is not always practical.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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