I know it works for you. It doesn’t work for more people.
There are a handful of people who seem to be okay with it… I’m thinking I’ll have to put in an override for you, with a bunch of ‘If this breaks your site, I warned you!’ notices. The problem is if it DOES break, it’s hard to fix :/
How exactly is it changing the URLs? Could a simple search and replace for every image on the database fix this for me or is it using a filter to swap the urls?
It replaces it on upload. It runs through an annoying complicated series of checks, in order of priority. In the middle, it checks if you have a custom CDN and are NOT SSL, and only then will allow the change. So right now, you’d have to manually change it all every time, or I’ll have to think up a work around for the handful of people like you.
I do want to restrict this because I had far more complaints about SSL breaking than I’ve had about being annoyed by this change. Bit of a rock and a hard place there!
You know, if I’m willing to do a search/replace on my whole database and I also tend to s3cmd sync once in a while, I probably ought to just do it manually and disable the plugin I’m thinking. Easier for you and I can just put the search/replace in a shell script that runs every time I update.
If you’re command-line zippy, then you can two-step it. Or one step it.
Have a script that does this:
1) s3cmd sync
2) wp search-replace 'yourdomain.com/wp-content/uploads/' 'adatel-cdn.objects.cdn.dream.io/wp-content/uploads/
Then put the script in a morning cron-job on the server. It won’t be as on-demand, but it would work.
We talked about this once before, but I use Git to update my site and it runs a hook (shell script) that upon completion of the git process changes some things in the database. I’d just add a line to search/replace everything.
Is that wp search-replace and actual command?
The command is missing an end apostrophe but this is how it works:
wp search-replace 'OLDURL' 'NEWURL'
So if your default URL is yourdomain.com and you only want to change the URLs for images then it’s this:
wp search-replace 'yourdomain.com/wp-content/uploads/' 'yourcdn.com/wp-content/uploads/'
You have to be as specific as possible otherwise you could replace things you didn’t mean to.
I will consider that, it seems easier than any sed or mysql query I could run.