Discussion:
WP 3.7 auto-update
Luke Bryan
2013-10-04 19:21:56 UTC
Permalink
Greetings all,

I have a couple questions about the new auto-update feature: I was just
notified by email:
"Updating to WordPress 3.7-beta1-25639-20131003"

However It seems only 5 files in wp-includes have a modification date of
today. Is this normal?

I was also wondering if it could tell you what site had updated in the
email? Looks like another testing site was not getting the update, probably
because it was using autoFTP to modify files. It would be great to see what
site was updated.

Best regards,
Luke
Pascal Birchler
2013-10-10 13:37:38 UTC
Permalink
Yes, that's absolutely normal. WordPress only updates files that have
actually changed. Especially in a beta, only a couple of files change
between nightly releases.
Post by Luke Bryan
Greetings all,
I have a couple questions about the new auto-update feature: I was just
"Updating to WordPress 3.7-beta1-25639-20131003"
However It seems only 5 files in wp-includes have a modification date of
today. Is this normal?
I was also wondering if it could tell you what site had updated in the
email? Looks like another testing site was not getting the update, probably
because it was using autoFTP to modify files. It would be great to see what
site was updated.
Best regards,
Luke
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Andrew Nacin
2013-10-10 15:31:40 UTC
Permalink
On Thu, Oct 10, 2013 at 9:37 AM, Pascal Birchler
Post by Pascal Birchler
Yes, that's absolutely normal. WordPress only updates files that have
actually changed. Especially in a beta, only a couple of files change
between nightly releases.
That part is actually somewhat new. We used to copy over all files we
downloaded, which I guess might trigger an update to access time or change
time (but not modification time). In WordPress 3.7, we now md5 files before
copying and only copy over files that were changed. End result is the same,
but it means faster updates, and more stability as there are less I/O
operations.

Pretty cool, I think.

Nacin
Nikola Nikolov
2013-10-10 15:42:07 UTC
Permalink
That's pretty cool indeed. Is the same going to apply for plugin/theme
updates? As in is it part of the updater class?
Post by Andrew Nacin
On Thu, Oct 10, 2013 at 9:37 AM, Pascal Birchler
Post by Pascal Birchler
Yes, that's absolutely normal. WordPress only updates files that have
actually changed. Especially in a beta, only a couple of files change
between nightly releases.
That part is actually somewhat new. We used to copy over all files we
downloaded, which I guess might trigger an update to access time or change
time (but not modification time). In WordPress 3.7, we now md5 files before
copying and only copy over files that were changed. End result is the same,
but it means faster updates, and more stability as there are less I/O
operations.
Pretty cool, I think.
Nacin
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Andrew Nacin
2013-10-11 17:19:18 UTC
Permalink
Post by Nikola Nikolov
That's pretty cool indeed. Is the same going to apply for plugin/theme
updates?
No, plugin and theme updates still remove the old directory before
unzipping the new.
esmi at quirm dot net
2013-10-11 10:53:28 UTC
Permalink
Post by Andrew Nacin
Pretty cool, I think.
Will users be able to switch off auto-updates - say via wp-config.php -
in the final release? I've been asked that once or twice already.

Mel
--
http://quirm.net
http://blackwidows.co.uk
Nikola Nikolov
2013-10-11 11:37:11 UTC
Permalink
As stated here -
http://make.wordpress.org/core/2013/09/24/automatic-core-updates/ :

3. If the constants DISALLOW_FILE_MODS or AUTOMATIC_UPDATER_DISABLED are
defined, automatic updates are *disabled*
4. If the constant WP_AUTO_UPDATE_CORE is defined as *false*, automatic
updates are *disabled*

So - yeah you will be able to disable the automatic updates.

You can also check-out the section

I don’t like the sound of this, How do I turn it off?

