Would think that purge caches would be the last step ... the other two steps ... done in any order ... as long as they match.
So the 'sed' S&R you did ... did you escape the slashes after http: or https: and make sure that the slashes were treated as literals?
Like this:
sed -e “s/http:\/\/sos.sosoftexas.org\/moodle34\//https:\/\/sos.sosoftexas.org\/moodle34\//g” sedtest.sql > editedsedtest.sql
After doing the sed, did you try to double check ... using fgrep for "http://oldsite/" ... the editedsedtest.sql file?
Sed is a quick way ... how about a true text editor that has search and replace where you can actually *SEE* the text?
'spirit of sharing', Ken