Change site URL in MySQL PHPmyadmin

If you have WordPress website that used all absolute URL’s instead of relive ones, and you want to change all in MySQL, here is the way how you can do that in PHPmyadmin. It will be a bit complicated search and replace procedure.

First go to Search tab, enter your old URL, select all tables in “Inside tables” and click “Go”.

search mysql in phpmyadmin

In results you will see in which tables you have old url written. Keep this window open, or copy results somewhere and then open SQL tab.
There, enter

[codesyntax lang=”php”]

UPDATE wp_table SET column_name = REPLACE (
column_name,
'oldurl.com',
'newurl.com');

[/codesyntax]

Of course, replace wp_table and column_name acordingly. If you are not sure about column_name then open particular table in new window, and you will see what is column name where old url exists.

If you have old url in more then one table, just repeat the process.

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

− 2 = 2