- get all data from DB1( non-wp-database ) and save to an $array.
- Use this wordpress code inside your functions.php for insert users into DB2 ( wordpress database).
function cxg_wp_insert_user() { foreach ( $array as $arr ) { $user_data = array( 'ID' => '', 'user_pass' => wp_generate_password(), 'user_login' => $loginName, 'user_nicename' => $nicename, 'user_url' => '', 'user_email' => $eMail, 'display_name' => $displayName, 'nickname' => '$nickname, 'first_name' => $firstName, 'role' => get_option('default_role') } ); $user_id = wp_insert_user( $user_data ); } add_action( 'admin_init', 'cxg_wp_insert_user' ); 3. After updating disable this function
NOTE : For more details about insert user goto wordpress insert user codex
Related Posts:
- Multiple developers / editors working on a site in progress
- Best way to import users, post and categories from an external database
- Migrate Users From laravel to wordpress
- How can I make updates to a site, on a development copy, but then move updates back without overriding live site’s evolving database?
- Fastest way (least amount of steps) to locally import a remote database using WP-CLI
- Solution for database version control and deployment?
- How to migrate a HTTPS WordPress installation to localhost?
- Migrating data between local and development server
- Performance tips for a large user base [closed]
- Syncing local content with development / staging sites
- Organizing WP Pages based on old website database
- Export WP database for import using WP-CLI on Vagrant Box
- How to create bulk page and content? [closed]
- Migrating non-WordPress CMS to WordPress, lots of data to move — possible solutions?
- Efficiency on displaying random authors based on large database
- Extend the wp_users table
- Set Display Name to first and last name (phpmyadmin SQL Query)
- Weird issue with database migration and SSL links
- How to fix unchanged URLs in Database after running serialized search and replace script?
- Migrating database / content of non-CMS site to WordPress
- How do I reset a self-hosted WordPress URL?
- Select Multiple meta_value from WP DB; Single Query
- I don’t see site_url and home_url fields in wp_options table (phpMyAdmin)?
- Export all content from wordpress
- In what part of the WordPress core does the users table and usermeta table get joined?
- Why is it that not all users have a ‘session_tokens’ meta_key record in the usermeta table?
- Migrating WordPress from DreamHost to Azure WordPress Resource via UpdraftPlus “wp_options table does not exist…” error
- Modify Database in Multi-Site wp_usermeta table
- Change WordPress prefix for only one table?
- Moving minor updates between local and live sites – just database?
- wp_get_current_user always returns 0 continued
- Bulk-create posts from SQL database
- How to move the WordPress site Layout from test site to Production site?
- Merging two databases without borking it
- Is there a smart way to obtain a list of only some selected user meta data?
- Why does importing copies of the database dump and the document root make WordPress data inconsistent?
- How can i customize the export personal data file?
- What Is the Proper Way to Merge Usermeta Table to a an existing WP Database?
- Importing CSV into database table not working?
- Able to use all admin pages but in the frontend there is a “Error establishing a database connection”-Error
- Import users from old WP site to new one
- How to Access wp_usermeta Data Immediately After a New User is Created
- Trouble Migrating all data blog from WordPress.com to WordPress.org
- Logins from WP users table use on another page
- MS Access to manage WordPress Database
- Migrating from PDO using SQLite to clean new install using MySQL
- Migration: Copying database content to a different server
- Change WordPress URL in sql file via Terminal
- Convert user passwords to MD5?
- Does WordPress store the username as a primary key in the database?
- Strange characters added to the database
- multiple wordpress installation with shared usertable on an different database
- Best practice to import user base (subscribers) from one website to another?
- Share users across multiple sites on same database, but with different domains
- After database migration, theme mods don’t show [closed]
- Some weird users in database
- Problem migrating to localhost
- WordPress url transformation script
- How to delete a particular row in a database table
- Recovering the table wp_usermeta from users
- Regenerate user_nicename column
- How to transfer from localHost to live but use the already existing database on the server?
- WordPress where clauses in db select
- Image link issues after importing a database backup to my local web server
- Select From wpdb – Author/User Directory page
- Database migration issues – Error #1046 No database selected
- echo site_url() returns a different value than what is in the database siteurl field
- Need help with creating a searchable user data by name or specific number like ID
- /wp-admin not accessible after migrating to local host (no plugin issue)
- How to fix Uploaded to this post option to see group of images uploaded to a post?
- User input to database
- how add more field to wp user and save it to database
- Move Non-WordPress users table to WordPress database
- Change user_nickname for author page link
- WordPress site migration – locked out of admin area
- Malware in old website – how to migrate?
- Featured image from custom to WordPress database
- how restrict user to give star ratings once for a post?
- WP website showing blank page after moving from subdomain to main domain
- create a table using user meta custom data
- Do I need to be selective about where I search and replace when pointing a domain to a subfolder used for development?
- How to get the id of recently registered user from database?
- How to edit posts/pages without making the change live?
- Migrate not successful, DB is broken. How to fix, or at least output static HTML without plugins?
- How to save dropdown slection by a user in the DB
- How to get specific table by current user login
- After Migration From dev, Only my Links to the Homepage Still Redirect to dev
- I cannot change anything in my wordpress database from within wordpress?
- Hash user emails in database?
- Changed meta_key value in structures, now dashboard shows zero users
- Media library images “missing” after migrating them using SQL
- What WordPress file is saving new users to database
- Get id from database
- Restoring .sql backup results in “Error establishing a database connection”
- WordPress sync with phpbb
- Database question while Migrating from one domain to another on same WebHost [Bluehost]
- Import Excel (or csv) Table with user-data as subscribers to wordpress
- Moving database from WP 2.6 to 3.5 problem
- Getting an error when trying to migrate to DV server from Grid with Media Temple [closed]
- WP Multisite Users Not Linking