[wp-hackers] wp-cli import-csv and user set-role ...

Chuck Scott chuck at avantigroup.com
Thu Dec 19 18:06:42 UTC 2013


> wp-cli has this ability baked-in.
>
> http://wp-cli.org/commands/user/

Hi Jerry Milo Johnson - thanks for responding ... yes i'm aware of
wp-cli however i've not yet used it ... and while this command does
most of what i want, http://wp-cli.org/commands/user/import-csv/, the
docs and example make no mention of whether said CSV file can add
users to a particular site and not just add users to the network ...
thus this command, http://wp-cli.org/commands/user/set-role/, seems to
allow that control (user and role assigned to a sub blog) but is one
at a time ... so what i was hoping to do is import a CSV that also
assigned those users to various sub sites ... accordingly, do you know
if this is possible with the import-csv command or would i have to
first import-csv, then one by one run the set-role (ugh) ... lastly,
have you ever set up shell scripts to run these command lines ..??..
thanks in advance for any pointers shared ... cordially, chuck scott
>
>> Hi - Happy Holidays to all and here is hoping the WP-Hackers Santa Spirits
>> and Code Elves can help me with the following ...
>>
>> my question = does anybody know how best to import users via command line
>> or via php script into sub sites on a Multisite Network ..??.. and/or know
>> how best to go about extending a plugin that does import users into sub
>> sites like, Cimy User Manager - http://wordpress.org/plugins/
>> cimy-user-manager/ - e.g., with an api or other code that runs the plugin
>> at command line ..??..
>>
>> as fyi, Cimy User Manager seems to do a great job of loading a list of
>> users via csv file into a sub site but this requires the GUI and a number
>> of admin clicks ... thus got to thinking if it was possible to run a plugin
>> at command line so initially i posted this thread ->
>> http://wordpress.org/support/topic/api-or-method-to-import-
>> users-from-command-line ...
>>
>> accordingly, any help or pointers that can be shared to add users via
>> command line scripts is greatly appreciated ... to be continued ...
>> cordially, chuck scott
>>

-- 
-------------------------------------------------------------------------------
Chuck Scott -> Information Architect
-------------------------------------------------------------------------------
Specialty -> WordPress Multisite Information Design
-------------------------------------------------------------------------------
Site -> http://ChuckingIt.com - Reflecting on Life,
Business, Entrepreneurship, Innovation & Technology
-------------------------------------------------------------------------------
What's New -> Tweeting a bit at @avantigroup
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------


More information about the wp-hackers mailing list