0

I have a wordpress website and I'm going to change it's URL. The problem is that when I search for its actual URL in the database, I have like 200 results.

I would like to search in the whole database for the actual url and replace it with the new one.

I know that if I have the exact table and exact column, I can do :

UPDATE
    Table
SET
    Column = Replace(Column, 'find value', 'replacement value')

But how can I generalize this code to my whole database ?

Thank You !

Nicolas Roy
  • 3,773
  • 5
  • 27
  • 42
  • 1
    What you're trying to do is surprisingly hard, because many entries in a WordPress MySQL database are serialized php or json, and many others aren't. There are plenty of WordPress plugins that will help you migrate a WordPress web site from one URL to another. Ask this question on http://wordpress.stackexchange.com . – O. Jones Jan 21 '14 at 19:41

1 Answers1

1

Perhaps not the best, one solution is to export the whole database, open the sql file in a text editor, perform the search-replace and importing again.

jvicab
  • 266
  • 1
  • 3