4

After the new release, obviously that core and plugin automatic updates it's not working by my side. For the core auto updates I added the following mu-plugin:

add_filter( 'allow_major_auto_core_updates', '__return_true' );
add_filter( 'allow_minor_auto_core_updates', '__return_true' );

As I don't want dev builds. And another mu-plugin for autoupdate plugins:

add_filter( 'auto_update_plugin', '__return_true' );

I also use W3-Total-Cache plugin and tried to clear all caches, still no success. Where is my mistake? How to debug this? Is the auto update feature uses cron jobs? Please advice. Thanks!

  • 1
    A little luck so far. I found that plugin Background Update Tester which detect why auto updates are not working. I had version control in my folder so I removed it and now everything is passing but still no upgrade either to the core or plugins occurred. – worldwildwebdev Aug 18 '16 at 11:32
  • So maybe my webserver would require FTP credentials to autoupdate so adding this to wp-config.php would be a clue: define(‘FS_METHOD’, ‘direct’); – worldwildwebdev Aug 18 '16 at 12:52
3

So basically there a few more things to watch out when debugging this issues. I did the following and everything works like a charm.

Downloaded the Background Update Tester plugin to see if there are any conflicts.

  • Your WordPress install can communicate with WordPress.org securely.
  • No version control systems were detected. (I had .git folder in my installation)
  • Your installation of WordPress doesn’t require FTP credentials to perform updates. If it does just add define('FS_METHOD','direct'); in the wp-config.php or add the credentials via some of those constants

define('FS_CHMOD_FILE', 0755); define('FS_CHMOD_DIR', 0755); define('FS_METHOD', 'ftpext'); define('FTP_BASE', '/httpdocs/'); define('FTP_CONTENT_DIR', '/httpdocs/wp-content/'); define('FTP_PLUGIN_DIR ', '/httpdocs/wp-content/plugins/'); define('FTP_USER', 'username'); define('FTP_PASS', 'password'); define('FTP_HOST', '123.456.789'); define('FTP_SSL', false);

  • All of your WordPress files are writable.
  • What about if you want to keep the version control, but still allow updates? – hazrpg Feb 15 '17 at 23:44
  • 1
    I would simply mark the unstaged or changed files as "Core files updated automatically" in the commit the next time I visited the repo. Because if I'm visiting the repo, then I'm about to make some manual code changes... and I would know which files I (am going to/have) changed. I already have a script which automates this when I manually update. I can understand the logic that if the git repo is within the root of the site, then auto-updates is not ideal because it is a staging site, but if it is up one directory or more... then it is wrong to assume. E.g. site root might be ignored. – hazrpg Feb 22 '17 at 22:00
  • The background update tester plugin now says that it has not been tested with recent versions, and when I installed it and activated it I could not find the menu item that it was supposed to put in the dashboard, so (barring user error) I suspect it may no longer work. – naomi Jan 18 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.