升级后......如图
主要是memcached引起的,删除下wp-content/object-cache.php的文件,再重装一次memcached。
我排查的方法:
1.先排掉插件改插件目录(把wp-conten目录下的plugins 的目录改个名),错误还在,排除;
2.在网站新建一个目录,下一份新的官网wordpress,能正常运行安装
3.最后打开了php.ini的错误提示,提示wp-content/object-cache.php错误,删除该文件。ok
如你装有W3,在你迁移vps时,我建议你先删除,再搬!搬好再安装!
2020-09-07 w3 在清理缓存 empty all caches 出现500,查看错误log提示:
2020/09/07 16:14:51 [error] 4217#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function W3TC\fnmatch() in /www/wp-content/plugins/w3-total-cache/Cache_File_Cleaner_Generic.php:58
Stack trace:
#0 /www/wp-content/plugins/w3-total-cache/Cache_File_Cleaner.php(48): W3TC\Cache_File_Cleaner_Generic->_clean('/www...', false)
#1 /www/wp-content/plugins/w3-total-cache/Cache_File_Generic.php(313): W3TC\Cache_File_Cleaner->clean()
#2 /www/wp-content/plugins/w3-total-cache/PgCache_Flush.php(240): W3TC\Cache_File_Generic->flush('')
#3 /www/wp-content/plugins/w3-total-cache/CacheFlush_Locally.php(260): W3TC\PgCache_Flush->flush_post_cleanup()
#4 /www/wp-includes/class-wp-hook.php(287): W3TC\CacheFlush_Locally->_execute_delayed_operations_pgcache(Array)
#5 /www/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)
#6 /www/wp-content/plugins/w3-total-cache/CacheFlush_Locally.php(252): apply_filters('w3tc_flush_exec" while reading response header from upstream, client: xxxxxx, server: caohuan.com, request: "GET /wp-admin/network/admin.php?page=w3tc_dashboard&w3tc_flush_all&_wpnonce=ea15a6380c HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-73.sock:", host: "caohuan.com", referrer: "https://caohuan.com/wp-admin/network/sites.php"
2020/09/07 16:15:33 [error] 4217#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function W3TC\fnmatch() in /www/wp-content/plugins/w3-total-cache/Cache_File_Cleaner_Generic.php:58
解决:主要是多次升级完版本后,w3自己把自己坑的。解决:
1、打开w3的general setting的页面
2、删除wp-content下的advanced-cache.php、db.php、object-cache.php的三个文件,
3、删除wp-content下cache目录,
4、回到后台的general setting的页面,点save all setting,保存。
到此因该会解决这个问题。
提示:经过上面的处理会发现,保存后生成的advanced-cache.php、db.php、object-cache.php的权限在相同的配置vps(Debian)+宝塔,生成的文件权限是不同的的,有生成644和666。cache的有777和755