{"id":82,"date":"2007-08-31T14:59:33","date_gmt":"2007-08-31T21:59:33","guid":{"rendered":"http:\/\/historicalwebber.mossiso.com\/archives\/82"},"modified":"2007-08-31T14:59:33","modified_gmt":"2007-08-31T21:59:33","slug":"wordpress-updater","status":"publish","type":"post","link":"https:\/\/mossiso.com\/2007\/08\/31\/wordpress-updater\/","title":{"rendered":"WordPress updater"},"content":{"rendered":"<p>What&#8217;s with these multiple posts in a day&#8230;<\/p>\n<p>Today marks the completion of my Multiple WordPress Updater Script. I&#8217;ve already posted a bunch about school stuff, might as well post about work stuff too.<\/p>\n<p>We host over 55 blogs at <a href=\"http:\/\/chnm.gmu.edu\">CHNM<\/a>. It&#8217;s up to me to update them when security patches or new versions come out. Doing them each by hand is a pain. I did a bit of searching but didn&#8217;t find anything that would help me update so many sites automatically. So I wrote a bash script that will do it for me. It reads a file that lists all of the wordpress install paths or prompts you for the path to one, prompts for the version to switch to, and a mysql user\/pass that has permissions for all databases.<\/p>\n<p>Then the script creates a copy of the database, makes a copy of the wp-content folder, updates the wordpress install using subversion, fixes some permissions, and saves the subversion output to a file in your home directory (which I&#8217;ll probably change to somewhere&#8217;s else).<\/p>\n<p>I run this via sudo as root for easy updating. What I&#8217;m really pleased with is that I figured out how to get the script to pull the database name from the wp-config.php file, and grab the owner and group for later fixing of the permissions.<\/p>\n<p>I hope it can be useful to someone. If you have any comments or suggestions, let me know.<\/p>\n<p>Latest Version: 1.2.3 &#8211; 04\/29\/08<br \/>\n<a target=\"_blank\" href=\"http:\/\/historicalwebber.mossiso.com\/files\/2008\/04\/wpupdate-1.2.3\">Download file<\/a><\/p>\n<p><strong class=\"green\">UPDATE 24.4.08:<\/strong> WordPress Updater has been updated. I also updated this post, took out the code in the post, and put up a link to the file for you to download instead.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What&#8217;s with these multiple posts in a day&#8230; Today marks the completion of my Multiple WordPress Updater Script. I&#8217;ve already posted a bunch about school stuff, might as well post about work stuff too. We host over 55 blogs at CHNM. It&#8217;s up to me to update them when security patches or new versions come &hellip; <a href=\"https:\/\/mossiso.com\/2007\/08\/31\/wordpress-updater\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">WordPress updater<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[9],"tags":[30],"class_list":["post-82","post","type-post","status-publish","format-standard","hentry","category-technology","tag-chnm"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9wosP-1k","_links":{"self":[{"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/posts\/82"}],"collection":[{"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/comments?post=82"}],"version-history":[{"count":0,"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/posts\/82\/revisions"}],"wp:attachment":[{"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/media?parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/categories?post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/tags?post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}