Archive for the ‘short code’ tag
Upgrade WordPress Shell Script
Now that I’ve found my new best friend (the sourcecode short-code), I want to put it to good use now.
Here’s a quick Unix shell script that I use to upgrade my WordPress installations:
#!/bin/sh # WordPress Update Script # Written by: Lee Kelleher # Released: 2008-04-23 # Email: lee # at # vertino # dot # net # Released under GPL echo "Downloading current version of WordPress..." wget http://wordpress.org/latest.tar.gz echo "Uncompressing WordPress archive..." tar -zxvf latest.tar.gz echo "Removing downloaded archive..." rm -f latest.tar.gz echo "WordPress Upgrade complete!"
It’s a very very basic script… if you’re looking for something more user-friendly, (with back-ups), then either take a read of the WordPress Codex article, or download a better Unix shell script.
My version suits my purposes nicely.
Posting source code on WordPress.com
I feel like a complete n00b … I’ve only just found out how to mark-up source-code snippets on WordPress.com
It’s in their FAQs: How do I post source code?
Essentially you use the short-code: [sourcecode language='css']…[/sourcecode]
Here’s an example:
// A "Hello World!" program in C#
class Hello
{
static void Main()
{
System.Console.WriteLine("Hello World!");
}
}
I knew about WP.org plugins that did this, but I’ve been scratching my head on how do this on WP.com for ages now!


