Welcome to Centmin Mod Community
Register Now

WP-Cli problem after upgrading PHP to 7.4.14

Discussion in 'Install & Upgrades or Pre-Install Questions' started by minodd, Jan 12, 2021.

  1. minodd

    minodd New Member

    19
    2
    3
    Nov 29, 2018
    Ratings:
    +3
    Local Time:
    2:50 PM
    Nginx 1.15.6
    MariaDB 10
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.19.6
    • PHP Version Installed: 7.4.14

    Hey there! I've upgraded PHP from 7.4.13 to 7.4.14 yesterday after running cmupdate. Then, I've noticed a wired things: every time when I log into the system through SSH, just under the centmin message block, I saw this error:


    Code:
    -bash: /root/wpcli/wp-completion.bash: No such file or directory
    There is actually no such wpcli folder within the root folder. What could have been gone wrong? Thank you in advance!
     
  2. eva2000

    eva2000 Administrator Staff Member

    47,008
    10,653
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,533
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Do you have Wordpress sites created with centmin.sh menu option 22 ? How old are these Wordpress sites from creation?

    what if you run
    Code (Text):
    cmupdate
    /usr/local/src/centminmod/addons/wpcli.sh update
    

    what output do you get from wpcli.sh update command?

    for posting code or output from commands to keep the formatting, you might want to use CODE tags for code How to use forum BBCODE code tags :)
     
  3. minodd

    minodd New Member

    19
    2
    3
    Nov 29, 2018
    Ratings:
    +3
    Local Time:
    2:50 PM
    Nginx 1.15.6
    MariaDB 10
    Hey buddy! Thank you for your reply!

    Yes, there is a Wordpress website installed using Option 22. It was installed on 01.01.2021.

    Below are the outputs of running wpcli.sh:

    Code (Text):
    updating...
    -------------------------------------------------------------
    update wp-cli packages
    Using Composer to update packages...
    ---
    Loading composer repositories with package information
    Updating dependencies
    Resolving dependencies through SAT
    Looking at all rules.
    Something's changed, looking at all rules again (pass #1)
    
    Dependency resolution completed in 0.016 seconds
    Analyzed 1766 packages to resolve dependencies
    Analyzed 66878 rules to resolve dependencies
    Nothing to install or update
    Generating autoload files
    ---
    Success: Packages updated.
    -------------------------------------------------------------
    update wp-cli
    2021-01-12 15:40:19 URL:https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar [5568133/5568133] -> "/usr/bin/wp" [1]
    OS:   Linux 5.10.5-1.el7.elrepo.x86_64 #1 SMP Tue Jan 5 11:15:52 EST 2021 x86_64
    Shell:   /bin/bash
    PHP binary:   /usr/local/bin/php
    PHP version:   7.4.14
    php.ini used:   /usr/local/lib/php.ini
    WP-CLI root dir:   phar://wp-cli.phar/vendor/wp-cli/wp-cli
    WP-CLI vendor dir:   phar://wp-cli.phar/vendor
    WP_CLI phar path:   /root
    WP-CLI packages dir:   /root/.wp-cli/packages/
    WP-CLI global config:
    WP-CLI project config:
    WP-CLI version:   2.4.0
    
    -------------------------------------------------------------
    wp-cli update completed
    Read http://wp-cli.org/ for full usage info
    -------------------------------------------------------------
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    47,008
    10,653
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,533
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    now do you still get that error on SSH login? if you do what is output/contents of /root/.bash_profile file?

    Code (Text):
    cat /root/.bash_profile
     
  5. minodd

    minodd New Member

    19
    2
    3
    Nov 29, 2018
    Ratings:
    +3
    Local Time:
    2:50 PM
    Nginx 1.15.6
    MariaDB 10
    Yep, it's still having that error. Here is the output of the file you mentioned. I saw that command finally. How should I correct it, as it's stating the wrong path?

    Code (Text):
    # .bash_profile
    
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
       . ~/.bashrc
    fi
    
    # User specific environment and startup programs
    
    PATH=$PATH:$HOME/bin
    
    export PATH
    export EDITOR=nano
    
    # WP-CLI completions
    source /root/wpcli/wp-completion.bash
    
     
  6. eva2000

    eva2000 Administrator Staff Member

    47,008
    10,653
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,533
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    what do you get for command
    Code (Text):
    ls -lah /root/wpcli/wp-completion.bash

    example I get
    Code (Text):
    ls -lah /root/wpcli/wp-completion.bash
    -rw-r--r-- 1 root root 495 Jul 12  2019 /root/wpcli/wp-completion.bash
    

    if it is missing try running install command for addons/wpcli.sh
    Code (Text):
    /usr/local/src/centminmod/addons/wpcli.sh install
    
     
  7. minodd

    minodd New Member

    19
    2
    3
    Nov 29, 2018
    Ratings:
    +3
    Local Time:
    2:50 PM
    Nginx 1.15.6
    MariaDB 10
    It's indeed missing. So I tried to run the install command. It simply showed

    Code (Text):
    installing...
    


    Then quit. I rerun the ls command, still showing "No such file or directory". I guess there must be something wrong with this Centminmod install. Should I reinstall it all over again?
     
  8. eva2000

    eva2000 Administrator Staff Member

    47,008
    10,653
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,533
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Are you SSH logging in as root user or non root user?
     
  9. minodd

    minodd New Member

    19
    2
    3
    Nov 29, 2018
    Ratings:
    +3
    Local Time:
    2:50 PM
    Nginx 1.15.6
    MariaDB 10
    I'm using non-root user login first, then "su" to change to root. I'm doing this with all my other VPSes, same system, same Centminmod settings, and installations. Only this one got this problem...
     
  10. eva2000

    eva2000 Administrator Staff Member

    47,008
    10,653
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,533
    Local Time:
    4:50 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    type these 2 commands as SSH root user to install the missing file manually
    Code (Text):
    WPCLIDIR='/root/wpcli'
    wget -4 https://github.com/wp-cli/wp-cli/raw/master/utils/wp-completion.bash -O ${WPCLIDIR}/wp-completion.bash
    
     
  11. minodd

    minodd New Member

    19
    2
    3
    Nov 29, 2018
    Ratings:
    +3
    Local Time:
    2:50 PM
    Nginx 1.15.6
    MariaDB 10
    Cool! The problem is resolved! Thank you very much like always!