Home Forums General Issues Link field values are lost after database migration


Link field values are lost after database migration

  • Hi,
    I have a problem as follows: when I dump the database, search&replace url (let’s say – from to and I import it to another database, everything works well, beside link fields. On on all pages, they are just empty. As this field is not storing a relation to ID, but only a string values for url/title/target, why the modification of that string is not working?
    Please let me know what I kind of debugging information should I add.

    Best regards

  • you cannot do a simple search and replace of urls in the WP database. The reason is that WP might store values as serialized arrays and altering these by using a search and replace will clause all content in these serialized arrays to be lost.

  • Thanks! The thing is, I am using this tool and link field values are gone anyway.

  • are you loosing any other serialized data? What version of PHP is being used on each site? are they the same?

  • It appears there was some problem with data itself – proper search and replace with serialized arrays in mind solved the problem. Thanks

  • Hello – i’ve been using various tools to grab remote sql to import locally. My links are never imported and this has been going on for 4 or 5 months now.

    I’ve tried mysql exports, WP migrate and a few other methods but the links or their labels are never imported.

    I have no issues with other data at all

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Link field values are lost after database migration’ is closed to new replies.