Wordpress防采集
if(!$_SERVER[\'HTTP_USER_AGENT\']) { //判断是否为空AGENT header("Content-type: text/html; charset=utf-8"); echo \'不许采集!因为采集的站长MJJ!\'; exit; }
Wordpress启用gzip
//在打开的index.php 中找到: define(\'WP_USE_THEMES\', true); //在后面加上: ob_start(\'ob_gzhandler\')
WordPress: Could not create directory – Plugin Install Failed解决方案
//Add the marked lines in your wp-admin/includes/class-wp-filesystem-direct.php (Line 281): function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { // safe mode fails with a trailing slash under certain PHP versions. $path = untrailingslashit($path); if ( empty($path) ) $path = \'/\'; if ( ! $chmod ) $chmod = FS_CHMOD_DIR;
//or SSH into your server and run:
sudo chown -R apache:apache /var/www/html/msong/
直接安装插件,不进行FTP登陆验证
define( \'FS_METHOD\', \'direct\' );
去掉”自豪的采用wordpress”字样
\wp-content\themes\twentyeleven\footer.php
注意:汉字采用 UTF-8代码编辑
修改右侧“WordPress.org”
includes/default-widgets.php
搜索WP_Widget_Meta 行
Linux 下 *.po / *.mo 文件互转
要使用到GNU Gettext下的两个软件:msgunfmt和msgfmt
yum -y install gettext
然后在linux下进行转换
msgfmt *.po -o *.mo
或
msgfmt *.mo -o *.po
WP Super cache 静态化缓存插件使用方法