People look for a paid backup restore plugin to migrate their WordPress site from one to another domain. Paid plugin boasts of their automatic domain migration feature to sell their plugin and rightly so because it helps all those users who don’t know how to use web-hosting phpMyAdmin function.

But if you know how to use phpMyAdmin feature in your web hosting account, you will discover that changing/updating domain or any other text in WordPress database is as easy as a piece of cake. And I am sure, using phpMyAdmin is easier than anything. No coding skill required, just add pre-made lines to your database SQL tab and rest will be done itself.

Also read how to change domain url with free php script

First read how to back up and restore WordPress with Updraft Plus for free

When you restore Updraft backup to a different domain URL, its free version don't update domain name url in database and you need to buy its paid extension. But following this guide you can do it for free using phpMyAdmin a database manager application web hosting account.

So what we need

Note – You should have a backup copy of your database before doing anything with your database because there is no undo option in phpMyAdmin

If you already migrated your WordPress database but didn’t migrate domain url

In this condition you don’t have access to your WordPress admin panel and all things will be done via Web hosting phpMyAdmin

  • Whatever hosting you have, you will find phpMyAdmin in your hosting account. (cPanel is the best hosting panel)
  • Locate the phpMyAdmin in your hosting account and access it

Point to be noted >>>

Many web hosts don't allow automatic login to phpMyAdmin from hosting panel and it requires database username and password. No worry.

Using hosting file manager or FTP

  • go to WordPress installation folder and locate wp-config.php file
  • Edit it with any text editor or file manager editor
  • Here you will find database hostname, database username and password to login to phpMyAdmin


  • You will find a list of all databases created in your web hosting account.

If you are not sure which database is connected to your WordPress website, you need to find it. (Go to file manager > WordPress installation folder > Edit wp-config.php file. Here you can see the name of the database and database user and password)

  • Click on the database and it will display all database tables
  • Now go to SQL tab as shown in the figure

  • In SQL query box enter the following code

UPDATE wp_options SET option_value = replace(option_value, ‘http://oldurl‘, ‘http://newurl‘) WHERE option_name = ‘home' OR option_name = ‘siteurl';UPDATE wp_posts SET guid = replace(guid, ‘http://oldurl‘, ‘http://newurl‘);

UPDATE wp_posts SET post_content = replace(post_content, ‘http://oldurl‘, ‘http://newurl‘);

UPDATE wphttp://oldurl‘, ‘http://newurl‘);

In this code update the colored text like this

Green color text – replace it with your WordPress database table prefix

How to find WordPress database table prefix

  • Using hosting file manager or FTP go to WordPress isntallation folder and locate wp-config.php file
  • Edit it with any text editor or file manager editor
  • At the bottom of this file you will find a line that tell about WordPress table prefix. See in the image given below

Red color text – Add your old domain url (be very careful adding it and don't any extra character)

Blue text – Add your new domain url (be very careful adding it and don't any extra character)

  • after making sure everything is okay. carefully hit the GO button

Domain url will be updated for entire site within a second.

If you have any question regarding this post, you can ask in comment section.


About Shams

Shams, a professional blogger, has expertise in WordPress and Web Hosting. He is used to playing around with WordPress plugins, themes, web hosting services and some other innovative stuff regarding web design. He sifts out good stuff for web designers and reviews it to help them choose what they really need.

Being an energetic tech enthusiast, he regularly pens down breaking news and tutorials related to technology particularly Smartphones and other gadgets. Sometimes writes tech tips too. It was the dawn of Internet age when he started dabbling in it and has since been delving into the realm of the internet. He occupies a permanent burrow in virtual world.

He can be reached at.- here