I recently moved one of my websites to a brand new domain. It was sitting on a domain I registered in my early years in the blogosphere, and to be honest, this domain named just plained sucked! So I wanted to move this blog to a keyword rich domain. There are plenty of ways to migrate your blog from a domain to another, but not being a code guy, I struggled with one simple issue.
In a lot of my posts, I was saying the name of my website, pretty much the same way I am doing with Dukeo. Let’s say it’s a way of branding my website name by doing some name-dropping. The problem is that, after migrating to the new domain, I had plenty of referencies to the old domain in the articles.
After searching for a while, I found this step by step guide to update all the posts at once.
- Login to phpMyAdmin and select your database
- Click the SQL tab
- Enter the following in the run SQL Query text box (replacing table_name, table_field, search_string and replace_string with your actual information:
1
UPDATE table_name SET table_field = replace(tablefield,"search_string","replace_string");
- Click go to process the changes and update your SQL database
Here is a WordPress SQL Query database example for reference:
1
UPDATE wp_posts SET post_content = replace(post_content,"OldDomain.com","NewDomain.com");
This line of code literally saved me hours of post editing, I hope this will help you too!



Hey Stéphane,
Very simple and useful tutorial!
Best regards!
Hey, thank you Polo!
I realized that from time to time you may face this kind of small issue and struggle for hours to get a fix… So, I’m glad if I can help :)
This is what Dukeo is about after all: helping and giving back to the community!