zoukankan      html  css  js  c++  java
  • wordPress学习积累

    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 静态化缓存插件使用方法

     

  • 相关阅读:
    【Alpha】测试报告
    【Alpha】发布说明
    【Alpha】项目展示
    【Alpha】Scrum Meeting 10
    【Alpha】Scrum Meeting 9
    【Alpha】Scrum Meeting 8
    “北航Clubs”功能规格说明书
    后端技术规格说明书
    前端设计说明书
    Daily Scrumming* 2015.11.3(Day 15)
  • 原文地址:https://www.cnblogs.com/enone/p/3010457.html
Copyright © 2011-2022 走看看