wordpress database migration steps

WordPress domain migration is every time required. We given simple wordpress database migration steps. Using following steps you can do domain migration. Whenever you need to push wordpress site local box to production or qa box. you need to change the domain name. I given the simple steps for wordpress database migration. Using following steps you can do the wordpress domain migration.

wordpress database migration steps

First go to wp-config.php file and change database name(what you want)
1. wp_1_options -Table name
option_name column – change(siteurl and home)

2. wp_blogs- Table name
domain column – change

3. wp_site- Table name
domain column – change

4. wp_usermeta
meta_key column – change(source_domain)

use this for
changing all post path and image path
UPDATE wp_1_posts SET post_content = REPLACE(post_content, ‘siwan.wordpress.com’, ‘localhost.localdomain’);

Following Articles are helpful to do the wordpress domain migration.

https://purabtech.in/mysql-queries-wordpress-website-migration/

https://purabtech.in/wordpress-migration-hosting-service-domain/