Support » Plugin: WP Super Cache » [Plugin: WP Super Cache] Problem With CDN & CSS

  • Resolved ifoman


    My theme’s CSS files aren’t being read correctly from Amazon CloudFront where I’ve copied my files, so my site doesn’t display correctly. Troubleshooting the problem, if I try to browse a CSS file directly in the browser, it downloads to my computer, rather than being displayed in the browser (which is how I think it should normally behave). If I exclude CSS files from being served using menu option, then all other file types are properly served from the CDN. All the permissions on CloudFront seem to be correct, but those pesky CSS files aren’t being served correctly.

    Second, why should .php files be routinely excluded from CDN delivery, as recommended? Seems like that .php files constitute the bulk of the wp-includes and wp-content directories. What are the consequences of serving .php from the CDN? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Regarding PHP:

    PHP generally is NOT served via CDN. CDN is meant to serve static content, as opposed to dynamic content such as PHP. In fact, CDN servers generally do not process PHP. So, if you are directing PHP URLs to the CDN, the PHP will not be executed. In summary, you’ll have a big mess on your hands.

    So the idea is that your web server handles the dynamic content, while static items are served from the CDN.

    Best regards,

    Mark Bailey

    Plugin Author Donncha O Caoimh


    ifoman – it’s weird that the css files wouldn’t be served from the CDN with the correct headers. I wonder why? Have you found anyone else who had the same general problem?

    Solved – I was uploading files to Amazon S3 with Transmit, a program I’ve used for years. But apparently it wasn’t writing the files correctly. I used Cyberduck to make the FTP transfer, and now everything works as it should.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Super Cache] Problem With CDN & CSS’ is closed to new replies.