Support » Plugin: WP Super Cache » [Plugin: WP Super Cache] CDN support breaks setting WP_SITEURL in wp-config

  • I have these line in my wp-config.php to dynamically set the blog URL based on the http request.

    define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] );
    define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] );

    The purpose of this is to enable a staging server… whatever URL you use to connect to the site, all the links to stylesheets etc will be to the same server.

    A recent update to WP Super Cache broke this. It’s the CDN functionality. The CDN assumes that it knows your site URL. Also it is turned on by default.

    Setting the CDN include_dirs to a nonsense value is a good workaround. I’m not sure what the best fix would be… Not enabling CDN support by default would be a good start, and having a checkbox to enable it in the settings.

    http://wordpress.org/extend/plugins/wp-super-cache/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Donncha O Caoimh

    (@donncha)

    The next version will have an on/off switch but why not just set the cdn URL to the same one you’ve set in the config file?

    Can you do that in the UI? I think the default should match the rest of WP and use $WP_SITEURL.

    Putting in a non-existant directory to include_dirs is a fine workaround which basically disables it.

    Plugin Author Donncha O Caoimh

    (@donncha)

    Yeah, it has an on/off switch in the UI now. Try the development version if you want to see.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Super Cache] CDN support breaks setting WP_SITEURL in wp-config’ is closed to new replies.