Upgrade to WordPress 2.2

My blog is based on WordPress. Today I saw that there was a new version of 2.2, and decided to upgrade. As there are chances to upgrade frequently, I wrote a shell for myself:

cd $1 $2
cp wp-config.php wp-content/
rm -f *.php license.txt readme.html
rm -rf wp-admin/
rm -rf wp-includes/
cp $2/*.php .
cp -r $2/wp-admin .
cp -r $2/wp-includes .
cp $2/license.txt .
cp $2/readme.html .
mv wp-content/wp-config.php .
chmod 777 wp-content/uploads/

I saved the script as updatewp.sh and run it as root:

/root/updatewp.sh /www/life.zhourenjian.com/ /home/zhourenjian/wordpress/

The first argument is my wordpress blog path, and the second argument is the path of downloaded and unzipped wordpress path.

There is no wp-images or wp-content/cache in my blog folder.

And I also upgraded my Chinese blogs and upgrading caused Chinese messed. To solve that problem, I just modified wp-config.php, add following two lines after “// ** MySQL settings ** //”:

define(‘DB_CHARSET’, ‘utf8’);
define(‘DB_COLLATE’, ”);

This entry was posted in Blog Tips. Bookmark the permalink.

Comments are closed.