提高WordPress安全性必须掌握的5种方法

WordPress是一种使用 PHP 语言开发的博客平台,用户可以在支持 PHP 和 MySQL 数据库的服务器上架设自己的博客。全球大约有20%的用户在使用 WordPress,其中包括 yahoo,BBC 等。
随着用户的增加,其安全性也日渐提上日程,这里整理了5条提高 WordPress 安全性的建议供参考。

1. 尽量避免使用admin用户

admin 是安装 WordPress 时产生的管理员用户,拥有所有权限,在安装 WordPress 时,尽量将 admin 对应的密码设置的复杂一些。

2. 将wp-config.php移动到其他目录

如果根目录下没有找到wp-config.php,Wordpress会自动寻找其他目录。

3. 更改Wordpress数据库中的表名前缀

在安装 WordPress 时,默认会将数据库中的表名前缀设置为“wp_”,应尽量修改此前缀。如果 wordpress 已安装完毕,可以利用这个插件 WP Security Scan  来设置。

4. 使用密钥 Secret Keys

访问 http://api.wordpress.org/secret-key/1.1/ ,生成4组密钥,将此4组密钥复制到 wp-config.php。

5.使用 .htaccess

可以限制其他用户访问 wp-admin 目录,我们可以利用下面的代码来指定允许某些特定的IP访问此目录。

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "Access Control"
AuthType Basic
order deny,allow
deny from all
#IP address to Whitelist
allow from xxx.xxx.xxx.xxx

说明:如果需要指定多个IP,可以重复“allow from xxx.xxx.xxx.xxx”(不含引号)即可。

2 Comments

  1. 疾风 says:

    来点WP提速方面的文章吧

  2. 等到中招以后再说。

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!:

无觅相关文章插件,快速提升流量

任鸟飞网页设计博客 谜题推理 No.1 Web Design Gallery IndustryIdea LookForDesign AWebGallery Mobile Web Template iDesign Wallpaper Big Funny Picture iPhone Faves iPhone Mobi iPad Faves Android Faves BlackBerry Faves Best Design Magazine All Banner Templates Blog Earn Tips 是谁啊 只爱美人 家乡美 唯美爱 美人衣妆 AutoCAD 2D | Pro/E 3D江苏名企The HTML5 Templates