ncdb
Forum Replies Created
-
If it helps, this is where it seems to go wrong:
$base_urls[] = substr_replace( $base_url, $match_domain, 2, strlen( $curr_domain ) );In my case:
$base_url is “//localhost:8000/wp-content/uploads”
$match_domain is “www.mydomain.com”
$curr_domain is “localhost”`So the result is “//www.mydomain.com:8000/wp-content/uploads”
Thanks for the reply.
We’re on 2.2.1 but on reflection, perhaps this has always happened and we just used the workaround (serve on port 80) before. But with the email about breaking changes / one-way upgrade, this time it’s getting a more thorough test than I’d usually do!
We need the production domain to be recognised as local because we don’t make any changes to the database when cloning to local and staging sites.
By simply adding the production domain with the as3cf_local_domains filter, the plugin can replace all our productiondomain.com/wp-content/uploads images with their CDN URLs – regardless of whatever hostname and whatever port the developer has chosen to serve their local test copy under, and without the need to run any migration scripts on the database.