In the above article - it lists the ways to disable the automatic updates.
Post by Andrew Nacin
Pretty cool, I think.
Will users be able to switch off auto-updates - say via wp-config.php - in
the final release? I've been asked that once or twice already.
Mel
--
http://quirm.net
http://blackwidows.co.uk
______________________________**_________________
wp-hackers mailing list
http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lists.automattic.com/mailman/listinfo/wp-hackers>
Mika A Epstein
2013-10-11 15:32:52 UTC
Permalink
And we'll put that in the OMGWTFBBQ post, and I'm SURE Nacin'll have it
in the Press Release on .org :)

And I'm sure we'll have people scream.
October 11, 2013 4:37 AM
As stated here -
3. If the constants DISALLOW_FILE_MODS or AUTOMATIC_UPDATER_DISABLED are
defined, automatic updates are *disabled*
4. If the constant WP_AUTO_UPDATE_CORE is defined as *false*, automatic
updates are *disabled*
So - yeah you will be able to disable the automatic updates.
You can also check-out the section
I don’t like the sound of this, How do I turn it off?
In the above article - it lists the ways to disable the automatic updates.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
October 11, 2013 3:53 AM
Will users be able to switch off auto-updates - say via wp-config.php
- in the final release? I've been asked that once or twice already.
Mel
--
Mika A Epstein (aka Ipstenu)
http://ipstenu.org | http://halfelf.org
Eric Hendrix
2013-10-11 15:36:09 UTC
Permalink
I'm sorry, I've got to agree with Nikola, anytime I hear "how do I turn it off" I want to go running screaming out the door and give up. There are certainly good reasons for not wanting to auto-update, but they should be few and far between when you're speaking of core.

Eric A. Hendrix
308 McFadyen Drive
Fayetteville, NC
28314
910.644.8940
***@gmail.com
www.hendronix.com
Post by Mika A Epstein
And we'll put that in the OMGWTFBBQ post, and I'm SURE Nacin'll have it
in the Press Release on .org :)
And I'm sure we'll have people scream.
October 11, 2013 4:37 AM
As stated here -
3. If the constants DISALLOW_FILE_MODS or AUTOMATIC_UPDATER_DISABLED are
defined, automatic updates are *disabled*
4. If the constant WP_AUTO_UPDATE_CORE is defined as *false*, automatic
updates are *disabled*
So - yeah you will be able to disable the automatic updates.
You can also check-out the section
I don’t like the sound of this, How do I turn it off?
In the above article - it lists the ways to disable the automatic updates.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
October 11, 2013 3:53 AM
Will users be able to switch off auto-updates - say via wp-config.php
- in the final release? I've been asked that once or twice already.
Mel
--
Mika A Epstein (aka Ipstenu)
http://ipstenu.org | http://halfelf.org
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
esmi at quirm dot net
2013-10-11 16:34:20 UTC
Permalink
Post by Eric Hendrix
There are certainly good reasons for not wanting to auto-update, but
they should be few and far between when you're speaking of core.
Agreed. And it's certainly something that we will be advising *against*
in the forums if at all possible.

Mel
--
http://quirm.net
http://blackwidows.co.uk
Micky Hulse
2013-10-11 17:06:42 UTC
Permalink
Great thread!

Auto update sounds like an awesome new feature!

For one of my setups, WP core is a GitHub submodule. I have
not tested the beta WP with this new feature, but I was thinking that
auto updates would not mesh well in a submodule situation?
Amy Hendrix
2013-10-11 17:10:08 UTC
Permalink
Autoupdates are disabled if you're under version control -- or rather,
you'd have to go way out of your way to make it be otherwise. So your
submodule install won't be messed with.
Post by Micky Hulse
Great thread!
Auto update sounds like an awesome new feature!
For one of my setups, WP core is a GitHub submodule. I have
not tested the beta WP with this new feature, but I was thinking that
auto updates would not mesh well in a submodule situation?
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Micky Hulse
2013-10-11 17:32:04 UTC
Permalink
Post by Amy Hendrix
Autoupdates are disabled if you're under version control -- or rather,
you'd have to go way out of your way to make it be otherwise. So your
submodule install won't be messed with.
Wow, that's great! Thanks for the clarification.

On one hand, I'd hate to miss out on auto updates, but on the other, I
really love the submodule setup I've got going on.

