顯示具有 wordpress 標籤的文章。 顯示所有文章
顯示具有 wordpress 標籤的文章。 顯示所有文章

2015年10月11日

ob2d jissie 安裝wordpress

1.以ws_ftp上傳wordpress安裝檔後,必須chmod -R www-data.www-data www
2.用vi /etc/ftpusers將root刪除,即可以root的ftp帳號更新wordpress
3.注意vi /etc/rc.local必須讓21port為ACCEPT,因預設為DROP
$IPTABLES -A INPUT -p tcp -s $FW_IP_RANGE --dport 21 -j ACCEPT
$IPTABLES -A INPUT -p tcp -s $LAN_IP_RANGE --dport 21 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 21 -j DROP

2011年7月20日

wordpress MU用gmail發註冊認證信

1.修改var/www/wordpress/wp-includes/pluggable.php
  將$phpmailer->IsMail(); 改為 $phpmailer->IsSMTP();

2.修改var/www/wordpress/wp-includes/class-phpmailer.php

 /**
   * Sets the SMTP hosts.  All hosts must be separated by a
   * semicolon.  You can also specify a different port
   * for each host by using this format: [hostname:port]
   * (e.g. "smtp1.example.com:25;smtp2.example.com").
   * Hosts will be tried in order.
   * @var string
   */
  public $Host          = 'smtp.gmail.com';
  public $Port          = 465;
  public $SMTPSecure    = 'ssl';
  public $SMTPAuth      = true;

  public $Username      = 'yourname@gmail.com';
  public $Password      = 'yourpasswd';

2011年7月15日

TWminiserver內Wordpress移機備份及還原(rsync)

(1) vi /opt/tools/ensshRsync.sh 修改欲備份目錄,及上傳的主機位置
(2)執行/opt/tools/ensshRsync.sh
    1.若失敗先砍 /root/.ssh/id_rsa 及id_rsa.pub
    2.執行ssh-keygen(勿輸入任何密碼,直接都按Enter)
    3.執行cat  ~/.ssh/id_rsa.pub | ssh -l root 上傳主機ip  "cat - >> ~/.ssh/authorized_keys"(會要求輸入上傳主機密碼)
    4.重新執行/opt/tools/ensshRsync.sh
(3)若無修改檔案目錄位置,預設上傳到/root/backFTP3
(4)停/etc/init.d/apache2 stop 及/etc/init.d/mysql stop
(5)將/root/backFTP3的網頁部份放回/var/www/wordpress,資料庫部份放回/var/lib/mysql
(6)重要chown -R mysql.mysql wordpress
(7)啟動 /etc/init.d/apache2 start及/etc/init.d/mysql start,用netstat -tlnup指令查看apache及mysql是否真啟動了
(7)進資料庫http://ip/phpmyadmin
(8)wordpress改換主機後的ip(改wp_blogs,wp_site,wp_options的siteurl(option_id第1)及home(option_id第37)及fileupload_url(option_id第177)及ftp_credentials,wp_sitemata的siteurl,wp_usermeta的source_domain)
(9)將/var/www/wordpress/wp-content 權限先改為777

看來一切美好無出錯,但升級時問題出現了
---------------------------------------------------------------------
(10)**還原完後使用wordpress的升級"立即重新安裝"時遇到問題,顯示打開升級檔,但無法解壓........安裝失敗
       1.vsftp的root權限不通,改vi /etc/ftpusers 將root註解 #root ,
          即可以root身份進ftp
     
       2.修改vsftp設定檔vi /etc/vsftpd.conf,將write_enabe註解拿掉並設為yes
           # Uncomment this to enable any form of FTP write command.
              write_enable=YES




什麼!!還不行,真難搞,若可以就不要再試以下了
----------------------------------------------------------------------
 
       3.啟用rewrite mod,下a2enmod rewrite , 修改/etc/apache2/apache2.conf內加入,可使用固定網址功能
        <Directory /var/www/wordpress>
                  AllowOverride All
        </Directory>


(11)若玩時不小心無法進後台管理時:http://ip/wordrpess/wp-admin可進登入畫面,記得將"其它"模組搬到邊欄