Search code examples
mysqlwordpressexpressionengine

Export ExpressionEngine Members to Wordpress Users


I need to export existing ExpressionEngine members and convert them into Wordpress users. There is a previous question that answers part of my problem here: Export ExpressionEngine members to WordPress

Unfortunately, I also need to include the custom fields from ExpressionEngine from the member_fields table. Is there a way to merge that information with the primary members fields into a CSV that can then be imported into Wordpress?


Solution

  • So you just need to join the member_data table and then get all the columns from there. If there are particular ones that you want you can whittle this down a little, as written it will dump out all custom member fields.

    SELECT 
        username AS user_login,
        username AS user_nicename,
        email AS user_email,
        url AS user_url,
        screen_name AS display_name,
        FROM_UNIXTIME(join_date) AS user_registered,
        md.*
    FROM
        exp_members m
            LEFT JOIN
        exp_member_data md ON md.member_id = m.member_id