• I’m new to WordPress, so please be gentle!

    I’m designing a website for a local educational charity which has approximately 1,400 members, and I want to have a members’ only area on the site. It would appear that WP Members Membership plugin would be suitable for this, however…

    We have an existing database of our members with fields which include name and membership number. Is it possible to link the plugin to this database so that existing members will already have access to the restricted pages right from the start (using name and membership number to log in), or does it require a new database to be created from within the plugin itself, with each member needing to register on their first use?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    It would require the users to be in WordPress.

    WordPress uses two tables for users and user data – wp_users and wp_usermeta. wp_users is a one-to-one relational table, wp_usermeta is one-to-many. wp_usermeta is where any custom fields (beyond what WP uses) would be stored.

    Not sure how familiar you are with relational databases, but with the one-to-many relationship of the meta table, you can’t just import into the database directly. You’ll need an import tool. I would suggest the following:
    https://wordpress.org/plugins/import-users-from-csv-with-meta/

    I would also highly recommend that you do some small test imports first before you do the whole thing so that you learn what you’re doing. Reviewing the database schema (especially the user tables) would be advised as well:
    https://codex.wordpress.org/Database_Description

    Thread Starter iansawyer

    (@iansawyer)

    Thanks for the information. The Import users from CSV with meta plugin looks like like it could be a solution. The only downside I can see is that new members joining of the charity after the initial import will need to be either periodically imported into the database or added in manually via the front end of WP Members Membership. I was rather hoping to find a solution whereby our own database could be queried directly, but if that’s not possible, this does seem the next best solution.

    I’m not very familiar with such databases myself, however I know enough to see exactly what the import tool will do. However one of my colleagues does have the knowledge required, so when we get to the point of getting this set up, we’ll do some extensive testing as suggested.

    Thanks for your assistance.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Linking to an existing database’ is closed to new replies.