pre backup database and wordpress files
1. Get the latest WordPress zip (or tar.gz) file.
2. Unpack the zip file that you downloaded.
unzip wordpress-3.1.zip to wwwroot/wordpress-3.1/
3. Delete the old wp-includes and wp-admin directories on your web host (through your FTP or shell access).
-bash-3.00$ cd wwwroot/wordpress/
-bash-3.00$ cd wp-includes/
-bash-3.00$ rm *.*
-bash-3.00$ ls
images js pomo Text theme-compat
-bash-3.00$ rm -r images/ js/ pomo/ Text/ theme-compat/
-bash-3.00$ cd ../wp-admin/
-bash-3.00$ rm *.*
-bash-3.00$ ls
css images includes js maint
-bash-3.00$ rm -r css/ images/ includes/ js/ maint/
4. Using FTP or your shell access, upload the new wp-includes and wp-admin directories to your web host, overwriting old files.
-bash-3.00$ cd wwwroot
-bash-3.00$ cp -R wordpress-3.1/wp-includes/ wordpress/
-bash-3.00$ cp -R wordpress-3.1/wp-admin/ wordpress/
5. Upload the individual files from the new wp-content folder to your existing wp-content folder, overwriting existing files. Do NOT delete your existing wp-content folder. Do NOT delete any files or folders in your existing wp-content directory (except for the one being overwritten by new files).
-bash-3.00$ cp -R wordpress-3.1/wp-content/ wordpress/
6. Upload all new loose files from the root directory of the new version to your existing wordpress root directory.
-bash-3.00$ cp wordpress-3.1/*.* wordpress/
7. Update database
post backup database and wordpress files