This is helpful for transferring to a new domain / publishing your site after working locally. It is not the best method to use with wordpress as it can casue problems with some widgets which means they dissapear. But sometimes, needs must...
WordPress stores many options as "serialized data", which contains both the string content of things and their length. So when you modify the URL and the length changes, then the serialized data is no longer correct, and PHP rejects it. More info
The main tables you will need to update for any Wordpress installation are wp_options
, wp_posts
and wp_post_meta
. The SQL below will find any instance of your old domain and replace it with your new domain. Making sure your site works properly and loads all attachments on the new server/domain.
**Don't use this method unless you are already familier with using [phpMy