我无法在部分网站上停用或激活插件,但并非所有网站都如此。我无法发现有问题的网站和没有问题的网站之间有任何相似之处。我收到一条消息,说您的插件已被停用或激活,但如果我刷新页面,则没有任何变化。
我在保存设置时也遇到了问题,而且这些设置与插件无关。我试图只测试 WordPress 核心功能,以排除插件问题。例如,如果我取消勾选“阻止搜索引擎索引此网站”并保存设置,则页面刷新时该设置仍处于勾选状态。
我可以创建一个新页面,因此对受影响的网站的某些区域进行的数据库更改是有效的。
问题始于本周周四左右。
那天,我在网站上安装了“iThemes Security”,因为被“限制登录尝试次数重新加载”锁定了。我知道这个插件会更改文件权限,所以我按如下方式重置了它们。文件夹 – 755。文件 – 644。wp-config.php – 600。问题仍然存在。
我已经更新了服务器上的大量软件包,但我说不出它们是什么。
我使用“SpinupWP”配置我的服务器,但可以理解的是,我需要自己解决服务器问题。他们的系统强迫我执行一项更新,该更新被称为......“升级以便 WordPress 可以生成 PDF 预览图像”我不知道这涉及什么,也不知道它是否与我的问题有关。
我一直在关注以下建议......
https://wordpress.org/support/article/common-wordpress-errors/#database-errors
特别是错误 13 – 无法创建/写入文件我不确定我会在哪里看到错误代码 13。我已经打开define('WP_DEBUG', true);
并检查了错误日志。
停用插件后错误日志中的结果是(我一直在测试重新生成缩略图或启用媒体替换),但实际上并没有被停用......
2020/01/25 02:59:19 [error] 14868#14868: *34160 FastCGI sent in stderr: "PHP message: PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; wp_my_plugin has a deprecated constructor in /sites/domain-removed.co.uk/files/wp-content/plugins/templatera-widget/index.php on line 16PHP message: PHP Deprecated: Function create_function() is deprecated in /sites/domain-removed.co.uk/files/wp-content/plugins/templatera-widget/index.php on line 80PHP message: RedisException: OOM command not allowed when used memory > 'maxmemory'. in /sites/domain-removed.co.uk/files/wp-content/object-cache.php:604
Stack trace:
#0 /sites/domain-removed.co.uk/files/wp-content/object-cache.php(604): Redis->set('caterquipventil...', 's:4591546:"a:2:...')
#1 /sites/domain-removed.co.uk/files/wp-content/object-cache.php(545): WP_Object_Cache->add_or_replace(true, 'mainwp_child_su...', 'a:2:{i:0;a:5:{s...', 'options', 0)
#2 /sites/domain-removed.co.uk/files/wp-content/object-cache.php(36): WP_Object_Cache->add('mainwp_child_su...', 'a:2:{i:0;a:5:{s...', 'options', 0)
#3 /sites/domain-removed.co.uk/files/wp-includes/option.php(105): wp_cache_add('mainwp_child_su...', 'a:2:{i:0;a:5:{s...', 'options')
#4 /sites/domain-removed.co.uk/files/wp-includes/option.php(486): get_option('mainwp_child_su...')
#5 /sites/domain-removed.co.uk/files/wp-content/plugins/mainwp-child/class/class-mainwp-helper.php(1194): add_option('mainwp_chi" while reading response header from upstream, client: 162.158.158.145, server: domain-removed.co.uk, request: "GET /wp-admin/plugins.php?action=deactivate&plugin=regenerate-thumbnails%2Fregenerate-thumbnails.php&plugin_status=all&paged=1&s&_wpnonce=bf96608e95 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-domain-removed.sock:", host: "domain-removed.co.uk", referrer: "https://domain-removed.co.uk/wp-admin/plugins.php?plugin_status=all&paged=1&s"
2020/01/25 02:59:22 [error] 14868#14868: *34162 FastCGI sent in stderr: "PHP message: PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; wp_my_plugin has a deprecated constructor in /sites/domain-removed.co.uk/files/wp-content/plugins/templatera-widget/index.php on line 16PHP message: PHP Deprecated: Function create_function() is deprecated in /sites/domain-removed.co.uk/files/wp-content/plugins/templatera-widget/index.php on line 80PHP message: RedisException: OOM command not allowed when used memory > 'maxmemory'. in /sites/domain-removed.co.uk/files/wp-content/object-cache.php:604
Stack trace:
#0 /sites/domain-removed.co.uk/files/wp-content/object-cache.php(604): Redis->set('caterquipventil...', 's:4646454:"a:2:...')
#1 /sites/domain-removed.co.uk/files/wp-content/object-cache.php(545): WP_Object_Cache->add_or_replace(true, 'mainwp_child_su...', 'a:2:{i:0;a:5:{s...', 'options', 0)
#2 /sites/domain-removed.co.uk/files/wp-content/object-cache.php(36): WP_Object_Cache->add('mainwp_child_su...', 'a:2:{i:0;a:5:{s...', 'options', 0)
#3 /sites/domain-removed.co.uk/files/wp-includes/option.php(105): wp_cache_add('mainwp_child_su...', 'a:2:{i:0;a:5:{s...', 'options')
#4 /sites/domain-removed.co.uk/files/wp-includes/option.php(486): get_option('mainwp_child_su...')
#5 /sites/domain-removed.co.uk/files/wp-content/plugins/mainwp-child/class/class-mainwp-helper.php(1194): add_option('mainwp_chi" while reading response header from upstream, client: 162.158.158.145, server: domain-removed.co.uk, request: "GET /wp-admin/plugins.php?deactivate=true&plugin_status=all&paged=1&s= HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-domain-removed.sock:", host: "domain-removed.co.uk", referrer: "https://domain-removed.co.uk/wp-admin/plugins.php?plugin_status=all&paged=1&s"
2020/01/25 02:59:24 [error] 14868#14868: *34168 FastCGI sent in stderr: "PHP message: PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; wp_my_plugin has a deprecated constructor in /sites/domain-removed.co.uk/files/wp-content/plugins/templatera-widget/index.php on line 16PHP message: PHP Deprecated: Function create_function() is deprecated in /sites/domain-removed.co.uk/files/wp-content/plugins/templatera-widget/index.php on line 80" while reading response header from upstream, client: 162.158.158.145, server: domain-removed.co.uk, request: "GET /wp-admin/admin-ajax.php?action=updraft_ajax&subaction=ping&nonce=00421e02f8&_fs_blog_admin=true HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-domain-removed.sock:", host: "domain-removed.co.uk", referrer: "https://domain-removed.co.uk/wp-admin/plugins.php?plugin_status=all&paged=1&s"
2020/01/25 02:59:25 [error] 14868#14868: *34170 FastCGI sent in stderr: "PHP message: PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; wp_my_plugin has a deprecated constructor in /sites/domain-removed.co.uk/files/wp-content/plugins/templatera-widget/index.php on line 16PHP message: PHP Deprecated: Function create_function() is deprecated in /sites/domain-removed.co.uk/files/wp-content/plugins/templatera-widget/index.php on line 80" while reading response header from upstream, client: 162.158.158.145, server: domain-removed.co.uk, request: "GET /wp-json/ithemes-security/v1/admin-notices?_locale=user HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-domain-removed.sock:", host: "domain-removed.co.uk", referrer: "https://domain-removed.co.uk/wp-admin/plugins.php?plugin_status=all&paged=1&s"
我没有发现任何可以帮助我的东西,而且我可以创建新页面,这表明我可以写入数据库。
但是, 在查看了几个包含目录中包含的文件后,我找到了我的 tmpdir 行。my.cnf
权限是根据/etc/mysql/my.cnf
tmpdir = /tmp
drwxrwxrwt
此链接关于字母 t 权限是正确的。
我检查了一个可以运行的站点和一个不可以运行的站点上的数据库用户权限,它们都被授予所有权限。
我最近不得不将磁盘空间从 25GB 调整到 80GB,因此我的 tmp 目录空间不足或文件过多的可能性似乎很现实。我一直在研究此链接介绍如何调整 tmp 目录的大小。如果有人认为我值得尝试一下,以及我是否应该担心什么,我会很感兴趣。事情已经很不妙了,我不想让事情变得更糟,只会得到这样的反馈:“你没有删除 tmp 目录,是吗?”。
我尝试mysqlcheck -r mydatabasename
按照本文。提示只是变成了,->
没有任何迹象表明是否发生了任何事情。设置仍然无法保存。
我尝试了 Health Check 插件,但无法激活它,因此我从插件目录中删除了所有插件(Health Check 除外),并切换到 Twenty Twenty 主题。报告的唯一问题是我将调试模式切换为 True。
考虑到当插件目录中没有其他插件时我可以激活和停用插件,我一次引入一个插件。对于每个插件,我都尝试激活、停用然后重新激活。此测试是在重新激活常规主题而不是 Twenty Twenty 主题的情况下进行的。几个插件要么无法激活,要么需要从文件夹中删除才能停用。在第二次尝试时,在测试了第一次可以正常工作的所有插件后,有问题的插件也正常工作了。我现在似乎能够在这个网站上激活和停用插件。但是,我仍然无法保存设置,因此存在导致间歇性问题的潜在问题。
journalctl 中似乎没有任何有用的东西。
我无法访问/etc/log/mysql
。权限是d rwx r-x --- root adm
我将自己添加到root
和adm
组,但这没有帮助,所以我还授予了Others
读取和执行访问权限,以便我可以进入。现在我已经看到了日志,我已恢复了这些更改。将读取和执行权限留给其他人是否安全?
现在,我查看了 mysql 错误日志,发现有问题的网站有一个包含 的错误"Got an error reading communication packets"
。我尝试暂时增加我的max_allowed_packet
和,max_connections
如下所示本文。还是没运气!
我不知道下一步该怎么做。如果有人能提供一些指导,我将不胜感激。
答案1
事实证明 SpinupWP 已推送更新,该更新已在文件maxmemory 64mb
中设置redis.conf
。注释掉此行并重新启动 redis 服务后,我所有的问题都消失了。