Join the community today
Register Now

Wordpress Wordpress wp-cli

Discussion in 'Blogs & CMS usage' started by SFLC, Dec 14, 2016.

  1. SFLC

    SFLC Active Member

    223
    59
    28
    Dec 4, 2016
    The Canadas
    Ratings:
    +112
    Local Time:
    10:16 AM
    1
    10
    I want to stop WordPress WP-CLI Auto Update from running, mainly as it restarts php-fpm every time it runs and I don’t want that.

    So is there any way to block it from running or atleast stop it from restarting php-fpm a few times a day. My server runs other websites where uploads and downloads take place and I can’t have wordpress restarting things whenever it feels like it.

    In the wp-config file i added the following

    define( ‘WP_AUTO_UPDATE_CORE’, ‘false’ );
    define( ‘AUTOMATIC_UPDATER_DISABLED’, true );

    and it still continued running and ignored the aforementioned lines


    and I tried a few plugins that disable updates and still no joy.

    I’m running wp 4.7.

    What sucks about dealing with this is whatever change I make i have to wait to see if it’ll try to auto update by itself, this is not right.

    I also checked crontab and there’s nothing there.

    I reached out to wordpress support and they said they don't bundle wp-cli,

    so since i installed it from the centmin menu it must have added it from there,
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,946
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,812
    Local Time:
    6:16 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    the wp-cli update is in cronjob

    you can see your cronjobs via command as root user
    Code (Text):
    crontab -l
    

    use crontab -e command to invoke nano text editor see guide at HowTo: Add Jobs To cron Under Linux or UNIX?

    it would reference a script generated by centmin.sh menu option 22 /root/tools/wp_updater_${vhostname}.sh where ${vhostname} is your site domain name

    the nginx/php-fpm restart is to make sure zend opcache picks up the updated wordpress files due to the opcache.revalidate_freq setting in zendopcache.ini
    Code (Text):
    ; http://php.net/manual/en/opcache.configuration.php#ini.opcache.revalidate-freq
    ; defaults to zend opcache checking every 180 seconds for PHP file changes
    ; set to zero to check every second if you are doing alot of frequent
    ; php file edits/developer work
    ; opcache.revalidate_freq=0
    opcache.revalidate_freq=180
     
  3. SFLC

    SFLC Active Member

    223
    59
    28
    Dec 4, 2016
    The Canadas
    Ratings:
    +112
    Local Time:
    10:16 AM
    1
    10
    awesome thanks worked like a charm