• wordpress的使用


    ubuntu 发送邮件学习资料:

    1 http://edu.51cto.com/lesson/id-6066.html

    相关插件:

    1 Disable Google Fonts

    使用中出现的问题:

    1:wordpress网站后台打开速度很慢解决方法
    http://www.afengseo.com/568.html

    2:
    解决WordPress打开速度变慢的7个方法技巧
    http://www.laozuo.org/2618.html

    3:perl -pi -e 's|fonts.googleapis.com|fonts.useso.com|g' `find ./ -type f`


    4:解决安装WordPress主题及插件需要输入FTP问题
    http://jingyan.baidu.com/article/4f34706efc1237e387b56da4.html

    chown -R www-data /var/www/wordpress/

    第二,如果是其他的可以使用在wp-config.php文件中添加脚本方式。

    define("FS_METHOD","direct");

    define("FS_CHMOD_DIR", 0777);

    define("FS_CHMOD_FILE", 0777);

    上述脚本添加到文件最后面就可以。

    5:WordPress关闭自动更新检测

    http://www.thefox.cn/wordpress-check-update.shtml

    解决wordpress上传的文件尺寸超过 php.ini 中定义的 upload_max_filesize 值。

    上传的文件尺寸超过 php.ini 中定义的 upload_max_filesize 值。

    解决方法:修改/etc/php5/apache2/php.ini文件中的

    post_max_size = 64M

    upload_max_filesize = 64M

    即可。

    解决wordpress中contact me无法收到邮件的问题:

    1.sudo apt-get install -y mailutils sendmail sharutils

    2.修改本地主机名sudo hostname  virshare.com

    3.sudo vi /etc/php5/apache2/php.ini
    找到 sendmail_path,修改为:
    sendmail_path = /usr/sbin/sendmail -i -t

    4.sudo /etc/init.d/apache2  restart

    sudo service sendmail restart

    参考文章:

    Contact Form 7及WordPress无法收取,发送邮件的解决办法

    ubuntu 发送邮件

    sendmail---stat=Service unavailable


    wordpress主机迁移相关:
    1.backupdb插件备份数据库
    2.将数据库中的一些链接改成新的(站点地址信息和/var/www中的目录)
    3.将原站中的所有文件备份
    4.在新主机上创建对应数据库
    5.将备份的原站文件拷贝到/var/www对应目录下
    6.执行http://www.你的域名.com/wp-admin/setup-config.php?step=1
    在此操作前先将原来的wp-config.php删除掉
    7.将老的数据库文件导入到新的数据库
    8.将老的.htaccess拷贝过去(在执行步骤6时可能会将原有的给删除掉,导致rewrite链接失效)
    9.将老的wp-config.php做对比,将必要的代码留下(可能在老的配置文件上,一些插件对此文件进行了修改)
    碰到的问题:
    我在参考下列操作时,碰到数据库链接错误,此时参照步骤6开始执行。
    注:按此操作后,我的related post 插件出现了异常,尚不清楚原因

    related post异常后,不能选择相关layout,原因未知。
    通过老的数据库和新数据库中的相关字段对比,发现有不一致的情况,怀疑不一致是因为缓存导致。另layout无法选择可能是修改
    了某个css文件导致。
    相关字段如下:
    gp_options:
    a:19:{s:14:"on_single_post";b:0;s:17:"max_related_posts";i:5;s:6:"on_rss";b:0;s:19:"related_posts_title";s:21:"你可能也喜欢:";s:24:"promoted_content_enabled";b:0;s:13:"enable_themes";b:1;s:29:"custom_size_thumbnail_enabled";b:1;s:22:"custom_thumbnail_width";i:126;s:23:"custom_thumbnail_height";i:126;s:20:"thumbnail_use_custom";b:1;s:22:"thumbnail_custom_field";s:21:"et_ptemplate_settings";s:21:"display_zemanta_linky";b:0;s:34:"only_admins_can_edit_related_posts";b:0;s:28:"max_related_post_age_in_days";i:0;s:18:"subscription_types";b:0;s:6:"mobile";a:6:{s:21:"display_comment_count";b:0;s:20:"display_publish_date";b:0;s:15:"display_excerpt";b:0;s:17:"display_thumbnail";b:0;s:18:"excerpt_max_length";i:200;s:20:"custom_theme_enabled";b:0;}s:7:"desktop";a:8:{s:21:"display_comment_count";b:0;s:20:"display_publish_date";b:0;s:15:"display_excerpt";b:0;s:17:"display_thumbnail";b:1;s:18:"excerpt_max_length";i:100;s:20:"custom_theme_enabled";b:0;s:10:"theme_name";s:9:"momma.css";s:16:"theme_custom_css";s:265:".related_post_title {
    padding: 12px 60px 12px 60px; line-height: 30px; margin: 0px 0px 10px; position: relative; background: #F6F7FA none repeat scroll 0% 0%;
    }
    ul.related_post {
    }
    ul.related_post li {
    }
    ul.related_post li a {
    }
    ul.related_post li img {
    }";}s:18:"exclude_categories";s:0:"";s:22:"default_thumbnail_path";b:0;}

    gp_meta:

    a:15:{s:7:"version";s:5:"3.5.4";s:13:"first_version";s:5:"3.5.4";s:8:"new_user";b:1;s:7:"blog_tg";i:0;s:22:"remote_recommendations";b:0;s:19:"show_turn_on_button";b:1;s:4:"name";s:0:"";s:5:"email";s:0:"";s:10:"subscribed";b:0;s:10:"registered";b:1;s:15:"zemanta_api_key";s:24:"pafbvoq58hql28sibk4ylu3z";s:13:"global_notice";a:2:{s:5:"title";s:51:"Thanks for using Related posts plugin. We like you.";s:7:"message";s:320:"Did you notice you can <strong>now</strong> insert related articles while in <strong>text mode</strong>? <br>Read more about it in <a href="http://192.168.0.113/wordpress/wp-admin/options-general.php?page=wordpress-related-posts&gp_global_notice=0#wp_rp_about_collapsible">Settings</a> under About related posts section.";}s:22:"turn_on_button_pressed";b:0;s:25:"show_zemanta_linky_option";b:1;s:12:"classic_user";b:0;}


    参考网址:

    如何实现WordPress无缝完美搬家,搬家的方法?

    如何完美搬迁WordPress站点



     一些插件的使用:

    Contact Form DB的使用
    http://cfdbplugin.com/?page_id=646
    $formTitleField = 'form_title'; // change this as needed
    if (is_array($_POST) && !empty($_POST)) {
        $title = isset($_POST[$formTitleField]) ? 
                       $_POST[$formTitleField] : 'Untitled';
        $posted_data = array();
        $uploaded_files = array();
     
        // Get posted values
        foreach ($_POST as $key => $val) {
            if ($key != $formTitleField) {
                $posted_data[$key] = $val;
            }
        }
     
        // Get uploaded files
        if (is_array($_FILES) && !empty($_FILES)) {
            foreach ($_FILES as $key => $file) {
                if (is_uploaded_file($file['tmp_name'])) {
                    $posted_data[$key] = $file['name'];
                    $uploaded_files[$key] = $file['tmp_name'];
                }
            }
        }
     
        // Prepare data structure for call to hook
        $data = (object) array(
            'title' => $title,
            'posted_data' => $posted_data,
            'uploaded_files' => $uploaded_files);
     
        // Call hook to submit data
        do_action_ref_array('cfdb_submit', array(&$data));
    }

    几个不错的内容站:

    http://100vod.cn/index.php/wordpress-5/
    http://www.php230.com/solve-wordpress-background-404-error-on-nginx.html

    aa

  • 相关阅读:
    Linux 下面安装 nginx 以及进行TCP反向代理、负载均衡的过程
    AMD全新32核线程撕裂者GeekBench跑分曝光:超2950X近一倍
    Win7 & VS2013 编译 WebKit 总结
    窗宽窗位与其处理方法
    编写Delphi控件属性Stored和Default的理解及应用
    vSphere、Hyper-V与XenServer 你选哪个?
    写给那些常年战痘的痘友们~~~
    怎么解决xp系统不能安装NET Framework4.0?
    Kali Linux渗透基础知识整理(四):维持访问
    解决vista和win7在windows服务中交互桌面权限问题:穿透Session 0 隔离
  • 原文地址:https://www.cnblogs.com/jingzhishen/p/4014426.html
Copyright © 2020-2023  润新知