[wp-trac] [WordPress Trac] #37242: Partial updates not updating some server side files date and time.

WordPress Trac noreply at wordpress.org
Thu Jun 30 12:11:45 UTC 2016


#37242: Partial updates not updating some server side files date and time.
--------------------------+-----------------------------
 Reporter:  mitchellk     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.5.3
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi there

 I came across quite a serious problem after several weeks of trying to
 identifying a problem with my site. I feel this is a very important issue
 that needs attention.

 I had a problem where my Server Headers (Apache 2.4.7 / Ubuntu 14.04) were
 being messed with.

 In particular the Last-Modified server header on my site was returning a
 date and time (of all blog posts) to browsers and spiders of Tue, 02 Dec
 2014 11:21:14 GMT

 I spent several weeks with Yoast SEO's support who were helping me try and
 diagnose the cause of this and they narrowed it down to a few plugins.

 It's true that each of the 4 plugins they mentioned to me after their
 extensive testing (yoast seo included) were all part of the problem of the
 Last-Modified date being messed up with the very old date of Tue, 02 Dec
 2014 11:21:14 GMT

 Turning off each plugin one at a time, or all at the same time would
 immediately fix the date and time problem on all blog posts but for me all
 plugins involved were all running on 15 other sites and I could not
 reproduce the problem.

 After several weeks though of dealing with Yoast SEO and two other plugin
 authors I came across the very real issue this morning.

 I checked the dates and times of the actual wordpress files in the web
 site folder and was horrified to see that index.php had a date and time on
 it of exactly Tue, 02 Dec 2014 11:21:14 GMT

 In fact there were all sorts of wordpress files in the root folder of the
 site with the same date but times were a few seconds or minutes off.

 I then checked folders and sub folders of the site and once again found
 folders and files inside those folders all dated back to 2014.

 I did a recursive touch on the folder from the command line of Ubuntu and
 immediately all files and folders are now reflecting today's date and time
 however this really should not be the fix as I will describe further.

 My WORRY with this is my site has been through so many updates since
 December 2014. All of these updates are done inside the Wordpress Admin
 menu > Updates section which as I read through your code this morning
 pulls a partial update from your servers.

 It seems when those partial updates are pulled that certain files which
 have not changed are not being pulled into the site. That's
 understandable, why waste bandwidth if they have not changed.

 The problem is, as you can see, some files had a very old date and time on
 them which has caused me weeks of headaches and several plugin authors
 too.

 I honestly believe that when Wordpress updates it should do a touch inside
 the folder on all it's core files to reflect that same date and time of
 the last time wordpress was actually updated but it's not doing that.

 I confirmed this again by doing the following

 After I had touched the entire folder all my files had a date and time of:
 2016/06/30 - 12:56:56

 I then went into the Wordpress Admin menu for the site concerned and I
 clicked the button "Reinstall Wordpress"

 I then checked the dates and times of the files in the folder and none had
 changed except for the readme file and license.txt which had a date and
 time of 2016/06/30 - 13:06:18

 The only other folders whose date and time changed after I said Reinstall
 Wordpress was the following folders
 Wp-Content - 2016/06/30 - 13:33:40
 upgrade - 2016/06/30 - 13:33:28

 All other files dates and times remained exactly what they were after I
 had touched the entire folder.

 I am sure by now you can see a trend developing here because if this
 continues in 2 years time my index.php will have a date and time of today
 and be technically 2 years stale.

 On all my sites the apache user www-data has is both owner and group of
 all files and directories and all permissions are set as per your codex.

 I checked the other 15 sites of mine and they too have the same date and
 time problem on the main wordpress files, especially index.php

 I also believe there is a problem when I click "Reinstall Wordpress" it
 still appears to be pulling a partial update instead of actually replacing
 all wordpress files to ensure a clean installation but it's not doing
 that.

 Let's say one had an infected web site ... effectively clicking reinstall
 wordpress does not appear to be replacing all files as one would think,
 perhaps it is, but as you can see here file date and times do not reflect
 that is even happening.

 I hope this report helps and I look forward to your feedback on it.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37242>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list