Welcome to Centmin Mod Community
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

    173
    55
    28
    Nov 8, 2015
    Ratings:
    +101
    Local Time:
    12:53 PM
    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

    54,858
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    12:53 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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

    173
    55
    28
    Nov 8, 2015
    Ratings:
    +101
    Local Time:
    12:53 PM
    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

    54,858
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    12:53 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+