moose123
Member
Posted 15 years ago #
So I've imported a WP site from one domain to another. Everything seems OK except that internal links are still from the old site.
I opened the exported XML file in an editor and did a find and replace, updating the URL. I then re-imported the XML file but it won't overwrite existing posts from the original import.
I tried the Zappo importer plug in which updates internal link automatically, but still it won't overwrite posts from the original import, which leaves the old URL in place.
Is there a better way of doing this? I am running WPMu 1.5.1 merged with 2.5
Thanks so much.
I'd do a global search & replace on the db if the URL is different.
moose123
Member
Posted 15 years ago #
Thanks andrea_r. Would i do this via PHPMyAdmin?
I'm hoping to upload a WordPress export file to one of my WMPu blogs. You are saying I should do a search and replace on that file before I import it.
What program should I use for this? Certainly not MSWord.
I use something called "Notebook ++" will that do it. It does have a search and replace feature.
moose123
Member
Posted 15 years ago #
if your internal links reference one domain (mysite.org/wp-post) and you are importing to a new domain (coolnewsite.org/wp-post) then yes, i think that's one way to do it, but don't take my word for it. ask around.
If there's hardcoded internal links to the old domain, yeah I'd wanna fix that. Notepad++ is way better than the standard notepad, that's for sure.
Might want to do that one at a time too, as in "find next..." rather than do it all at once, unless you have a whopping amount of memory on your computer. (I tend to freeze my text editor of choice when I do a global search & replace, but it's probably the program I use.)
moose123
Member
Posted 15 years ago #
the problem seems to be doing this *after* you've already done an import with the hardcoded old internal links, because the importer won't over-ride existing posts.
i was able to fix a lot of these in the db via PHPmyAdmin by running this:
UPDATE wp_blog#_posts SET post_content = replace(post_content,"old_URL/","new_URL/")
If you've already imported, then yeah - I do what you said in phpmyadmin. :)