Hello @williamews
Thank you for reaching out and I am happy to help.
Can you please share what is the error you are getting?
Also, this is not correct way to fefine this, using the abs path.
You can define the W3TC_CACHE_DIR
in wp-config.php. We check and then default to:
define( 'W3TC_CACHE_DIR', WP_CONTENT_DIR . '/cache' );
Thanks!
@vmarko Thanks for the support.
I think the reason your suggestion is not working is because the “cache” folder is not in “WP_CONTENT_DIR “. It’s completely outside of the WordPress installation. But I think in your suggestion, W3 Total Cache looks for the “Cache” directory in “wp-content”, which in this case is not the one hosting the “cache” directory.
Hello @williamews
I am not sure if this can work. I’ll have to check this more and let you know once I can confirm this
Thanks!
Hello @williamews
W3TC treats W3TC_CACHE_DIR
like it’s in the filesystem and not external.
Maybe you can try fuse
or davfs2
.
httpfs https://cache.example.com/pathtocachfolder/cache wp-content/cache
mount -t davfs https://cache.example.com/pathtocachfolder/cache wp-content/cache
I hope this can help understanding this
Thanks!
@vmarko I haven’t tried “fuse
or davfs2
” yet…
But, with the previous path change, this is the error we get… And it seems if redirect to the correct path can be done it may work because W3 Total Cache seems to be able to recognize where the “cache” folder is located, but is not able to write into it…
“W3 Total Cache Error: Files and directories could not be automatically created to complete the installation.
Please execute commands manually
or use FTP form to allow W3 Total Cachemake it automatically.
Execute next commands in a shell:
mkdir https://cache.example.com/pathtocachefolder/cache
chmod 777 https://cache.example.com/pathtocachefolder/cache”
However, the path to the “cache” exists and is correct. And when I try to execute the above commands, I get the error, “folder or directory does not exist.” To test something… I manually created the folder “cache” in the destination folder, but W3 is still not able to write into it. 🙂
A little tricky.
Hello @williamews
Thank you for your feedback.
This seems to be related to the files and folder permissions on your server, so you should also doublecheck this. If the files are not added by the W3TC it means taht the permissions are not set correctly
Thanks!