The wp-content/advanced-cache.php file is generated automatically when you activate Quick Cache. If you move from one server to another, you need to deactivate and reactivate Quick Cache to have that file regenerated with the proper settings.
If you still have trouble, try clicking the “Restore” button in Quick Cache.
Could you define it as:
define(‘QUICK_CACHE_PLUGIN_FILE’, WP_CONTENT_DIR + ‘/plugins/quick-cache/quick-cache.php’);
That would have completely resolved the issue. And seems good practice.
I see you’re using an older version of Quick Cache. This was actually already fixed in v140829:
Enhancement: Improved portability of advanced-cache.php. This will help reduce configuration overhead for site owners when migrating a WordPress installation from one server to another. See #258.
@raam, You said “I see you’re using an older version of Quick Cache”
I’m not sure what you are basing that statement on. I pulled QC down a week ago. It’s v141001. It didn’t work for me.
I’m not sure what you are basing that statement on. I pulled QC down a week ago.
Oh, sorry. I saw “@since 140725” in the code you originally posted and I assumed you were running v140725, but I realize now that you pasted the PHP Docblocks, which have version numbers that don’t change from release to release.
It’s v141001. It didn’t work for me.
You can see the relevant code here, where the QUICK_CACHE_PLUGIN_FILE value inside advanced-cache.php file gets set.
The only time it doesn’t include WP_CONTENT_DIR in the advanced-cache.php file is when, during installation of the advanced-cache.php file Quick Cache finds that your plugin file path (i.e., the path to Quick Cache) does not contain the value of WP_CONTENT_DIR (which, generally, should never happen, since plugins should live inside WP_CONTENT_DIR/plugins/).
It sounds like this issue may be related to your development environment.
Plugins are under wp_content
A more likely reason …
If you are referring to add_advanced_cache
if(strpos($this->file, WP_CONTENT_DIR) === 0)
$this->file has Windows \ in path
WP_CONTENT_DIR was defined with /
$this->file has Windows \ in path
WP_CONTENT_DIR was defined with /
Ah, yes, that sounds like the issue then.