association-list

June 19, 2011

Upgrading to mainstream WordPress from an Ubuntu install.

tags: — evan @ 8:58 pm

Sorry for the flurry of posts today, I need to get all this stuff out before I forget about the site again for six months.

Orig­i­nally when I switched over to this host I had decided that I was just going to stick with the apt-​​provided ver­sion of word­press and just deal with the issues, but it turns out that their mod­u­lar­iza­tion is too leaky, and their code churn rate is too high for that to be a viable strat­egy, what with the low turnover rate of the Ubuntu pack­age. Once I’d fallen too many released behind, all of the AJAX stuff started to break. I couldn’t even reply to com­ments from the con­sole or post any pictures.

So if you’re look­ing for how to do this, here is what worked for me in early 2011 (this post will no doubt date rapidly):

  1. As root, type # echo wordpress hold | dpkg --set-selections (note that this step is apt cargo cult magic which may fail in the future; I’ll update this if so).
  2. Edit /etc/wordpress/wp-config.php, com­ment­ing out the line which says define('WP_CORE_UPDATE', false);.
  3. Down­load the latest word­press tar­ball from http://wordpress.org/.
  4. Unpack it somewhere.
  5. Backup /​usr/​share/​wordpress (I used # tar czf backup.tgz /usr/share/wordpress but you may (by which I mean should) want to do some­thing more bulletproof.
  6. Do # cp -R /path/to/wp/wordpress/ /usr/share/
  7. Look at the output and cleanup as appro­pri­ate. I ended up having to nuke /usr/share/workpress/wp-include/js/ and then recopy it from the unpacked tarball.
  8. Go back to your dash­board, as you’ll likely have to trig­ger a data­base update or some­thing similar.
  9. Make sure your site or sites are still working.

Feel free to com­ment if you have any ques­tions but I am hardly an expert on the Word­Press side. Good luck.

Leave a Reply