{"id":1267,"date":"2009-11-26T16:39:06","date_gmt":"2009-11-26T08:39:06","guid":{"rendered":"http:\/\/www.banbanli.net\/blog\/?p=1267"},"modified":"2009-11-26T16:57:59","modified_gmt":"2009-11-26T08:57:59","slug":"wordpress-auto-upgrade-script","status":"publish","type":"post","link":"http:\/\/www.banbanli.net\/blog\/?p=1267","title":{"rendered":"WordPress auto upgrade script"},"content":{"rendered":"<p>\u9019\u6a23\u7701\u4e0b\u4e86\u4e0d\u5c11\u6642\u9593\u3002<br \/>\n\u9019\u500bTar pipe \u5f88\u5947\u5999\u8aaa\uff0c\u4e3b\u8981\u5c31\u662f\u628a\u539f\u672c\u89e3\u958b\u7684 wordpress\/ \u4e0b\u7684\u6a94\u6848\u5148\u5305\u8d77\u4f86\uff0c\u7136\u5f8c\u518d\u628a\u4ed6\u89e3\u56deblog \u7684\u76ee\u9304\u3002<\/p>\n<p><code>#!\/bin\/bash<br \/>\nCURDIR=$(pwd)<br \/>\nSITE=\"http:\/\/www.banbanli.net\/blog\"<br \/>\necho Updating WordPress in $CURDIR<br \/>\necho 1.  downloading latest build<br \/>\nwget -q http:\/\/wordpress.org\/latest.tar.gz<br \/>\necho 2.  unpacking latest build<br \/>\ntar zxf latest.tar.gz<br \/>\ncd wordpress\/<br \/>\necho 3.  replacing old files with fresh ones<br \/>\ntar cf - . | (cd $CURDIR; tar xf -)<br \/>\necho 4.  updating your blog<br \/>\nwget -q -O - ${SITE}\/wp-admin\/upgrade.php?step=1&gt; \/dev\/null<br \/>\necho 5.  removing unneeded files and directory<br \/>\nrm -f ..\/latest.tar.gz<br \/>\necho 6.  all done !<\/code><\/p>\n<p>refer by http:\/\/planetozh.com\/blog\/2007\/10\/wordpress-upgrade-script\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9019\u6a23\u7701\u4e0b\u4e86\u4e0d\u5c11\u6642\u9593\u3002 \u9019\u500bTar pipe \u5f88\u5947\u5999\u8aaa\uff0c\u4e3b\u8981\u5c31\u662f\u628a\u539f\u672c\u89e3\u958b\u7684 wordpress\/ \u4e0b\u7684\u6a94\u6848\u5148\u5305\u8d77\u4f86\uff0c\u7136\u5f8c\u518d\u628a\u4ed6\u89e3\u56deblog \u7684\u76ee\u9304\u3002 #!\/bin\/bash CURDIR=$(pwd) SITE=&#8221;http:\/\/www.banbanli.net\/blog&#8221; echo Updating WordPress in $CURDIR echo 1. downloading latest build wget -q http:\/\/wordpress.org\/latest.tar.gz echo 2. unpacking latest build tar zxf latest.tar.gz cd wordpress\/ echo 3. replacing old files with fresh ones tar cf &#8211; . | (cd $CURDIR; tar xf -) echo 4. updating your &hellip; <a href=\"http:\/\/www.banbanli.net\/blog\/?p=1267\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">WordPress auto upgrade script<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1267","post","type-post","status-publish","format-standard","hentry","category-daily"],"_links":{"self":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1267"}],"version-history":[{"count":3,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1267\/revisions"}],"predecessor-version":[{"id":1270,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1267\/revisions\/1270"}],"wp:attachment":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1267"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}