升級 WordPress 指令

This content is over 17 years old. It may be obsolete and may not reflect the current opinion of the author.


不多,就行:

wget http://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
cd www
cp -Rpf ../wordpress/* .
cp -Rpf ./wordpress/* ./www

參考我如何學會停止憂慮而愛上 WordPress 升級他寫的指令我跑起來會把整個 wordpress 目錄 copy 到 www 下,因此在這裡的最後一行是我試出來的。

今天升級 WordPress 2.2 的時候發現我的指令失效了,變成原來文章的指令才有用。是因為 Ubuntu 自動升級了 bash 嗎?怪…

別忘了要用 wp-backup 先把資料庫備份寄出去。

Update: 濃縮成一行(不含備份喔!):wget http://wordpress.org/latest.tar.gz -O - | tar -xz; cp -R ./wordpress/* ./www/; rm -R ./wordpress

3 thoughts on “升級 WordPress 指令

  1. Pingback: Blog: timdream » WordPress Subversion Install/Upgrade Script

Comments are closed.