WordPress后台在线更新失败问题解决

WordPress后台在线更新失败问题解决

本文主要介绍WordPress后台在线更新,更新失败主要原因是目录权限问题,目录没有读写的权限,需要加上相应的权限即可!

更新失败提示

Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /var/www/blog/wordpress/wp-admin/includes/update.php on line 143
    Downloading update from https://downloads.wordpress.org/release/wordpress-5.9.2-new-bundled.zip…

    The authenticity of wordpress-5.9.2-new-bundled.zip could not be verified as no signature was found.

    Unpacking the update…

    Could not create directory.

    Installation failed.

给wp-content目录加上权限

cd wordpress
chmod -R o+rw wp-content

更新失败提示

Warning: copy(/var/www/blog/wordpress/wp-admin/includes/update-core.php): failed to open stream: Permission denied in /var/www/blog/wordpress/wp-admin/includes/class-wp-filesystem-direct.php on line 309
    The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php

    Installation failed.

给wp-admin目录加上权限

chmod -R o+rw wp-content

更新时出现

Another update is currently in progress. 在配置表中删除:core_updater.lock 这条数据删除即可。

SELECT * FROM `wp_options` WHERE `option_name` = 'core_updater.lock'

WordPress更新失败

如果还没有解决问题,此时就把整个项目的目录权限加上可读写

chmod -R go+rw wordpress

以上更新亲自测试过,更新成功!!!

Loading...