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!)
42 thoughts on “My WordPress Toolbox”
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.
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.
options » general, to change the name of the blog
You cannot currently use arbitrary code on wordpress.com
ssh -l username example.com -p port-number
in case someone wants to use a different port number!
is smoother than the
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
/pand press tab. You’ll either have
pathautocompleted, 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.
[…] 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 […]
Thanks for the tutorial, it worked a treat.
Does anyone know if there’s a collection of WordPress instructional videos somewhere? From installation to usage and then template customisation?
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 ): 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
s / Got there / Got here
minute ago ): 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
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 🙂
Hrm, another hacker who uses nano/pico. I don’t feel so alone anymore.
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..
Great list!!!! THANKS MARK! You saved my life. I have been looing for this one: 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/
I think you will find the commands depending upon which version of wp you are using at: options » general, to change the wp title.
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.
Note that the official SVN repo URL has changed:
i want to patch wordpress.org/attachment/ticket/16706/16706.2.diff 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?
Directly editing a a file and replace the code in diff file can be give error.
Thanks for all of the code! This will def come in handle with my install of WP
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!
Thought your way seems to work for you.
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 😦
What’s the ticket number?
If you get tired of sessions timing out, try:
`ssh -p PORT_NUMBER -o ServerAliveInterval=60 email@example.com`
Comments are closed.