Thanks!
Eric Hendrix
2013-10-11 18:14:17 UTC
Permalink
Amy, are you related to me?
Post by Micky Hulse
Post by Amy Hendrix
Autoupdates are disabled if you're under version control -- or rather,
you'd have to go way out of your way to make it be otherwise. So your
submodule install won't be messed with.
Wow, that's great! Thanks for the clarification.
On one hand, I'd hate to miss out on auto updates, but on the other, I
really love the submodule setup I've got going on.
Thanks!
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
--
*Eric A. Hendrix*
***@gmail.com
(910) 644-8940

*"Non Timebo Mala"*
Amy Hendrix
2013-10-11 18:23:11 UTC
Permalink
Not that I know of, but nice to meetcha ;)
Post by Eric Hendrix
Amy, are you related to me?
Post by Micky Hulse
Post by Amy Hendrix
Autoupdates are disabled if you're under version control -- or rather,
you'd have to go way out of your way to make it be otherwise. So your
submodule install won't be messed with.
Wow, that's great! Thanks for the clarification.
On one hand, I'd hate to miss out on auto updates, but on the other, I
really love the submodule setup I've got going on.
Thanks!
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
--
*Eric A. Hendrix*
(910) 644-8940
*"Non Timebo Mala"*
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Eric Hendrix
2013-10-11 18:26:11 UTC
Permalink
You musta got the smart genes! ;)
Post by Amy Hendrix
Not that I know of, but nice to meetcha ;)
Post by Eric Hendrix
Amy, are you related to me?
Post by Micky Hulse
Post by Amy Hendrix
Autoupdates are disabled if you're under version control -- or rather,
you'd have to go way out of your way to make it be otherwise. So your
submodule install won't be messed with.
Wow, that's great! Thanks for the clarification.
On one hand, I'd hate to miss out on auto updates, but on the other, I
really love the submodule setup I've got going on.
Thanks!
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
--
*Eric A. Hendrix*
(910) 644-8940
*"Non Timebo Mala"*
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
--
*Eric A. Hendrix*
***@gmail.com
(910) 644-8940

*"Non Timebo Mala"*
Ryan McCue
2013-10-11 17:11:02 UTC
Permalink
Post by Micky Hulse
Great thread!
Auto update sounds like an awesome new feature!
For one of my setups, WP core is a GitHub submodule. I have
not tested the beta WP with this new feature, but I was thinking that
auto updates would not mesh well in a submodule situation?
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
WordPress will automatically detect if you're in a git/svn/hg/bzr
repository and not activate the upgrades if so. This should work for
submodules too (submodules just have a .git file instead of a .git
directory).
--
Ryan McCue
<http://ryanmccue.info/>
Andrew Nacin
2013-10-11 17:18:03 UTC
Permalink
Post by Ryan McCue
WordPress will automatically detect if you're in a git/svn/hg/bzr
repository and not activate the upgrades if so. This should work for
submodules too (submodules just have a .git file instead of a .git
directory).
It actually uses is_dir() instead of file_exists(). But, we walk up the
directory tree to the very top of the disk. So if your submodule is /srv/
example.com/public_html/wordpress/, we'll look for a .git directory in
these places:

* /srv/example.com/public_html/wordpress/.git (which will be a file)
* /srv/example.com/public_html/.git
* /srv/example.com/.git
* /srv/.git
* /.git

So basically: We won't notice your submodule, but we will notice your
submodule is part of a git repository.

If someone thinks we should use file_exists() instead, that's fine. I
wanted to avoid false positives with a file named .svn, .git, .hg, or .bzr,
but I had forgotten that submodules use a .git file, so it might be more
trouble than its worse.

Nacin
Micky Hulse
2013-10-11 18:50:12 UTC
Permalink
Thanks for the details Andrew!
Post by Andrew Nacin
It actually uses is_dir() instead of file_exists(). But, we walk up the
...
* /srv/example.com/public_html/wordpress/.git (which will be a file)
* /srv/example.com/public_html/.git
* /srv/example.com/.git
* /srv/.git
* /.git
If someone thinks we should use file_exists() instead, that's fine. I
wanted to avoid false positives with a file named .svn, .git, .hg, or .bzr,
but I had forgotten that submodules use a .git file, so it might be more
trouble than its worse.
Based on your example above, it seems like is_dir() should work well
in a submodule setup.

