Page 1 of 1

universally change the path of existing "Link URL"s

Posted: Wed Jul 18, 2018 7:13 pm
by Rachel
Version of script: 2.1.2
Hosting company: AWS :evil:
What terms did you try when SEARCHING for a solution: URL, path, ccount_database.php, domain, change

Hi.
I want to universally change the path of existing "Link URL"s. For example:
Currently entered as https://www.apples.com/seeds.zip
Need https://www.oranges.com/seeds.zip

I tried replacing all https://www.apples.com/ with https://www.oranges.com/ in ccount_database.php (with SublimeText BTW) but this causes all links to disappear from the admin. I know I'm not corrupting the file, because if I use that same replace all back to the original URL, they reappear in the admin.
I also tried doing an export/update/import, but that didn't work either.

What the heck am I missing?

Thanks for your time!

Re: universally change the path of existing "Link URL"s

Posted: Wed Jul 18, 2018 7:21 pm
by Klemen
Substituting text in the database works only if both the old and new strings are exactly the same lengths. If not, PHP usnerialize function will fail.

Re: universally change the path of existing "Link URL"s

Posted: Wed Jul 18, 2018 7:38 pm
by Rachel
Ugg.

Thanks!

Re: universally change the path of existing "Link URL"s

Posted: Fri Oct 09, 2020 8:52 am
by artist1979
I'm trying to change all of my existing links from http: to https: and I'm getting the same error about php unserialize because of the extra s I would imagine then.
Is there a way to change the links quickly or does it mean editing each one manually?
Thanks
P.S. I tried it by editing one of the backups, but I imagine I would have the same problem if I tried to edit the database too.

Re: universally change the path of existing "Link URL"s

Posted: Fri Oct 09, 2020 6:50 pm
by Klemen
Klemen wrote: Wed Jul 18, 2018 7:21 pm Substituting text in the database works only if both the old and new strings are exactly the same lengths. If not, PHP usnerialize function will fail.