BruceTonge.Info

My Single Line WordPress Upgrade

by on Feb.23, 2009, under Computing, Hosting, HowTo, Linux, Web

Here is my take on the single line word press upgrade I saw at hack a day.
The bellow will download the latest version and unpack it. IT then removes the new plugins and themes as to not over wright your installed ones. IT then copies the new install over the old one and resets the permissions on the files.
wget http://wordpress.org/latest.zip && unzip latest.zip && rm -rf ./wordpress/wp-content/ && cp -r ./wordpress/* ../

You may need to change the paths for your installation but this should work quite well.
As allways take a backup before you run this just in case.


2 Comments for this entry

  • Mike Little

    Bruce,
    How are you old fella? I see you still can’t spell ;-)

    Good to see you are using WordPress. In case you didn’t know I had a hand in it’s early days.

    Now to your tip: This is potentially unworkable, deleting wp-content is very risky, what if you are in the wrong directory? And the second time you do it, if you didn’t manually remove latest.zip,you will get latest.zip.1 downloaded, but that won’t be unzipped. Finally, this doesn’t remove old files from previous versions that are no longer needed. That’s a potential security hole.

    Much easier to use Subversion. Easy to set up, no risk, one command to upgrade, you can roll back if something breaks (though you should still backup your DB), etc. On the last release, I upgraded nearly 40 wordpress installations with one command and it took less than three minutes.

    Checkout this codex article all about it. Give me a shout if you want a hand.

    Mike

  • OKButton

    Hi Mike
    Cheers for the updating info I am going to have a play. I am looking for a way of keeping a few users sites on my hosted server up to date with ought having to rely on them. This will defiantly help. I also me a couple more geoworkers last week (Mike and John from support) we meet up for computer gaming every so often in Woodford.
    Cheers for the help
    Bruce

Leave a Reply

You must be logged in to post a comment.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...