{"id":344,"date":"2006-03-12T18:37:10","date_gmt":"2006-03-13T02:37:10","guid":{"rendered":"http:\/\/boulter.com\/blog\/2006\/03\/12\/wordpress-upgrade-script\/"},"modified":"2006-03-12T18:37:10","modified_gmt":"2006-03-13T02:37:10","slug":"wordpress-upgrade-script","status":"publish","type":"post","link":"http:\/\/boulter.com\/blog\/2006\/03\/12\/wordpress-upgrade-script\/","title":{"rendered":"WordPress Upgrade Script"},"content":{"rendered":"<p>WordPress (the software that runs this blog) was recently upgraded to fix some security issues. I loathe updating WordPress because it&#8217;s such a manual process. Copy this here, check that, download this, blah blah blah. It doesn&#8217;t help that the instructions are mostly written for people who only have FTP access to their web hosting accounts.<\/p>\n<p>I was sufficiently annoyed today to write a script for the power user to upgrade wordpress. I successfully upgraded from 2.0 to 2.0.2 with it, but I don&#8217;t guarantee that I won&#8217;t blow up someone else&#8217;s blog when used.<\/p>\n<pre>echo \"you disabled all plugins, right?\"\r\n\r\nrm -f wpbackup.tgz\r\nrm -f latest.tar.gz\r\nrm -rf wptmp\r\n\r\necho \"enter mysql password\"\r\nmysqldump --add-drop-table -u boulter -p wordpress > wordpress\/wordpress.sql\r\ntar -cpzvf wpbackup.tgz wordpress\/\r\n# just in case we really break things, we have a full backup\r\ncp wpbackup.tgz wpbackup`date +%Y%m%d%H%M%S`.tgz\r\n\r\nmkdir wptmp\r\ncd wordpress\r\ncp wp-config.php .htaccess ..\/wptmp\r\ncp -R wp-content ..\/wptmp\r\n\r\n# extra directories I use\r\ncp -R archives ..\/wptmp\r\ncp -R maillist ..\/wptmp\r\n\r\ncd ..\r\nrm -rf wptmp\/wp-content\/cache\r\n\r\nwget http:\/\/wordpress.org\/latest.tar.gz\r\n\r\nrm -rf wordpress\r\ntar -xzpvf latest.tar.gz\r\ncp wptmp\/.htaccess wordpress\/\r\ncp -R wptmp\/* wordpress\/\r\nrm -rf wptmp\r\n\r\necho \"now go upgrade at wp-admin\/upgrade.php\"<\/pre>\n<p>I feel better now.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress (the software that runs this blog) was recently upgraded to fix some security issues. I loathe updating WordPress because it&#8217;s such a manual process. Copy this here, check that, download this, blah blah blah. It doesn&#8217;t help that the instructions are mostly written for people who only have FTP access to their web hosting &#8230;<\/p>\n<p><a href=\"http:\/\/boulter.com\/blog\/2006\/03\/12\/wordpress-upgrade-script\/\" class=\"more-link\">Continue reading &lsquo;WordPress Upgrade Script&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-344","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"http:\/\/boulter.com\/blog\/wp-json\/wp\/v2\/posts\/344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/boulter.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/boulter.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/boulter.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/boulter.com\/blog\/wp-json\/wp\/v2\/comments?post=344"}],"version-history":[{"count":0,"href":"http:\/\/boulter.com\/blog\/wp-json\/wp\/v2\/posts\/344\/revisions"}],"wp:attachment":[{"href":"http:\/\/boulter.com\/blog\/wp-json\/wp\/v2\/media?parent=344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/boulter.com\/blog\/wp-json\/wp\/v2\/categories?post=344"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/boulter.com\/blog\/wp-json\/wp\/v2\/tags?post=344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}