三个保障WordPress安全的方法

3 New Wordpress Security Tips I Learnt from Matt Cutts,三个简单的方法来保障WordPress安全:

1. 取消在header.php中的版本信息:
普通模板会在header.php中加入如下信息来显示使用中的WP版本,这样不良企图的人会根据版本来进行攻击。

  1. <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />

所以最好修改其隐藏版本信息

  1. <meta name="generator" content="WordPress" />

2. 在插件目录/plugins/中放入一空白的index.html
这样做的目的是防止别人通过访问此路径来获知你安装了哪些插件

3. 防止搜索引擎抓取/wp-admin/目录
在域名根目录中放入 robots.txt 文件,并且在文件内加入如下内容

  1. Disallow: /wp-admin/
  • 2007.08.15 01:33, Cloudream said:

    RSS/RDF/输出版本号的地方多了……

    [Reply]

  • 2007.08.15 02:45, kevin said:

    为什么不整个删除meta

    [Reply]

    • 2007.08.15 10:10, hhalloyy said:

      声明是什么平台还是有必要的,比如某些留言追踪服务能够更好把握

      [Reply]

  • 2007.08.15 02:47, kevin said:

    第二个我觉得也没有作用

    [Reply]

  • 2007.08.15 02:48, kevin said:

    第三个我是这么写的
    User-agent: *
    Disallow: /wp-
    Disallow: /feed/
    Disallow: /comments/feed
    Disallow: /trackback/
    Disallow: /date/

    [Reply]

  • 2007.08.15 03:00, 北极冰仔 said:

    只要有404页面,就查看不到plugins下面的内容。kevin写的robots文件不好。

    [Reply]

    • 2007.08.15 03:01, 北极冰仔 said:

      我错了,需要在.htaccess里设置。

      [Reply]

    • 2007.08.15 03:03, 北极冰仔 said:

      将Options -Indexes写入.htaccess,如果WP主题下存在404.php,那么访问没有index文件的目录就会返回404,比创建一堆index要简便。

      [Reply]

  • 2007.08.15 15:40, ppip said:

    我的还真能看到plugins。。。为什么wp官方不做这些修改呢?

    [Reply]

  • […] 三个保障WordPress安全的方法 三个保障WordPress安全的方法 (tags: Internet wordpress 安全) […]

    [Reply]




*You must say some Chinese, or just copy 你好! as begin.


This blog uses the CommentLuv plugin which will try and parse your sites feed and display a link to your last post, please be patient while it tries to find it for you.
2007-08-15
Home Loans