Change WordPress user roles and capabilities Forums Bug Reports Settings options and permissions through CLI

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8184
    mutualite
    Participant

    Hi,

    I happened to be dealing with a strange issue (uknown redirection) which makes accessing the network backoffice impossible in my multisite installation.
    I could use wp-cli if there is no other solution. as it seems I’ve seen a way to apparently change users roles through it, anyway I’d like to know if there is a way to change settings and permissions in CLI (for example to set that CPT use their own permissions, create a new role…) when one has no GUI access. If wp-cli cannot be used, are there specific CLI commands one can issue ?

    Best regards.

    #8185
    Vladimir
    Keymaster

    Hi,

    URE Pro does not support wp-cli and any other CLI commands. If URE Pro is involved, You may temporally deactivate it – just rename it’s folder /wp-content/plugins/user-role-editor-pro to something other. It will be executed and will be automatically deactivated on ‘Plugins’ page opening.

    URE Pro stores it’s settings in the database:

    
    SELECT * FROM wp_options WHERE option_name='user_role_editor';
    

    So you may change URE Pro settings replacing option_value field value.
    For example, find
    s:36:”force_custom_post_types_capabilities”;s:1:”1″;
    and replace the final 1 with 0 in order to switch OFF the option “that CPT use their own permissions”.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.