My WordPress Toolbox

Thought I’d share this with you. Here are the commands I use to “do work” on WordPress.

Connect to a remote machine (usually I do development on my laptop, locally, but sometimes I’ll work from another computer):
$ ssh -l remote_username

Make a directory:
$ mkdir /path/to/wordpress/

Browse to the WordPress directory:
$ cd /path/to/wordpress/

Use SVN to download the latest WP code to the current directory (which from now on, assume is /path/to/wordpress/):
$ svn co .

Update existing SVN checkout to latest code:
$ svn up

Search WordPress for a string (‘function the_content’ in this case):
$ grep -iR 'function the_content' *

Edit a file using nano:
$ nano filename.php

Make a patch, for filename.php:
$ svn diff filename.php > filename.diff

Make a patch for all files modified in the checkout:
$ svn diff > big_patch.diff

Apply a patch from someone else:
$ patch -p0 < patch.diff

My main text editor is TextMate for OS X, but I’ll use nano if logged in to a remote system. Note that all these commands work for OS X and Linux (you’ll need svn installed… check out Fink for OS X which gives you apt-get and a bunch of nice Linux-y goodness).

Update: Peter Westwood has a tutorial for Windows users, which I recommend (I used to do development on Windows, and I used the tools that he recommends!)

42 thoughts on “My WordPress Toolbox

  1. I don’t work on WordPress but I do develop other projects using SVN and I use Eclipse for most of the work. With a PHPeclipse and Subclipse you can do the same thing in one package. Thought your way seems to work for you.

  2. Interesting stuff, but I am new to WP and have some basic questions: Can you help?
    1. I am using and want to change the title on the blog. How?
    2. Can I use a theme that is not there in

    Would appreciate any help on these.


  3. ssh
    is smoother than the -l parameter. 😉

    A very helpful, yet widely unknown feature is bash’s (and other shell’s) tab completition: For example, if you want to go to /path/to/wordpress/, you type /p and press tab. You’ll either have path autocompleted, or you are shown all files/directories starting with p (if so, type the next letter, and so on). This is one of the features which saves a big bunch of time, when you’re working in the shell.

  4. […] inspired by posts awhile ago by Westi’s Windows WordPress toolbox and Mark’s Mac/Unix based WordPress toolbox, I give you my WordPress-and-sometimes-not-Mac-and-Linux […]

  5. Does anyone know if there’s a collection of WordPress instructional videos somewhere? From installation to usage and then template customisation?

  6. Hi – HiYa – Got there and to Peter Westwood’s “commit” post from Trac frontpage. Here’s what I’m thinking (I copied this from my comment in Mark’s blog a minute ago [1]): a couple of 101-style articles on basics … Eclipse/PHP with Subversion … or maybe Aptana, not sure. Thing is I’ve mucked by way through various IDEs over the past ?what? 3 decades, but not this. So if I can hook up with someone who uses this sort of setup day to day, I would co-author. Maybe you can hook me up with someone you know?

    best of the season to you


  7. minute ago [1]): a couple of 101-style articles on basics … Eclipse/PHP with Subversion … or maybe Aptana, not sure. Thing is I’ve mucked by way through various IDEs over the

  8. I’ve never bothered getting my head around ssh. You’ve inspired me to give it a go. Thanks and a Stumble for your efforts 🙂

  9. Good article! We started to implement word press blogs, however we are starting to look at Thesis. Has anyone here tried Thesis? If so, can anyone tell their experience with it? It looks pretty straight forward, although the price is kind of spendy..

  10. scribbler,

    I think you will find the commands depending upon which version of wp you are using at: options » general, to change the wp title.

  11. I am PHP developer and having more then 9 years of experience. I want to write some code for wordpress. How can I solve the wordpress bugs. Where I can find the wordpress bug list.

  12. i want to patch files to my taxomony.php . i opened taxomony.php files and edit related codes. But it gives me error. Can we a file and pass the pach code directly via ftp?

  13. Pingback: Room Heaters
  14. WordPress has become its own multi-million dollar industry. It’s a fantastic platform and user input has made it the leader. You should read this article: far cry 3 review. It gives really good insiight about the best tool to use with wordpress.

    Great article! Cheers!

  15. No one has fixed the custom URL link bug in the WordPress gallery yet. Do you know anyone that could fix it for free? If I can help in anyway, I would love to help out as well.

    I just want to cut back on plugins and the gallery says we can type in links the URL we like but the WordPress gallery doesn’t work… A ticket has been sent in and it just says someone will look some time 😦

Comments are closed.