Mark on WordPress

My WordPress Toolbox

Posted in wordpress by Mark Jaquith on November 2nd, 2005

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 example.com

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 http://svn.automattic.com/wordpress/trunk/ .

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!)

30 Responses to 'My WordPress Toolbox'

Subscribe to comments with RSS or TrackBack to 'My WordPress Toolbox'.

  1. Peter Westwood » Windows WordPress Toolbox said, on November 3rd, 2005 at 3:55 am

    [...] In preparation for the first WordPress Bug Hunt this weekend Mark Jaquith has written some excellent instructions on how he “does work” on WordPress on Linux / Mac OS X. [...]

  2. Myles Braithwaite said, on November 3rd, 2005 at 1:36 pm

    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.

  3. [...] Mark Jaquith’s WordPress Blog Just another WordPress.com weblog « My WordPress Toolbox [...]

  4. skippy dot net » Bug Hunt Preparations said, on November 3rd, 2005 at 7:06 pm

    [...] Mac OSX and GNU/Linux Subversion cheat sheet [...]

  5. scribbler said, on November 4th, 2005 at 5:57 am

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

    Would appreciate any help on these.

    Thanks,
    Scribbler.

  6. Mark J said, on November 4th, 2005 at 9:59 am

    scribbler,
    options » general, to change the name of the blog

    You cannot currently use arbitrary code on wordpress.com

  7. ubuntonista said, on November 4th, 2005 at 11:36 am

    ssh -l username example.com -p port-number

    in case someone wants to use a different port number!

  8. Interesting News Posts said, on March 9th, 2006 at 9:00 pm

    [...] [...]

  9. Peter Westwood » It’s bug hunt time. said, on August 25th, 2006 at 5:45 am

    [...] If you need some help in understanding the process of using subversion to access the WordPress code and applying or making patches then I suggest you read through one of the few articles about working on WordPress - Specifically there are Marks’s instructions for working on MAC OS X or Linux and my instructions for working with Tortoise SVN on Windows. [...]

  10. What’s in the Toolbox? said, on April 26th, 2007 at 1:44 pm

    [...] 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 [...]

  11. Bill Compton said, on June 4th, 2007 at 4:40 pm

    Hi Jim. Photos i received. Thanks

  12. Alex said, on September 6th, 2007 at 8:41 am

    ssh username@example.com
    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.

  13. Coolers said, on December 20th, 2007 at 11:07 pm

    Hi! I find for best deal
    vigra order online

  14. [...] My WordPress Toolbox « Mark on WordPress - How to patch wp in linux [...]

  15. [...] experimenting, but eventually got it working. Decided to share my mods back with the community by contributing a patch to WP [...]

  16. mac said, on April 5th, 2008 at 12:47 am

    what i m trying to do is when i login to wordpress on the site i see this topic called toolbox i would like users when they login go to that toolbox upload . can it be done or should i just make a php script? email me if you get this thank you

  17. ali said, on May 8th, 2008 at 3:45 am

    [...] 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 [...]

  18. kerem said, on May 15th, 2008 at 3:35 pm

    [...] 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 [...]

  19. asli said, on May 15th, 2008 at 3:36 pm

    l 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.

  20. hakan said, on May 23rd, 2008 at 2:42 am

    Hi Jim. Photos i received. Thanks

  21. kodcu said, on May 23rd, 2008 at 2:43 am

    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. http://www.yemek-tariflerimiz.tr.gg bekleriz

  22. sinem said, on May 23rd, 2008 at 2:45 am

    super idea http://www.voipvoip.tr.gg and http://www.voipx.tr.gg come me http://www.tvdizileri.tr.gg l am waiting

  23. kişisel gelişim said, on May 24th, 2008 at 9:44 am

    Thanks Mark,
    Very useful post.

  24. teknolojiufku said, on May 24th, 2008 at 10:15 am

    Thanks for your post.

  25. alican said, on May 29th, 2008 at 6:07 am

    Mac OSX and GNU/Linux Subversion cheat sheet

  26. alican said, on May 29th, 2008 at 6:09 am

    hi http://www.demard.tr.gg and http://www.msnhocasiyim.tr.gg http://www.superteklifkazan.tr.gg super sites

  27. esser said, on June 2nd, 2008 at 2:13 am

    super site, thanks

  28. msn said, on June 5th, 2008 at 4:00 am

    Hi! I find for best deal
    vigra order online

  29. hasan said, on June 7th, 2008 at 1:53 am

    thanks. super blog

  30. Brisbane web designer said, on July 4th, 2008 at 1:16 am

    Thanks for the tutorial, it worked a treat.

Leave a Reply