How to upgrade Wordpress? Best and safest way to upgrade

tar czf backup.tgz /var/www/[your site directory] mysqldump -uroot -p [database name] > database.sql

cd /var/www/[your site directory] cp -avr /tmp/wordpress/* . rm -rf /tmp/wordpress /tmp/latest.zip

// the debug log will be saved to wp-content/debug.log define( ‘WP_DEBUG_LOG’, false);