Support » Plugin: W3 Total Cache » W3 Total Cache, Multi-site blogs.dir, Donncha Mapping and Amazon CloudFront CDN

  • I’m using all these plugins together, and I’m having a hard time figuring out how to get my individual site’s attachment files served via the CDN.

    When I click on upload attachments, it successfully upload the files to CloudFront in my S3 bucket, but they are inside a directory called /files, so all the attachments from all my sites end up in the same directory, rather than in, say, /wp-content/blogs.dir/24/files

    Is this the intended behavior? It seems like there is a big potential problem with duplicate filenames from multiple sites.

    Or have I got something misconfigured

Viewing 8 replies - 1 through 8 (of 8 total)
  • Does anyone know what the intended behavior is on this topic? Is it possible to use W3 Total Cache with CloundFront on a Multi-Site install successfully?

    There seems to be a widespread misunderstanding out there:

    In order to use w3 total cache with Amazon Cloudfront, it is not necessary to create a S3 bucket beforehand. This I know for sure, because I use cloudfront successfully without S3. Please try the following:

    1. Create a new cloudfront distribution. As a source, do not use a S3 bucket, but enter the necessary data from your hosting provider/website
    2. Select Cloudfront in the CDN tab
    3. use the new distribution

    Hi @wp-fan, thank you. I think I had been guided in the direction of using an S3 bucket by the W3TC documentation itself. Regardless, it works fine. My only issue is about multi-site’s blogs.dir/files path issue, and how it translates to the CDN. I don’t think that using or not using an S3 bucket would have any bearing on that, do you?

    Hi @leggo-my-eggo, when I wrote my posting above I already had in mind that my suggestion doesn’t necessarily tackle your challenge directly. But I have it in my guts this might work nevertheless.

    You could give it a try and see wether Cloudfront shows a different behavior when skipping the misleading S3 bucket. It won’t take long to implement and you can always switch back with a few mouseclicks.

    I am currently struggling with this same issue, as I have an S3 account but not a Cloudfront account. I’ve been messing with some filters to append the blogs.dir info when uploading and when retrieving images. Still trying to hash out the details, but it certainly seems like something that the plugin should do by default.

    I solved the problem by enabling site-specific W3 Total Cache settings (in the network control panel for W3TC) and giving each site their own bucket. Not ideal for my situation, but it works.

    Ugh. I’d really like to avoid that, @brettgfitzgerald, although I certainly understand why you’d want to do it.

    Enable “Host custom files”

    Then scroll down to the “Custom Files List”. Add the following to upload all blog.dir directories to the CDN:


Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘W3 Total Cache, Multi-site blogs.dir, Donncha Mapping and Amazon CloudFront CDN’ is closed to new replies.