wordpress优化:关闭或禁止站内搜索功能降低数据库压力-WordPress主题

摘要:WordPress是非常优化的个人博客cms程序,是用户使用量最大的建站程序。但要合理解决程序的负载问题,否则随着内容越…

WordPress是非常优化的个人博客cms程序,是用户使用量最大的建站程序。但要合理解决程序的负载问题,否则随着内容越来越多速度很越来越慢,所以我们需要对wordpress程序做一些速度优化提升,程序自带的搜索机制常常会导致数据库过载,所以对于站内搜索使用频次不大的网站大可以停止搜索功能。方法如下

将以下代码添加到当前主题的Functions.php文件中即可生效。

这时候我们再去强行使用搜索功能就会得到一个404页面。

来源:http://www.wazhuti.com/2328.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_13197.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?