WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Help - Minify not working when uploaded to CDN (5 posts)

  1. kfawcett
    Member
    Posted 3 years ago #

    I'm having an issue where my minify settings are not working once I turn on the CDN.

    Any ideas?

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. kfawcett
    Member
    Posted 3 years ago #

    I've found the problem, although I'm not sure how to fix it. I'm running WP Multisite.

    I have folders for each site's files (static-site1, static-site2, etc.) on my CDN site (static.mycdnsite.net) for each website to pull it's static files from. Each of these folders are directly below the public_html folder. So it's public_html/static-site1, public_html/static-site.

    For site1 and site2, on my CDN settings in W3 Total Cache, I have static-site1 and static-site2 as my FTP paths. They both pass FTP server test.

    Here's the weird part...

    When I look at the source code for the file being hosted on the CDN they show like this:
    http://static.mycdnsite.net/wp-content/w3tc-sitetemplate.tawesome.com/min/cea9af/default.include.1731890067.css

    When I try to go to the link to view the file, I get a 404 error because the link is missing the folder static-site before wp-content. So it should look like this:

    http://static.tawesome.net/static-site1/wp-content/w3tc-sitetemplate.tawesome.com/min/cea9af/default.include.1731890067.css

    How can this be corrected?

  3. kfawcett
    Member
    Posted 3 years ago #

    This is affecting all files that are uploaded to the CDN (ie. images, etc.)

    Not sure why it's unable to traverse down to the proper directory.

  4. kfawcett
    Member
    Posted 3 years ago #

    As per a discussion with Fredrick. Custom URLs (ie. any directory other than the root directory is not supported for Self-hosted CDNs). So if you're running multisite with multiple subdomains and only one CDN all of your files will need to go in the root directory (public_html for me) in order it to work.

    I'm thinking about creating a different CDN for every sub-domain so I can have some separation of files between domains.

  5. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    I'm thinking about creating a different CDN for every sub-domain so I can have some separation of files between domains.

    That's exactly what must be done.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic