Cannot remove directory: /wp-content/uploads/fw-backup/tmp

朋友虚拟主机,装了WordPress,遇到后台工具,装主题的demo失败的情况提示是:

Cannot remove directory: /wp-content/uploads/fw-backup/tmp

或者

Cannot create directory: /wp-content/uploads/fw-backup/tmp

开始以为是主题的功能,找了一下,最终定位到插件Unyson,解决办法,直接硬改,

/wp-content/plugins/unyson/framework/extensions/backups/includes/module/tasks/type/class-fw-ext-backups-task-type-dir-clean.php
		if (file_exists($dir)) {
if (!fw_ext_backups_rmdir_recursive($dir)) {
return new WP_Error(
'rmdir_fail', __('Cannot remove directory', 'fw') .': '. $dir
);
}
}
if (!mkdir($dir, 0777, true)) {
return new WP_Error(
'mkdir_fail', __('Cannot create directory', 'fw') .': '. $dir
);
}

注释掉:

        /*
if (file_exists($dir)) {
if (!fw_ext_backups_rmdir_recursive($dir)) {
return new WP_Error(
'rmdir_fail', __('Cannot remove directory', 'fw') .': '. $dir
);
}
}
if (!mkdir($dir, 0777, true)) {
return new WP_Error(
'mkdir_fail', __('Cannot create directory', 'fw') .': '. $dir
);
}
*/

然后安静了~


未经允许不得转载:阿藏博客 » Cannot remove directory: /wp-content/uploads/fw-backup/tmp