Ok so essentially everything works but the ‘featured image’ it’s still asking for the wrong image and I’ve removed and re-added it. Still asking for the objects.dreamhost files.
Ugh, so it’s just the theme, have to regenerate the whole media file and thumbnails to get it URL to change and the theme to grab the right sized image.
Ok so ignore everything I posted above, it still applies, but now I have more insight into what’s going on. There is no problem per se, just my own OCD looking at mismatched urls.
I have the plugin set to use the dream.io url scheme and it works on all the images in all the posts like it should.
All the featured images end up with the objects.dreamhost address. Which means my index page is full of links to objects.dreamhost and my post pages are filled with dream.io links but for the top image which is an objects.dreamhost link.
I’ve tried all kind of things to change them but I cannot figure out. I realize it’s not important and that I believe a bucket is a bucket, but I’ve had better luck with dream.io links being faster than the objects.dreamhost links
All the featured images end up with the objects.dreamhost address. Which means my index page is full of links to objects.dreamhost and my post pages are filled with dream.io links but for the top image which is an objects.dreamhost link.
*ponder*
Does the same thing happen for new posts? That is, if you make a new post, with all the proper dream.io options set in the plugin ahead of time, does the new post’s featured image point to dream.io or objects.dreamhost?
The issue might be that I develop on localhost and use git to push it live. Somehow in the media browser all my localhost links of that type are dream.io and all the remote links are objects.dreamhost. I will try another new post locally and push it and then try a remote one and see the results and post back.
Obviously I have too much time on my hands…
Is objects.dreamhost any different from dream.io? It says on your plugin and in the DH control panel to use the io links, just curious.
Same server, just dream.io runs through a CDN first so it has more endpoints and is faster for more locals.
The issue might be that I develop on localhost and use git to push it live. Somehow in the media browser all my localhost links of that type are dream.io and all the remote links are objects.dreamhost.
That’s weird. I’d think the URLs would be the same unless you didn’t set up the plugin on both ends.
But I’m also confused as to what’s wrong.
Talking of your localhost only… is that where you see the dream.io not being used for feature images?
Lol, it’s confusing to me too.
On localhost, the links on the featured images are all dream.io
When I go into the media browser on the backend and look at the file URL, all images show it as dream.io
All URLs of images in posts are dream.io
On the server, the links on the featured images are all objects.dreamhost
When I go into the media browser on the backend there and look at the file URL, all images show it as object.dreamhost
All URL of images in posts are dream.io
The server should be an exact duplicate of my machine but for the first 2 lines of the options table that contains the site urls.
For my next trick I may delete the whole server directory and checkout the whole site just to see what happens.
On localhost, the links on the featured images are all dream.io
and
On the server, the links on the featured images are all objects.dreamhost
Okay! So now I have to ask…
1) Having DreamSpeed installed on the production server, can you confirm that it has DreamSpeed set to use Dream.io? (I know but check)
2) What’s the tool you’re using to copy?
Also for a bonus…
The server should be an exact duplicate of my machine but for the first 2 lines of the options table that contains the site urls.
That’s actually not usually true.
Assuming ‘domain.dev’ or ‘localhost’ for your localhost and domain.com for production, every single move would involve a serialization safe search/replace for all posts, changing the URLs.
And that search/replace may need to have the CDN info added to it.
Creating a post it on the production server gives me objects.dreamhost links all around.
1) Having DreamSpeed installed on the production server, can you confirm that it has DreamSpeed set to use Dream.io? (I know but check)
I have checked it at least 5 times and I’ve toggle/saved/toggle/saved it a bunch too.
I’m pushing everything to the server via git. The db is copied via a git hook checkout with the mysql command.
When I create posts on localhost, all the post images and featured images automagically have a dream.io url now, no search and replace needed. I was having to do a search and replace until I installed this plugin so that is a nice improvement (although it sounds like that shouldn’t happen).
I’ve also searched the database for objects.dreamhost in a text editor and with the ‘Better Search and Replace’ plugin and I can’t find any instances of it. Searching for dream.io gives me the expected results.
I’ve also dropped every table and imported on directly from a localhost dump, so I don’t know what’s going on.
I can’t get a successful checkout to the production server for the last few tries, (I’m probably overusing resources) but as I said that’s my next move, sometimes git thinks things are in a state they aren’t.
I’m pushing everything to the server via git.
Yeah, that’s what I’m wondering how you do it 🙂
Edited: I can think of a dozen ways, and I’m not sure how YOU do it, hence asking 😀
Oh well, let’s see, I did this so long ago, I forgot
I have a bare repository on the server and I’m checking it out to the worktree on the server using git checkout -f in a post-recieve hook. It’s worked pretty solidly for the last few years (but for when I exceed the sever’s memory limits). In that hook, I’m also inserting the database changes via the mysql command. When I dump the table I leave off the first 2 rows of the options table as those contain the site directory and url.
Before the plugin, everything would be identical but for the things I excluded from git. I’m a total hack when it comes to git, but who isn’t? 😀
I’m a total hack when it comes to git, but who isn’t? 😀
My coworker is a Git God 😀
In that hook, I’m also inserting the database changes via the mysql command. When I dump the table I leave off the first 2 rows of the options table as those contain the site directory and url.
Could you share that code?
Also wouldn’t it be smarter to simply omit the specific table rows based on their name rather than just the first two rows? I’m sure it works for you, but still 🙂
mysqldump -u USER -pPASSWORD --skip-extended-insert --ignore-table=DATABASE.wp_XXX_options DATABASE> /Volumes/Sites/db.mysql
mysqldump -u USER -pPASSWORD --skip-extended-insert DATABASE wp_XXX_options --where "option_id>2" >> /Volumes/Sites/db.mysql
How are you changing the URL? Since you’re ignoring the home/siteURLs, you have to be running some search/replace on the new DB to change the localhost URL to the new one for post content, don’t you?
When I create posts on localhost, they automagically have the correct dream.io URL, I thought this was a feature of the plugin. Before the plugin I was doing a search/replace.