Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

define WP_CONTENT_DIR and WP_CONTENT_URL not obeyed #95

Closed
timreeves opened this Issue · 5 comments

3 participants

@timreeves

If you have moved your "wp-content" directory to another location (for security reasons) using the defines in wp-config.php, this modified path is not noticed by Quick Cache - it still makes its own cache by default under wp-content, creating that directory again.
I know I can modify the path by hand before activating Quick Cache - but it would be really neat if it suggested the right path itself...

@jaswsinc
Owner

@timreeves I agree with you.

@raamdev Instead of us hard-coding wp-content/cache, perhaps something like this.

str_replace(ABSPATH, '', WP_CONTENT_DIR).'/cache';
@raamdev
Owner

@timreeves Thanks so much for reporting this! I'll get this fixed in the next release.

@raamdev raamdev added this to the Next release milestone
@raamdev raamdev self-assigned this
@raamdev raamdev closed this
@raamdev
Owner

Reopening this issue because we discovered that WP_CONTENT_DIR is not obeyed in the scenario where it's set to a path outside of ABSPATH. See related discussion on #206.

Also see relevant comment from Jason regarding fixing this by using content_url() instead of site_url():

QC currently doesn't use site_url() much at all anyway, and where it does use it, it's warranted (i.e. for the sitemap location).

I also checked the source code for the HTML Compressor, and it uses both WP_CONTENT_DIR and WP_CONTENT_URL when they are available; so we are already good there too.

I think all that needs to happen here, is that we need to remove wp-content from the base_dir in the QC options array; and replace existing occurrences of ABSPATH with WP_CONTENT_DIR as the new root directory from which to nest everything else into. The method abspath_to() should get renamed to wp_content_dir_to() maybe.

@raamdev raamdev reopened this
@raamdev raamdev modified the milestone: Next Release, v140605
@raamdev
Owner

Assigning this to the Next Release milestone.

@jaswsinc
Owner

This was resolved by the above referenced pull request(s).

@jaswsinc jaswsinc closed this issue from a commit
@jaswsinc jaswsinc Finalizing websharks/zencache#151
Additional work toward achieving websharks/zencache#130
Also resolves websharks/zencache#206
Also resolves websharks/zencache#95
Also resolves websharks/zencache#193
29eaf58
@jaswsinc jaswsinc closed this in 29eaf58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.