With ref to adding custom fields to WP admins/users


I am converting a standalone PHP script to a wordpress plugin.

Now this script has one table for 'users' and one table called groups which basically defines if a user is a user, admin or a guest.

There are some fields in the users table which are not there in the default WP users table.

What I want to know is, what is recommended in general for user table in Wordpress plugins--> should I modify the WP users table and add my fields to it? Or should I create a separate table containing the extra fields and link this table to the WP users table correctly? Which approach do you recommend out of the above (or some other approach if I have not thought of that) and why do you recommend it?


  • Vaughan

    hi @arvind

    the best way of doing this would be to use a plugin such as BuddyPress which has custom field capability youdetect could then import into x_profile table i guess. then you would most likely need to be able to convert your external DB structure so you can import it into wordpress, best method would be to export as a CSV, then import into WP after modifying the CSV. or create an import plugin which can do that for you, either way though I think there's going to be some manual work along the way unless you create a proper plugin to migrate your standard script to wordpress.

    there would also be the issue of your users passwords not being valid when you import them, & you'd need to be careful not to overwrite your wordpress admin account with an invalid password, & decide what to do with existing users, especially where email addresses are concerned as well as usernames (do you update/overwrite or skip/ignore)

    hope this helps.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.