wordpress 对付 spam 的简单办法

想不到刚装上 wordpress 就有垃圾评论:-(,看了看源码,评论功能对应的文件是 wp-comments-post.php,grep 了一把,只在 wp-content/themes/*/ 下面有一两个文件引用到,看来只要改自己的 theme 里面的文件就可以,我用的 theme 是 ocadia,wp-content/themes/ocadia/ 下面只有文件 comments.php 中引用到 wp-comments-post.php,两步:

  1. 把 wp-content/themes/ocadia/comments.php 中的wp-comments-post.php 改为 wp-respond-post.php
  2. 把根目录 wp-comments-post.php 改名为 wp-respond-post.php

这样应可对付大部分弱智的 spam 程序了,当然稍高明一点的程序可以扫描评论页面中的 form 关键字取到后面的地址,这个办法就不适用,最好还是取装相关插件了。

0 Comments so far

  1. There are currently no comments.
Leave a Comment?


« 涂鸦  —  小心你的 Email 暴露在 news server 上 »

Tags

Blogroll

Fairy World | STUPiD | 阅微草堂 | ShelleX | 流浪五天