解决wordpress”正在执行例行维护,请一分钟后回来”

修改 /wp_admin/includes/class-wp-filesystem-direct.php 文件中的function_mkdir函数, 修改如下:
function mkdir($path, $chmod = false, $chown = false, $chgrp = false) {
// safe mode fails with a trailing slash under certain PHP versions.
$path = untrailingslashit($path);
if ( empty($path) )
$path = '/';
if ( ! $chmod )
$chmod = $this->permission;
if (ini_get('safe_mode')&& substr($path,-1) == '/')
{
$path = substr($path,0,-1);
}
if ( ! @mkdir($path) )
return false;
$this->chmod($path, $chmod);
if ( $chown )
$this->chown($path, $chown);
if ( $chgrp )
$this->chgrp($path, $chgrp);
return true;
}

将源代码中if(!$chmod)里面的代码修改成红色的代码之后马上就能回到正常的页面了.

发表评论