Thread Starter
–
(@rickjoe)
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
wp-content/blogs.dir/%BLOG_ID%/files/gallery/*
(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:
static.maindomain.com --> ftp.cdndomain.com
That changed all image references in the HTML to static.maindomain.com, 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
/wp-content/plugins/nextgen-gallery/xml/imagerotator.php
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…
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.
Thread Starter
–
(@rickjoe)
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!