Support » Plugin: W3 Total Cache » [Plugin: W3 Total Cache] CDN and NextGEN Gallery

  • Resolved Ricardo


    I’m running a site network with WP 3.0.3 Multisite, using NextGEN Gallery for image galleries and slideshows, and W3 Total Cache for performance.

    Since images are eating most of my bandwidth, I’m thinking about setting up a CDN service. I gave the self-hosted option of W3 Total Cache a quick try and couldn’t get it to work, but more importantly, couldn’t find a way to upload NextGEN images and SWF files to the CDN. Are they supposed to be uploadable? Did I do anything wrong?

    By the way, an idea crossed my mind. Wouldn’t it be easier just to configure the blogs.dir directory to be hosted in the CDN? That way files would be directly uploaded and downloaded from there.

    Any help will be appreciated, I’m new to CDNs 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ll answer myself, in case anyone runs into the same issue and wants to know the answer. In order to upload NextGEN Gallery images to the CDN when using WP Multisite, you have to add


    (replace %BLOG_ID% with the actual blog ID) to the custom file list that can be found in the CDN options. That was the easy one 🙂

    I still couldn’t get it to work properly, but at least I know why. I configured a CNAME called “static” in my main domain and pointed it to the FTP account I was using as CDN: -->

    That changed all image references in the HTML to, but when trying to access those URLs I get 404 errors. I suppose that’s because the FTP account I’m using for trying purposes is a plain one and doesn’t have URL redirects or any other type of CDN configuration.

    Images used by Image Rotator are still called from the main domain, probably because that imagerotator.swf gets the image URLs from a XML file generated at


    and the URLs contained there don’t point to the CDN. I’ll probably need to modify that file in order to use the CDN domain setting from W3 Total Cache if the CDN option is activated.

    What do you guys think about all this? Would you tell me if I’m pointed to the right direction? I’ll be implementing this live with Amazon S3 or CloudFront (probably CloudFront), but I’d like to know as much as I can before I do.

    Thanks for taking the time to read 🙂

    Never used or worked on CDN, so I don’t know what hacks are needed for S3 or Cloudfront. Sorry can’t help out for now…

    Plugin Author Frederick Townes


    Are you using a custom gallery path for NGG? The default path is already in the settings you simply have to enable auto-upload feature.

    FYI, the self-hosted CDN feature will improve the render performance of your pages, but will not reduce load on your server.

    Alex: don’t worry, it seems to be simple. I’m not implementing this right now, but when I do I promise to post my results here in case anyone else should need them.

    Frederick: the default path you included only works for single-site WP installations, not multisite. The default path for multisite installations is wp-content/blogs.dir/%BLOG_DIR%/files/gallery/ (you need to replace %BLOG_ID% with the actual current blog ID in order for this to work). Regarding self-hosted CDNs, I knew that, I was just testing the feature before going live with it.

    Thank you both for your time!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: W3 Total Cache] CDN and NextGEN Gallery’ is closed to new replies.