My particular submodule setup looks essentially like:

/content/
/index.php
/wp (submodule)
/wp-config.php
/.git/

Which should meet the pattern you gave above.

Based on what I have seen, the above submodule setup is a standard way
of doing it. Seems like is_dir() would work perfectly. :)

Otto
2013-10-11 15:56:55 UTC
Permalink
And we'll put that in the OMGWTFBBQ post, and I'm SURE Nacin'll have it in
the Press Release on .org :)
And I'm sure we'll have people scream.
Note that for the majority of cases where users would legitimately
need it to be turned off, it is turned off automatically.

- If the setup is such that the user must put in FTP credentials or similar,
- If there are .svn or .git directories, indicating the user has a
deployment system for the site,
- If getting files via SSL doesn't work for whatever reason, so it
can't download securely,
- If wp-cron is buggered for whatever reason and the updater doesn't fire,
- If file modification has been manually disabled with
DISALLOW_FILE_MODS being defined,

Any of these will cause it to disable the auto-updater. Turning it off
manually should be a relatively rare operation, for those people with
special cases or needs.

If they do want to turn it off, then there's a few good ways:

1. define ('AUTOMATIC_UPDATER_DISABLED', true); - This is a blunt
instrument. It simply disables the core automatic upgrader code at the
root. Overrides everything.

2. WP_AUTO_UPDATE_CORE can be defined instead to allow more fine
grained control. Set it to one of these:
- false = no updates
- true = ALL updates
- minor = Minor releases only
Using this essentially sets the default values for the following
filters. Using these following filters will allow you to override this
define.

3. Filters exist to allow you to allow specific kinds of updates as well:
allow_dev_auto_core_updates - if you're on a development version, and
this filter gets returned a true value, then it will enable dev/beta
updates.

allow_minor_auto_core_updates
allow_major_auto_core_updates - Pretty much what it says on the box.
Return true to allow each of these, false to disallow them.

-Otto
Nikola Nikolov
2013-10-11 16:19:46 UTC
Permalink
The default is to do only minor core updates, correct? If so then it makes
very little sense to have automatic core updates disabled(unless you have
source control or any of the other special cases of course).
Post by Otto
Post by Mika A Epstein
And we'll put that in the OMGWTFBBQ post, and I'm SURE Nacin'll have it
in
Post by Mika A Epstein
the Press Release on .org :)
And I'm sure we'll have people scream.
Note that for the majority of cases where users would legitimately
need it to be turned off, it is turned off automatically.
- If the setup is such that the user must put in FTP credentials or similar,
- If there are .svn or .git directories, indicating the user has a
deployment system for the site,
- If getting files via SSL doesn't work for whatever reason, so it
can't download securely,
- If wp-cron is buggered for whatever reason and the updater doesn't fire,
- If file modification has been manually disabled with
DISALLOW_FILE_MODS being defined,
Any of these will cause it to disable the auto-updater. Turning it off
manually should be a relatively rare operation, for those people with
special cases or needs.
1. define ('AUTOMATIC_UPDATER_DISABLED', true); - This is a blunt
instrument. It simply disables the core automatic upgrader code at the
root. Overrides everything.
2. WP_AUTO_UPDATE_CORE can be defined instead to allow more fine
- false = no updates
- true = ALL updates
- minor = Minor releases only
Using this essentially sets the default values for the following
filters. Using these following filters will allow you to override this
define.
allow_dev_auto_core_updates - if you're on a development version, and
this filter gets returned a true value, then it will enable dev/beta
updates.
allow_minor_auto_core_updates
allow_major_auto_core_updates - Pretty much what it says on the box.
Return true to allow each of these, false to disallow them.
-Otto
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Continue reading on narkive:
Loading...