Loading...

Wednesday, July 20, 2011

Automaticaly Replace Internal Links with New URLs in Wordpress Posts

As you might've noticed, we've moved from techzene.com to techzene.org recently. And changing all the internal links to the new URLs is really a tedious process if you do it manually. So to simplify it, you can use an SQL command which will replace all your internal posts in wordpress to similar new domain URLs.

For ex: techzene.com/about/ will be replaced with techzene.org/about/

How to Replace all the Internal links with new blog URLs?

  1. Login to your Hosting control panel
  2. Search for PHPMyAdmin and click on it
  3. Now, click on the SQL console tab and enter the following SQL Query
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldsite.com','http://www.newsite.com');
This query will now replace all the internal links with newsite URLs.

Note: This will work only if you have the same permalink structure in your old and new blogs.

Posted by // 2:00 PM
Labels:

2 comments:

  1. Thanks..my client asked to change his domain and this will surely help to speed up the process.

    ReplyDelete
  2. thanks for the interesting information

    ReplyDelete

 

Receive all updates via Google+ and Facebook. Just Click the Like Button Below