分类 WordPress 下的文章

如果升级一半失败了,要重新开始升级,会出现一个提示:Another update is currently in progress.

这时,需要执行一个命令:wp option delete core_updater.lock,如果执行成功,会有这样的outputSuccess: Deleted 'core_updater.lock' option.

就可以继续从头一键升级了。

那么,wp是什么?请看:https://wp-cli.org

在后台管理界面一键升级,可能会出现升级的时候超时错误:Fatal error: Maximum execution time of 30 seconds exceeded

这是由于php.ini里的设置问题:

找到这一行,设置一下即可:max_execution_time = 360, 原来的默认值是30,这就是错误信息里的30秒的来源。

- 阅读剩余部分 -

主要是通过直接添加一个用户来实现。
有2个表:wp-userswp-usermeta

1、向wp_users表添加一个用户:Fill in the following fields.

  • ID is any number you choose
  • user_login is the username for accessing the WordPress Dashboard.
  • user_pass is the password for the user. Make sure to select MD5 in the functions menu (这里的意思是,可以直接填写明文密码,选择左侧函数页选项里的MD5,就自动加密了)
  • user_nicename is the nickname for the user
  • user_email is the email address you want to associate with this user
  • user_registered is the date and time for when this user is registered
  • user_status should be set to 0
  • display_name is the name that will be displayed for this user on your site

2、 向wp_usermeta表添加一个记录:

  • user_id is the ID you entered in the previous step
  • meta_key should be the phrase wp_capabilities
  • meta_value should be a:1:{s:13:"administrator";s:1:"1";}