Mark on WordPress

WordPress puts food on my table.

My WordPress Toolbox

with 62 comments

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

Written by Mark Jaquith

November 2, 2005 at 7:41 pm

Posted in wordpress

62 Responses

Subscribe to comments with RSS.

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

    Myles Braithwaite

    November 3, 2005 at 1:36 pm

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

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

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

    scribbler

    November 4, 2005 at 5:57 am

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

    You cannot currently use arbitrary code on wordpress.com

    Mark J

    November 4, 2005 at 9:59 am

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

    in case someone wants to use a different port number!

    ubuntonista

    November 4, 2005 at 11:36 am

  8. [...] [...]

    Interesting News Posts

    March 9, 2006 at 9:00 pm

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

    What’s in the Toolbox?

    April 26, 2007 at 1:44 pm

  11. Hi Jim. Photos i received. Thanks

    Bill Compton

    June 4, 2007 at 4:40 pm

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

    Alex

    September 6, 2007 at 8:41 am

  13. Hi! I find for best deal
    vigra order online

    Coolers

    December 20, 2007 at 11:07 pm

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

    mac

    April 5, 2008 at 12:47 am

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

    ali

    May 8, 2008 at 3:45 am

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

    kerem

    May 15, 2008 at 3:35 pm

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

    asli

    May 15, 2008 at 3:36 pm

  20. Hi Jim. Photos i received. Thanks

    hakan

    May 23, 2008 at 2:42 am

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

    kodcu

    May 23, 2008 at 2:43 am

  22. sinem

    May 23, 2008 at 2:45 am

  23. Thanks for your post.

    teknolojiufku

    May 24, 2008 at 10:15 am

  24. Mac OSX and GNU/Linux Subversion cheat sheet

    alican

    May 29, 2008 at 6:07 am

  25. super site, thanks

    esser

    June 2, 2008 at 2:13 am

  26. Hi! I find for best deal
    vigra order online

    msn

    June 5, 2008 at 4:00 am

  27. thanks. super blog

    hasan

    June 7, 2008 at 1:53 am

  28. Thanks for the tutorial, it worked a treat.

    Brisbane web designer

    July 4, 2008 at 1:16 am

  29. gazeteler, medya, sinema, televizyonlar

    gazeteler

    July 24, 2008 at 4:46 pm

  30. bedava sitem kodları

    BEDAVA SITEM

    July 24, 2008 at 7:35 pm

  31. I had no idea OS X was like Linux. Thanks for the tips. I’ll give it a whirl.

    SEO Australia

    July 28, 2008 at 6:11 am

  32. thanks. super

    html kodları

    August 7, 2008 at 10:54 pm

  33. kişisel blogum

    isterimki

    August 9, 2008 at 5:15 pm

  34. WordPress has become its own multi-million dollar industry. It’s a fantastic platform and user input has made it the leader.

    Australian Web Directory

    August 12, 2008 at 7:51 pm

  35. I’m new to wordpress having just switched over from blogger so these tips will come in useful. Cheers.

    afinder

    August 12, 2008 at 11:40 pm

  36. [...] and think you’d like to submit a patch or two for consideration – check out Mark Jaquith’s Unix WordPress Toolbox and/or Peter Westwood’s Windows WordPress [...]

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

    SEO Training

    August 31, 2008 at 7:37 pm

  38. Good day!,

    name

    August 31, 2008 at 10:54 pm

  39. thanks super site

    html kodları

    September 5, 2008 at 7:57 pm

  40. I don’t understand this article :(

    Gry Logiczne

    September 21, 2008 at 11:10 am

  41. tesekkurler emegine saglık super site

    html kodları

    September 25, 2008 at 3:56 pm

  42. Mac OSX and GNU/Linux Subversion cheat sheet

    bedava alo

    September 26, 2008 at 1:27 pm

  43. super site emegine saglık

    html kodları

    October 3, 2008 at 8:33 am

  44. thanks super site

    pagerank sorgulama

    October 3, 2008 at 8:47 am

  45. emegine saglık supersin

    tr.gg

    October 7, 2008 at 5:28 pm

  46. youtube gir. you tube videoları

    youtubegir

    October 25, 2008 at 5:24 pm

  47. eline koluna bilegine klavyene saglık daha ne diyeyim yaw inglish bilmiyorum ki eglenelim bari böle

    sesli chat

    November 10, 2008 at 8:42 pm

  48. great job! thx :)

    gry dla dziewczyn

    December 1, 2008 at 8:53 am

  49. 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
    –bentrem

    1) http://blog.ftwr.co.uk/archives/2005/11/03/windows-wordpress-toolbox/

    bentrem

    December 20, 2008 at 9:51 pm

  50. s / Got there / Got here
    *sigh*

    bentrem

    December 20, 2008 at 9:53 pm

  51. emegine saglık suppperrrrr

    ta8an

    December 31, 2008 at 2:46 pm

  52. emegine saglık siten supermiş

    pr sorgulama

    January 3, 2009 at 4:44 pm

  53. eurovision şarkı yarışması hadise super

  54. super site thanks

    tr.gg toplist site ekle

    January 8, 2009 at 3:32 pm

  55. WordPress is now big business. It’s not only excellent for blogging but I’ve noticed a trend where normal web sites have a WordPress backend.

    Holland Blinds

    January 27, 2009 at 10:23 pm

  56. thanks super

    bedava sitem

    April 21, 2009 at 2:37 am

  57. perfect

    Erken Boşalma

    May 15, 2009 at 2:35 pm

  58. WordPress has become its own multi-million dollar industry. It’s a fantastic platform and user input has made it the leader.

    thanks

    kemal sunal filmleri

    May 17, 2009 at 4:28 pm

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

    rap star

    May 19, 2009 at 2:15 am

  60. 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 :)

    Goldstar

    June 10, 2009 at 1:41 am


Leave a Reply