Tricks on changing a WordPress site URL

Sometimes using a find and replace using a text editor like our favorite Notepad++ and Sublime can do the trick but the problem is when you are migrating your WordPress site, the widgets or mostly the text widgets are breaking and didn’t add in our widget section.

That is too bad when you have lots of widget added and we don’t want to start again to add one by one and copy in our old site.

Now I will teach you how to replace your Old URL to your New WordPress URL in two style.


1. Simply add these lines to the functions.php file of your theme:


2. Using your phpmyAdmin (well this one is my favorite)


2. phpmyadmin other version

a. Note: This is not tested yet (be careful be sure you have backup database.)


and that’s it. I hope it can help you.