BadPoetry WordPress 2.7 has just been released and features a complete interface overhaul. Hack a Day runs on WordPress MU hosted by WordPress.com, so we got this update last week. We run standard WordPress.org on all of our personal blogs though. We recommend it because it’s free, has a massive userbase, and if you host it yourself, you can do whatever you want with it.
To make the upgrade process as simple as possible (and for the sheer rush of ‘rm -rf’), we use a one line command.
$ curl http://wordpress.org/latest.zip -o "wp.zip" && unzip wp.zip && rm -rf ./wordpress/wp-content/ && cp -r ./wordpress/* ~/www/
curl downloads the latest version from wordpress. unzip unpacks all of the files into a directory called ‘wordpress’. rm -rf removes everything in the ‘wp-content’ directory. Otherwise, you will overwrite your images, themes, and plugins. cp -r copies everything to your http document root, overwriting the previous install.
Naturally, you should back up your current install and database beforehand. We tend to use the one-liner with reckless abandon. If you’re wondering about the terseness, it was designed to fit inside the 140 character limit of Twitter.
[Thanks, Chris Finke]
Upgrading with Subversion also works well too..
http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion
There’s an even simpler way of doing it by using the subversion repository, check out a stable tag and when it’s time to upgrade just switch to the new tag.
http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion
You should put the oneliner in a crontab ;-).
You still have to run the upgrade.php script, so a crontab is not a good idea. Personally, I use subversion for keeping up to date. That truly is a one liner.
http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion
svn sw http://svn.automattic.com/wordpress/tags/2.7/ .
And if you are using CentOS, Redhat (or some fedora’s).
You will get prompted on every overwrite :-( … see the fix here: http://www.saiweb.co.uk/linux/cp-f-prompting
That command doesn’t delete the files of the previous version, though, it just overwrites them (or so it looks to me; I’m very much a cl beginner). WP docs state you should delete and replace instead of overwrite; as experienced users, do you see that as a redundant process or an assessed risk balanced out by the simplicity of the alternative?
A few things:
1. zip is for windows. We use gzip because it is much more powerful.
2. gzip accepts stdin pipes.
3. curl defaults to stdout, so…
…would save you 31 chars. Heck, that 22% of a tweet you gain. Better yet, it does not require you to store the zip file (or extracted working copy) locally, or delete them when you are done. That’s important if you are running wordpress on a potato. http://www.bbspot.com/News/2008/12/linux-on-a-potato.html
I just did this last night, not with the one liner though. I have to say that the new dashboard is badass. Big improvement over previous versions.
>>vilhelmk
i think putting it in a crontab is a little overkill considering you will need to run the command once every couple weeks when wp updates their version. in order to be efficient one would have to automatically monitor releases. might as well use svn.
sweeet..
Looks like I’ve got some upgrading to do this weekend.. ;)
>vilhelmk – you can do it either way, it’s just a matter of changing the commands you use in the ‘one liner’ approach..
I would caution to upgrading *anything* right as the first release comes out.. It’s always best to wait a few days (weeks) to get the initial bugs worked out.. had a bad experience with Ubuntu because of this (I now use debian.. tried and true, it’s the rock)
So, when will we be getting the lowercase CSS statement removed?
I use wordpress automatic upgrade to upgrade with just a few clicks.
I should clarify that wordpress automatic upgrade is a plugin.
i just used the line and it upgraded my blog perfectly. please note that if you have your blog in a directory other than your web root, you’ll want to tag that onto the ~/www
richard, i actually tried your shorter one, and it didn’t work. perhaps because it references wp-content rather than wordpress/wp-content?
I very liked this post. Can I copy it to my site?
Thanks in advance.
Sincerely, Timur.
I very liked this post. Can I copy it to my site?
Thanks in advance.
Why does everyone ask to copy it to their site
I’ve never had an issue upgrading my WP. All I have ever done is read the little 3 sentence instructions on their site and it’s always worked fine. Maybe just lucky I guess!
Useful information , great post . Thanks for sharing !!
thank god for these new wordpress updates.
i heard lots of ppl prefer the older version of wordpress
Yours sincerely,
donnie
http://donnieproperties.blogspot.com
Can somebody please explain to me what wordpress is exactly?
I’ll tell you what, the new pheromone colognes and pheromone perfumes are awesome. They can now make a broader range of quality human pheromones. I tried some of the old ones like pherlure and nexus, but this stuff actually got noticeable reactions.
Subversion upgrading will work very well as well.
Useful information , great post…= )
I tried out wordpress , i cant seem to get the hang of it.I hear tho that its very good. So maybe i should get to work on working on it !
WordPress works me but there’s still a lot to know especially with the new techniques coming out everyday…
Thanks for the heads up, Eliot! :)
And remember…Success is not by chance, it’s by CHOICE!
Cheers,
Genesis Pure Business Opportunity
WordPress is definitely the king of the castle, it’s worth sticking with if you can’t get your head round it!
Thanks. I’ll use it for my blog too. :)
WordPress 2.7 was awesome, but the one button upgrade is the best out of all there upgrades.
thanks for this usefull info but i use wordpress automatic upgrades
Humm thanks for letting me know i will update it as soon as possible.
I will implement those updates to my blog thanks for sharing information.
How long have you been blogging…your good at it.
thanks for the info i have upgraded
?berlasse es Ihnen zu entscheiden.
Come play snake game!
nice,thank you
Now I know why so many people love this site, nice contribution. Thanks
hesoyam
cool page
how i can go on this site how i can register
I still have an old site running on wordpress 2.7 so thanks for the info.