This code will help you to import featured images to your new site.
- On old database make copy of tables wp_posts and wp_postmeta to xp_posts and xp_postmeta (can do it with help PHPMyAdmin).
- Export new tables xp_posts and xp_postmeta to .sql files.
- Import these tables into new WordPress database.
- Copy all images from wp-content\uploads on old site to new one.
- In index.php write down options to access to WordPress database
$database = new medoo([
// required
'database_type' => 'mysql',
'database_name' => 'database',
'server' => 'host',
'username' => 'user_name',
'password' => 'password',
'charset' => 'utf8'
]);
- Check, do you copy /lib/medoo.php
- Run index.php
If you have some questions or proposition, please write me an email: bars38@gmail.com
P.S. May be you will need to run query after all
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldsite.com','http://newsite.com');