Join the community today
Become a Member

wp-cli and --allow-root

Discussion in 'Other Centmin Mod Installed software' started by ethanpil, Sep 24, 2016.

  1. ethanpil

    ethanpil Active Member

    168
    47
    28
    Nov 8, 2015
    Ratings:
    +87
    Local Time:
    1:36 AM
    I have modified ~/.bashrc to include the following:

    Code:
    alias wp='/usr/bin/wp --allow-root'
    Why don't you just automatically include this alias? I am stick of typing --allow-root! :)

    Thanks. /rant
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,013
    6,581
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,771
    Local Time:
    1:36 AM
    Nginx 1.13.x
    MariaDB 5.5
    haha.. never got around to it :D

    I should do that but then again all the instructions here now have --allow-root, so having alias would give
    Code (Text):
    wp --allow-root --allow-root OPTION etc
    

    edit: ah that doesn't happen !
    which means i'd have to instruct folks to disable the alias LOL
    Code (Text):
    \wp OPTION etc
    

    hmm if you setup an alias for wp, might have issues with centmin mod routines that call wp command like centmin.sh menu option 22 !

    i'd need to add a check for whether wp alias is set in such routines !
     
    Last edited: Sep 24, 2016
  3. ethanpil

    ethanpil Active Member

    168
    47
    28
    Nov 8, 2015
    Ratings:
    +87
    Local Time:
    1:36 AM
    its a simple improvement which will make things easier as sys-admin... ultimately, I guess you could reduce the size of the centmin scripts a bit by removing all the --allow-root in the sources.
     
  4. eva2000

    eva2000 Administrator Staff Member

    29,013
    6,581
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,771
    Local Time:
    1:36 AM
    Nginx 1.13.x
    MariaDB 5.5