網站搬家經驗談
商業用語是(網站)主機移動XD
這陣子替客戶主機移動作業要入尾聲了
碰到的網站大都是wordpress, html+php, joomla , zendPhoto, Xoops…
舊的環境是linux php 4
新的是php 5
困難點都是在於歷史久遠的網站用的語法到新的環境不支援,
wordpress架的網站還算好處理,現在都還有更新,算滿主流的
像是要把WP2.5搬到php 5的環境去,直接搬去會有錯誤訊息
Deprecated: Assigning the return value of new by reference is deprecated in /home/CLIENT/public_html/jp/wp-settings.php on line 512
Deprecated: Assigning the return value of new by reference is deprecated in /home/CLIENT/public_html/jp/wp-settings.php on line 527
Deprecated: Assigning the return value of new by reference is deprecated in /home/CLIENT/public_html/jp/wp-settings.php on line 534
Deprecated: Assigning the return value of new by reference is deprecated in /home/CLIENT/public_html/jp/wp-settings.php on line 570
Deprecated: Assigning the return value of new by reference is deprecated in /home/CLIENT/public_html/jp/wp-includes/cache.php on line 103
Deprecated: Assigning the return value of new by reference is deprecated in /home/CLIENT/public_html/jp/wp-includes/query.php on line 61
Deprecated: Assigning the return value of new by reference is deprecated in /home/CLIENT/public_html/jp/wp-includes/theme.php on line 1109
Warning: array_keys() expects parameter 1 to be array, string given in /home/CLIENT/public_html/jp/wp-content/plugins/execphp.php on line 115
Warning: Invalid argument supplied for foreach() in /home/CLIENT/public_html/jp/wp-content/plugins/execphp.php on line 115
上面也不知道再說什麼,反正先在原來的主機上更新網站吧!
更新 務必要注意做好一切備份(對Wordpress來說也不過就備好sql&file啦)
然後參考官方網站的說明來更新,像2.6以下後台介面跟新版的差很多,
要漸進式升級比較保險,每更新一次sql也會一起更新(上傳完新版wp file他會問你)
wordpress整體來說是非常穩定又好研發的網站後台,忍不住要在這裡稱讚一下。
well, old web site usually have problemsin migration .
以前製作網站的人如果codeing網站的樣板沒弄好編碼的設定,搬過去新主機就很直接的亂碼給你看
utf-8 with signture V.S utf-8 without signture
這個新主機比較嚴格,以前主機對utf-8 with signture比較寬容還是會給你顯示正確
所以codeing最好全部文件都用utf-8 without signture比較好
utf-8 with signture的用處是啥,我只在google apps匯入大量帳號時會用到過。
另外還有可能的錯誤就是外掛吧,有的外掛要先停用再匯入新主機去
主機預覽才OK,跟固定網址一樣只要先關掉會比較好,
另外在預覽的時候還有可能發現一種錯誤
有的在後台用php編寫頁面或文章時,SQL匯出的資料會含有?phpmyadmin=8sf16e8w…跟&phpmyadmin=開頭的code
這會影響wordpress生成html上的一些錯誤,再匯入以前先把含有這兩種code的字串刪掉再匯入比較好。
wordpress網站的移動經驗就差不多了,有機會再補吧
Subscribe to the RSS feed and have all new posts delivered straight to you.