Automatically convert standard posts with custom fields to custom post types

The question: what is the easiest way to convert standard posts with custom fields into a new custom post type

There’s no “easy” way. Consider that all posts have custom fields (some are hidden, and WordPress will add them). So you would need to convert post types based on the presence / value of specific custom fields.

This is not easy. It is doable with some SQL skills, but not “easy”.

AND to import/keep the data originally assigned to each post from the custom field into the native field of a new post type? Can this be done automatically?

Changing post type means to change a column in the posts table. As long as the post ID column stays the same, the custom fields in meta table will stay unchanged, so you don’t need to do anything to keep the data originally assigned to each post.

But as said above, there’s no way to do it automatically, you’ll need to run some SQL query on the database.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)