0

A while ago I renamed my website from ExplainingProgress.com to OurWorldInData.org .

My problem is that sometimes – for some IFrames and some images – the URL that is linked to is still the old one (ExplainingProgress.com).

An example are the IFrames on this page: http://www.ourworldindata.org/data/war-peace/war-and-peace-after-1945/

Is there a way of renaming all these internal links automatically or do I have to read through all the HTML and rename it by hand?

4 Answers 4

0

You can use a plugin called Velvet Blues Update URLs. I use it all the time.

https://wordpress.org/plugins/velvet-blues-update-urls/

1

Hi i am not sure on what method you followed to rename domain name but the standard method what i followed is

1.Download the Sql file from old database 2.renamed the domain name from old to new in your case ExplainingProgress.com to OurWorldInData.org use an code editor for simple find and replace 3.uploaded the new sql file to the server 4. Dont forget to refresh permalinks

@ missing links/images

use this plugin Broken link checker

1

Data in the WP database is serialized. If you just do a search and replace you'll break your site.

You need to reserialize your data as you change it.

There are scripts and services that allow you to do a proper Search and Replace.

My tool of choice is this one, and it works perfectly. There are also a couple plugins that work (like velvet blues), and I also found this service from a theme creation company that does the same thing; which allows you to do the search and replace without actually installing anything on your machine.

Good luck and happy wordpressing.

1
  • Only some data with urls are serialized and it is not "pure" WP.
    – Marcin
    Commented Oct 8, 2014 at 19:53
0

You can use mysql command as:

UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');

and

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');

Please try on a test site before!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.