Pages

Wednesday, March 22, 2017

Wordpress and Buddypress Min/Max Lengths of Username, Password, Display Name, URL and BP Registration text fields

WP_Users Table

UserName is maximum of 60 characters long, min 1 character, technically albeit not good. To prevent collisions, the bigger min size the better. 

1 ID bigint(20)  
2 user_login varchar(60) utf8mb4_unicode_ci
3 user_pass varchar(255) utf8mb4_unicode_ci
4 user_nicename varchar(50) utf8mb4_unicode_ci
5 user_email varchar(100) utf8mb4_unicode_ci
6 user_url varchar(100) utf8mb4_unicode_ci
7 user_registered datetime  
8 user_activation_key varchar(255) utf8mb4_unicode_ci
9 user_status int(11)  
10 display_name varchar(250) utf8mb4_unicode_ci

A Buddypress field can be a maximum length of 4,294,967,295 or 4GB (232 − 1) characters.

WP_BP_xprofile_data Table 

This table contains all text fields entered data from BuddyPress Edit/Registration Form.

1 id bigint(20)  
2 field_id bigint(20)  
3 user_id bigint(20)  
4 value longtext utf8mb4_unicode_520_ci
For example, a edit/registration form to collect City, will be housed in field 4, value, longtext value = "New York".


A full list MYSQL datatypes is defined here ->
https://dev.mysql.com/doc/refman/5.7/en/string-type-overview.html

  • LONGTEXT 4,294,967,295 bytes ~4GB
  • MEDIUMTEXT 16,777,215 bytes ~16MB
  • TEXT 65,535 bytes ~64kb
  • TINYTEXT 256 bytes

No comments:

Post a Comment