Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter floatingio

    (@floatingio)

    The basics are accomplished by defining WP_SITEURL in wp-config.php based on $_SERVER[‘HTTP_HOST’]. Then I have a custom plugin (“fio-any-host”) that filters displayed links and such to match everything up.

    The plugin is nowhere near presentable at the moment (for one thing, it’s going to break external links because I didn’t account for them, and I need to fix that). At the moment It filters home_url and upload_dir, but I’m sure I’ll find something I missed at some point. 🙂

    Thread Starter floatingio

    (@floatingio)

    Vaguely related.

    I use a plugin that allows my wordpress installation to respond to alternate domain names, which allows me to run the admin section on a firewalled host. Changing the hostname messes with VHP because it needs the canonical one in order to purge the correct pages. The filter available for purge_urls allows me to correct the domain names for purging individual URLs. The purge all doesn’t work without the filter, however, because it tries to purge based on what wordpress believes is its hostname.

    Thread Starter floatingio

    (@floatingio)

    (blah. didn’t mean to double-post, and there’s no delete button.)

    Thread Starter floatingio

    (@floatingio)

    Thanks, much appreciated. 🙂

    Thread Starter floatingio

    (@floatingio)

    (Realized after I posted that the shard scenario won’t work without the postId being passed, which I don’t think is available where that filter is called. Oh well; it was a nice thought anyway. Maybe pass the URL to be purged?)

    Thread Starter floatingio

    (@floatingio)

    I do a lot of environmental management via DNS (including things like database servers, varnish servers, etc.). This allows me to have a single configuration that works in all environments. Adding an environment is as simple as adding it to DNS; I don’t have to make updates in multiple places.

    There are, of course, exceptions — but my environment gets frequently deployed, and keeping the critical stuff like server locations in DNS ensures that fewer mistakes are made.

    I can also see a use for the filter in a sharding situation. If you have multiple varnish instances behind a load balancer, you could easily direct images to one instance, pages to another, posts to a third, or however you want to set it up. The filter would provide a simple mechanism for supporting this in VHP.

Viewing 6 replies - 1 through 6 (of 6 total)