Welcome to Centmin Mod Community
Become a Member

Wordpress WP Cron is not working

Discussion in 'Blogs & CMS usage' started by Dhavid Claudius Gunawan, Nov 22, 2015.

  1. Dhavid Claudius Gunawan

    Dhavid Claudius Gunawan New Member

    5
    1
    3
    Nov 22, 2015
    Ratings:
    +1
    Local Time:
    11:57 AM
    1.9.7
    10.0.22
    Hello,

    For last few days, I am using Wordpress that are created from centminmod script.
    So far, all went great and smooth, but I just notice 1 problem.

    My regular backup files are not updated, after some investigation I notice that the cron job for the last few days are not working. I try to do some digging, and found out that CentMinMod are disabling WP Cron.

    I already uncomment the WP Cron disable on WP-Config files, but it seems it still not working.

    Could anyone help me to get some help to solve this problem?

    Thanks.
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    2:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    centmin.sh menu option 22 auto installed Wordpress outlined at Wordpress Nginx Auto Installer (WP Super Cache) disables wp-cron and uses system cronjob via crond, so ensure crond servcie is running on your server and check /var/log/cron for the cronjob entry

    so output for
    Code:
    crontab -l
    
    would have something like which runs every 15 minutes
    Code:
    */15 * * * * sleep 119s ; wget -O - -q -t 1 http://newdomain2.com/wp-cron.php?doing_wp_cron=1 > /dev/null 2>&1
    and /var/log/cron log would have entries for it
    Code:
    tail -20 /var/log/cron
     
  3. Dhavid Claudius Gunawan

    Dhavid Claudius Gunawan New Member

    5
    1
    3
    Nov 22, 2015
    Ratings:
    +1
    Local Time:
    11:57 AM
    1.9.7
    10.0.22

    Hello,

    Thanks for the reply.
    I am using BackWPUp plugin that backup my files on DropBox.
    It is using WP Cron to get the job done.

    May I ask, how can I revert back to the old WP Cron.
    Disabling auto update on system cron job I think won't be a problem since I usually manage my update manually.

    Once again, thanks for the help and have a nice weekend
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    2:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    you should be able to edit wp-config.php and set
    Code:
    define('DISABLE_WP_CRON', false;
    then using command below to invoke nano linux text editor remove the cronjob line ONLY and ctrl+x and save to reinitialise the cron scheduling
    Code:
    crontab -e
    then restart php-fpm to ensure zend opcache cache is cleared for wp-config.php
    Code:
    fpmrestart
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    2:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    never used your plugin but from WordPress › BackWPup Free - WordPress Backup Plugin « WordPress Plugins

     
  6. Dhavid Claudius Gunawan

    Dhavid Claudius Gunawan New Member

    5
    1
    3
    Nov 22, 2015
    Ratings:
    +1
    Local Time:
    11:57 AM
    1.9.7
    10.0.22
    Many thanks for the help.

    Also I wonder if you ever try Vault Press? Would you think it would work fine, considering the WP cron are disabled? I am thinking about multiple backup, since my website is down last week. And since the WP cron aren't working, my backup are a few days left behind, so I have to re write all of the article which is quite a bummer.
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    2:57 PM
    Nginx 1.13.x
    MariaDB 5.5
  8. Dhavid Claudius Gunawan

    Dhavid Claudius Gunawan New Member

    5
    1
    3
    Nov 22, 2015
    Ratings:
    +1
    Local Time:
    11:57 AM
    1.9.7
    10.0.22
    • Like Like x 1