So you want to migrate a WordPress database and you came into the problem that when you load the new installation directory you are being redirected to the old domain. You probably tried to manually replace in your PhpMyAdmin in the wp_options table the two entries that normally exist, but still no success. Maybe your website is loading but there are lots of errors in there.
This is because WordPress and lots of plugins store data and full URI in the database using wp_serialize function. Here is a little example about what I am talking about:
| a:6:s:4:"role";s:5:"admin";s:17:"includes_globally";s:2:"on";s:18:"pages_for_includes";s:0:"";s:12:"js_to_footer";s:2:"on";s:15:"show_dev_export";s:3:"off";s:11:"enable_logs";s:3:"off";} |
If you just do a search and replace you will break all this fields and data can not be recovered.
Continue reading “The easy way to migrate WordPress using search and replace database”