Upgrading WordPress to 3.3.1
Upgrading WordPress tonight from version 2.6.2 to the latest version 3.3.1. About time, right? Funny enough, my motivation was when I was configuring org2blog and noticed the URLs it was trying to hit were non-existent. That was my first clue that I needed to update. For the most users, I’d suggest following the very well documented Upgrading WordPress documentation, but I thought I’d show you how I do it. (Read: This post is pretty much for my own reference for the next time)
- Grab the latest wordpress release
upgrade_dir=wordpress_upgrade_$(date +%Y%m%d) mkdir ~/${upgrade_dir} && cd ~/${upgrade_dir} wget http://wordpress.org/latest.tar.gz tar -xzf latest.tar.gz
- Following along with the Upgrading WordPress documentation.
- Take a backup of the current install.
mysqldump -u root -p wordpress > wordpress.dump # Using the contents of the extracted latest.tar.gz WordPress release as my tarball file list \ls wordpress | xargs tar -C /var/www/html -czf wordpress_backup.tar.gz
- Now for the actual manual upgrade
WPH="/var/www/html/" # My WordPress Home (WPH) rm -rf ${WPH}wp-{includes,admin} rsync -av wordpress/wp-includes ${WPH}/ rsync -av wordpress/wp-admin ${WPH}/ rsync -av wordpress/wp-content ${WPH}/ (cd wordpress; for f in *; do if [ -f "${WPH}/${f}" ]; then echo "Updating $f"; cat "${f}" > "${WPH}/${f}"; fi; done)
- Re-log into your site and proceed with the DB upgrade.
Since my versions were so far off, the first thing I was greeted with upon login was a button to update the DB.
All done. The good news is I can now successfully log into my blog via org2blog plugin. Here is my elisp excerpt:
;; Setting up org2blog (Installed via ELPA) (require 'org2blog-autoloads) (require 'netrc) (setq blog (netrc-machine (netrc-parse "~/.netrc") "jonebird" t)) (setq org2blog/wp-blog-alist '(("jonebird.com" :url "http://jonebird.com/xmlrpc.php" :username (netrc-get blog "login") :password (netrc-get blog "password") :tags-as-categories t))) (org2blog/wp-login)
Now to post this, I believe I’m supposed to M-x org2blog/wp-post-subtree. Well, that worked well and posted this as a draft. I noticed a few markup problems and after fixing them, I can finalize the posting via C-u M-x org2blog/wp-post-subtree.
In anticipation of heading down to 
