XAMPP WordPress command line upgrade on Mac OSX

20 07 2011

Aloha. I’ve used this handy link to upgrade remote WordPress installs on my EC2 Ubuntu Linux box a few times:


I tried to do this locally using Terminal on Mac OSX Snow Leopard and noticed that you need a few tweaks to get it working. Here is the script that worked for me:

mkdir /temp
cd /temp
curl -O http://wordpress.org/latest.zip
unzip latest.zip
cd /Applications/XAMPP/xamppfiles/htdocs/yourblog.dev
cp -avR /temp/wordpress/* .
rm -rf /temp

Basically, wget isn’t installed by default so you just use curl which is. There’s also one more change; when I tried the working Linux script from the CyberCiti link I got this error message:

cp: the -R and -r options may not be specified together.

uppercasing the R fixed it ;)

Hope this is useful to someone. Have fun on the internets, cheerio