I have a request to migrate wordpress website to a custom CMS.
The problem is that this wordpress website has over 30 000 registered users, and user_meta table is very inconsistent because during the last 5 years they used different plugins for user management, so some users have 10 records in user_meta table, some have 50 records, and some have as much as 150 records (they stored different information about users during these 5 years).
I have to save all relevant data (for example: usernames, first_name, last_name, date_of_birth,...) about users in non key-attribute-value database table. So, I'm going to have regular tables for users (with specific columns like username, first_name, last_name,...) and i have to migrate specific records of data from user_meta to one or more related tables for new CMS. The user_meta table currently has couple of millions of records (relevant and non relevant).
How can I extract all required data for each user (for example: username, first_name, last_name, date_of_birth) from user_meta table, but i need them not in key-value format, but in regular format which i can import to column-based table (so i can easily import them)?
Thanks
I will add more details to this question in comments if needed