WordPress.org

Ready to get started?Download WordPress

Forums

Explanation of wp_users, wp_usermeta and wp_signups (5 posts)

  1. deiks
    Member
    Posted 1 year ago #

    Hello,

    I'm new with wordpress but I have experience with PHP and MySQL for few years. I'm trying to figure out how really wordpress works.

    My question is about those three tables mentioned in topic title.

    So, if I register new user, user is stored to wp_users table with user_status = 0 and sometimes empty, sometimes not user_activation_key.

    Table wp_usermeta stores activation_key, and when I try to activate profile with emailed link I'm going through wp-activate.php which calls
    $result = wpmu_activate_signup($key);.

    If I find that function in ms-functions.php (that's only place where I found it), it calls this query:

    $signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE activation_key = %s", $key) );

    Then I go to wp_signups and that table is empty no matter if some user is activated or not.

    So, I need to know how registration and activation process really works.

    Also, if I need to make new user registration (and activated user) from some other remote host, which tables do I need to updated.
    I don't have ability to include any WP file, only I can connect directly to database.

    Best regards.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 1 year ago #

    Things happen differently depending on if you're using MultiSite or not. Are you using multisite?

  3. deiks
    Member
    Posted 1 year ago #

    No..

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 1 year ago #

    Okay, in that case, if you're not using multisite, then wp_signups and wp-activate.php are both completely irrelevant. Those only matter, or are even created, on a multisite system.

    All the stuff you see starting with wpmu_* or ms-*.php and such are multi-site specific code. None of that applies to a single site setup. User creation on single site is far simpler and only involves the wp_users table.

  5. deiks
    Member
    Posted 1 year ago #

    Maybe it used all of tables becouse I tried install MU, and then deinstall. Now with new installation of WP when tried register user, it added user to wp_users and some options to wp_sitemeta but with refresh, before activating, I checked wp_users for activation key but it's not there, and successfully activated, but newermind. I don't need it anyway. Just need to register.

Topic Closed

This topic has been closed to new replies.

About this Topic