for migration of cpanel of wordpress site of one domain to another ->
- copy files from old cpanel -> to new cpanel
- export db from old cpanel -> import in new cpanel
- for above step 2 -> create db in new server,
- for above step 2 -> create db user and db pass in new server,
- for above step 2 -> assign db user with db access,
- using phpmyadmin in new server, fix site_url in wp_options table
In some cases we also need to replace/fix image path location inside post/pages also. For that we will use sample codes like ->
update table wp_posts set content = replace(content, ‘old_path’, ‘new_path’)