UpdraftPlus Home › Forums › Paid support forum – UpdraftPlus backup plugin › replacing guid
- This topic has 3 replies, 2 voices, and was last updated 9 years, 5 months ago by udadmin.
-
AuthorPosts
-
August 24, 2015 at 3:09 pm #125701VittorioParticipant
Today I moved all my jpgs from “uploads/2015/02/” to simply “uploads/”
I replaced “2015/02” with “” with the migrate addon and it did most of the replacing but not all.
The guids where left unchenged and the pictures where unavailable.
This is clearly documented (latest update “Skip search/replacing of the ‘guid’ column”) and somewhat expected, as a safety feature.
But today I actually needed this! I knew what I was doing (I’m still in development so guid can change quite freely) and had to resort to WP DB migrate Pro to complete the task (which in turn could not replace to an empty string, so I needed a third step back to Updraft).I therefore suggest to add an option (in the manual s&r) to process also guids.
Thank you for reading.
August 24, 2015 at 6:01 pm #125736udadminKeymasterHi,
Why would you need to know or care what’s in the GUID column? It’s only incidental that it happens to be a URL – its sole real function is to be a unique identifier for the post (WP uses a URL, because that’s going to be unique across sites). Hence, changing it to match the site URL is pointless – it doesn’t achieve anything, as far as I can tell. But I am willing to be enlightened!
David
August 25, 2015 at 11:01 am #125833VittorioParticipantHello David,
I think you are right 100%, but in my ignorance I tried to keep things tidy and aligned. I tried to document myself aboud media’s guid but found nothing on the first pass.
But let me note that if the guid is calculated based on name and path, and I changed them afterwards, then another file could then have the same guid calculated. Buth then I guess there’s a safety mechanism with an increased counter…If you say I shouldn’t care I’ll take it for good, but note also that there are many s&r plugins that DO have the option to manipulate guids. Maybe it’s useful for something.
Thank you, goodbye!
August 25, 2015 at 11:21 pm #125925udadminKeymasterBut let me note that if the guid is calculated based on name and path, and I changed them afterwards, then another file could then have the same guid calculated.
I believe WordPress uses the post ID – i.e. ultimately the MySQL database ID, which is guaranteed to not be recycled.
but note also that there are many s&r plugins that DO have the option to manipulate guids
Yes – this stopped me from tweaking UpdraftPlus for a long time. I thought “surely there’s a reason”. But, there really isn’t. From what I can see, it’s a classic example of software developers dealing with something they didn’t fully understand by making the user make an unnecessary choice that the user isn’t likely to understand either. In fact the WordPress Codex warns very strongly to definitely never change this field: https://codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note (I should have checked that years ago!).
David
-
AuthorPosts
- The topic ‘replacing guid’ is closed to new replies.