Web : Automatic updates for WordPress and plugins no longer works after version 4.2.0

By | June 7, 2015

If you have recently updated to WordPress version 4.2.0 and try to update to version 4.2.1+ or try to updates your plugins through the CMS, the “update” status and the is spinning forever and do not complete/stuck.

I have noticed the following in the Web server error logs :

PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 523800 bytes) in /wp-admin/includes/file.php on line 159, referer: http://www.domain.tld/wp-admin/update-core.php?action=do-core-upgrade

This is a code related issue located in “file.php”. To resolve this matter, simply edit the following file (please backup the original first!) :

/wp-admin/includes/file.php

Then go to line number 149 and locate the following :

if ( empty( $filename ) || '.' == $filename ) {

Completely delete that line and replace with :

if ( empty( $filename ) || '.' == $filename || '/' === $filename ) {

Save the file and your WordPress and plugins should work again.