Yes, you can use wp_update_user()
:
wp_update_user( array(
'ID' => 123,
'user_nicename' => 'value'
) );
Just replace 123
with the proper user ID, and value
with the preferred user_nicename
value.
The function also enables you to change the value of other fields in the WordPress users table (wp_users
).
Related Posts:
- How to track a users progress through pages by inserting data into WordPress Database?
- User management system similar to wordpress one?
- How to set max users to 17.000
- How to connect database table to each registered wordpress user.
- Let users register weight each day and save it in DB
- How to return number of found rows from SELECT query
- Check if post of title already exists
- $wpdb->delete column values IN ARRAY()?
- How To Make Connection To WordPress Data Base In A Plugin?
- Does WordPress cache get_user_meta() results?
- How to auto login user again after change user_login
- WordPress will not operate correctly
- How to Join two tables from separate databases within WordPress
- error importing localhost export file to server
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- How to sort results from a custom database table
- How can I call a row of user specific data from a custom table added to the WP Database
- How to merge local and live databases?
- Import 10,000 Users into WordPress WITH a specific ID for each user
- WP database error for comments_popup_link()
- if statement on database query
- Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error
- automated tests as a user?
- No wp-config.php file on local install of wordpress – site still displays
- How to migrate the posts from an old custom legacy blog to a new WordPress website?
- Different database query in function.php using mysqli
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- Is it necessary to sanitize wp_set_password user input?
- Create WP_Query to search for posts by their categories or their parent/child categories
- WordPress not reflecting changed of the database
- Programmatic Login from 3rd Party site
- How can I save unique user data on my site? [closed]
- Update results, Before deleting the related category [closed]
- custom user role wordpress – grant guest access to edit.php without insert/update/delete
- database sent to a JSON file
- inserting a post from an extern php file but post content doesn’t show on wp site
- Using custom tables for old posts
- Not connecting to database in file with multiple MySQL connections
- Change CSS based on is_user_logged_in
- WordPress Block developer from exporting Database via PHP
- wpdb prepare insert table doesn’t work
- Should I use WordPress to skin a database website?
- How do I display offsite database info on my wordpress site?
- Creating Database Table vs. Adding MetaData to Post & User
- WordPress and MySQL: trying to print data using PHP from user_meta custom field data
- Most commented posts by time period (last 12h, last 24h and etc)
- How can I add a new row in a separate database when someone registers via WordPress?
- I can’t update my data through $wpdb
- Lost in trying to create user database system
- Why when I create a new post I found 2 record related to this post into the posts database table?
- Adding data to custom wordpress database table
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- Add row to custom database Table and delete all rows older than 1 day
- select a single val though a table in wordpress
- SQL error with custom query
- What’s wrong in my PHP code? I’m using WordPress Astra Theme and I can’t insert data into my SQL
- Please help! I have a problem with getting wordpress databas
- Change wordpress’ database data using ajax – how to get current user id?
- Error establishing a database connection (Set-up locally)
- Admin Panel 404 Error after login
- How to block specific user id in custom login form?
- PHP Warning: mysqli_query(): after updating my websites php from 5.6 to 7.2
- Call WP Rest-Api to GET /users/me returned NOTHING in console
- Using wpdb to connect to a different database is not working
- wp-login.php?redirect_to=https problem
- Insert data from form to database
- is_user_logged_in() not working in homepage
- (Who to follow) Twitter widget
- can’t delete a row from post_meta table
- List users in a dropdown for login
- two wordpress sites, two themes, one database, same content
- Insert double entry in DB
- MySQL database migration to WordPress
- Custom query_posts() parameter
- How to pass username into form that sends data to database
- How to edit the default database of WordPress [closed]
- Display total count of products in orders of a specific order status
- Getting invalid user ID error when creating a new user with wp_insert_user
- Execute multiple PHP Snippets causes error?
- Custom form that stores data in mysql database
- Putting form result in my database
- Can’t insert into a database wordpress
- Add extra field to users
- How do I hide specific user profile fields?
- MySQL query performed 4 times inside loop
- Modern Tribe Calendar wp-query with meta query not working at all
- Using a nonce in a Custom Login Form
- Insert all post IDs in new database table
- Get WooCommerce product details and transfer them to a custom DB table
- What is a valid parent for get_terms()?
- form $_post action value gets truncated after it passes through two forms
- making php value numeric
- Storing huge number of users in wordpress
- Error inserting into custom table – Object of class wpdb could not be converted to string [closed]
- Redirect after login depending on the URL
- direct query to post_meta table
- Trying to post information from a remote database to wordpress page
- PHP Call to External Database
- Predefine Magazine Style Layouts
- How to change wp-admin and wp-login urls