گاهی ممکنه نیاز باشه که از طریق سی پنل و دایرکت ادمین و دسترسی که به phpmyadmin داریم یه کاربری با سطح مدیر بسازیم تا بتونیم وارد پنل وردپرس بشیم .

ساخت کاربر وردپرس از طریق phpmyadmin
اگر دیگه به این کاربری نیاز نداشتیم می تونیم این کاربری رو پاک کنیم یا هر تغییری که نیاز داریم ایجاد کنیم و ازش استفاده کنیم .
مرحله اول : وارد phpmyadmin میشیم و این جدول کاربران وردپرس wp_users رو پیدا می کنیم .

wp_users
روی دکمه insert کلیک می کنیم و این تنظیمات رو وارد می کنیم تا کاربر جدید با آی دی جدید ایجاد کنیم . آی دی جدید رو بر اساس آی دی های موجود انتخاب می کنیم .
- ID – pick a number (in our example, we will use the number 4).
- user_login – insert the username you want to use to access the WordPress Dashboard.
- user_pass – add a password for this username. Make sure to select MD5 in the functions menu (Refer to the screenshot below).
- user_nicename – put a nickname or something else that you would like to refer yourself as.
- user_email – add the email you want to associate with this account.
- user_url – this would be the url to your website.
- user_registered – select the date/time for when this user is registered.
- user_status – set this to 0.
- display_name – put the name you like to display for this user on the site (it can be your user_nicename value as well).
- Click on the Go Button

ایجاد کاربری جدید در وردپرس
مرحله بعد با این جدول wp_usermeta دیتابیس کار داریم :
- unmeta_id – leave this blank (it will be auto-generated)
- user_id – this will be the id of the user you created in the previous step. Remember we picked 4.
- meta_key – this should be wp_capabilities
- meta_value – insert this:
a:1:{s:13:"administrator";s:1:"1";}
Insert another row with the following information:
- unmeta_id – leave this blank (it will be auto-generated)
- user_id – this will be the id of the user you created in the previous step. Remember we picked 4.
- meta_key – this should be wp_user_level
- meta_value – 10
و تمام . کاربری ما ساخته شده و وارد پنل کاربری خودمون میشیم.
برای راحتی کار میشه کلا این 3 تا کد رو زد و کاربری رو ساخت.
INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'demo', MD5('demo'), 'wordpresskar user', '[email protected]', 'http://www.wordpresskar.com/', '2022-06-06 00:00:00', '', '0', 'wordpresskar user');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '10');
INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'demo', MD5('demo'), 'wordpresskar user', '[email protected]', 'http://www.wordpresskar.com/', '2022-06-06 00:00:00', '', '0', 'wordpresskar user'); INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '10');