String find/replace script - Moving/migrating sites - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Scripts & Components (http://get-simple.info/forums/forumdisplay.php?fid=11) +--- Thread: String find/replace script - Moving/migrating sites (/showthread.php?tid=5082) |
String find/replace script - Moving/migrating sites - Carlos - 2013-08-18 (first posted here) Here's a simple script (not a plugin, so no backend, sorry) to search/replace old->new site URLs in all files in a folder (e.g. *.xml in data/pages) Set it up by editing the values in the first lines in the script (create the destination folder if it doesn't exist), save it as convertsiteurl.php (or what you wish) and open it in your browser like YOURSITE/convertsiteurl.php The destination folder can be the same as the source, but just in case make a backup of all your date (well, better make a backup anyway). PHP Code: <?php It can be used with the data/pages folder, but also with News Manager's data/posts, GS Blog's data/blog, etc. |