2010年6月21日星期一

升級WordPress 3.0注意事項

剛剛完成WordPress升級至3.0,其實3.0版沒有太多新驚喜,盡量保持原有結構的簡潔,這亦都是WordPress的優點。
搭建Menu的新功能要Theme支援,剛巧我的未支援,所以試不出有什麼特別。

不過升級3.0有兩樣事要注意:

1. wp-config.php變更
直至2.92版,很多人升級應該都是保留原有wp-config.php,但3.0版比舊版多了幾個authentication keys。
舊版本:
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');

3.0版本:
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY',  'put your unique phrase here');
define('LOGGED_IN_KEY',  'put your unique phrase here');
define('NONCE_KEY',  'put your unique phrase here');
define('AUTH_SALT',  'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT', 'put your unique phrase here');
define('NONCE_SALT', 'put your unique phrase here');

雖然你忽略這些Keys都可以運作正常,不過這些亂數產生的keys和安全性有關,大家可以經由WordPress.org secret-key service取得這些authentication unique keys.

2. 升級時出現Error message:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2964967 bytes) in /home/content/.../html/wp-includes/http.php on line 1363

這錯誤可能會出現在Share hosting上,如果hosting把php.ini中的memory_limit設定少於32M,就有可能會發生,因為WP3.0要求PHP不少於32MB memory。
解決方法最簡單就是升級前,打開wp-config.php,加上這句:
define('WP_MEMORY_LIMIT', '256M' );

如果還解決不到,就試試使用這個Plugin - Memory Bump
http://wordpress.org/extend/plugins/memory-bump/

沒有留言:

發佈留言