my wordpress toolbox

A long time ago I wrote about the ways in which you can get involved in WordPress development using free available tools on windows in my post “Windows WordPress toolbox”.  Since that post I have come up with a number of useful scripts and shortcuts that I use in my WordPress development.

Here are a number tools that I use most often, these are a set of bash functions which you can stick in your ~/.bashrc file on your linux machine or mac :

//Download a patch from a trac install and apply it to a svn checkout
//e.g. wp-trac-patch http://trac.wordpress.org/attachment/ticket/2345/2345.diff
wp-trac-patch() {
svn revert -R . & curl "$1?format=raw" | patch -p0
}
//Search through a subversion checkout using grep (only search the .php and .js files)
//e.g. wp-grep the_excerpt
wp-grep() {
find . \( -name "*.php" -print , -name "*.js" -print \)  | xargs grep "$1"
}
//Merge a change from trunk to a branch in a subversion checkout of the whole repository
//e.g. wp-merge 1234 2.6
wp-merge() {
svn merge -r $(($1-1)):$1 trunk branches/$2
}
//Output the svn:eol-style property of all the files in a repository
svn-eol() {
find . \( -name "*.php" -print , -name "*.js" -print \)  | xargs svn propget svn:eolstyle
}

I hope you find this useful

Debugging ajax problems with firebug.

Now WordPress 2.5 RC1 is out it the wild for testing we are receiving some reports of strange problems with some of the ajax functionality in the admin pages so I have prepared a quick tutorial to help people collect the relevant debugging information to help us investigate the problems.

Here is how to prepare:

  1. Install Firefox (if you don’t have it already!)
  2. Install firebug. This is the web debugging tool of choice.
  3. Load up the relevant WordPress admin page that is not working for you.

Read the rest of this entry »

WordPress 2.0.2 released – Security update

WordPress v2.0.2 has been released with a number of security updates so it is well worth upgrading.

To simplfy the upgrade process I decided to try generating a diff file between 2.0.1 and 2.0.2 and using that to patch my sites rather than uploading a full set of new files.

Here is the process I took on my local machine to generate the diif file:

  1. Exported both 2.0.1 and 2.0.2 from svn using the following commands:

    To get 2.0.2 - svn --force export http://svn.automattic.com/wordpress/branches/2.0
    To get 2.0.1 - svn --force export http://svn.automattic.com/wordpress/tags/2.0.1

  2. Generated a patch file using diff:

    diff -U3 -r 2.0.1 2.0 > 2.0.1.to.2.0.2.patch

I then uploaded the patch file to my server and placed it in my home directory and applied the patch as follows:
Read the rest of this entry »

Windows WordPress Toolbox

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.

Skippy who is one of the hosts of the bug hunt was looking for a Windows version of Mark’s cheat sheet – So here or those of you using Windows the following instructions show you how to achieve the same things.

First of all you need to install an svn client, the svn client of choice on Windows has to be TortoiseSVN which is not only a subversion client but also includes patch application functionality and visual merge tools. Once you have installed TortoiseSVN you will now be set and ready. So here is the “Working on Windows” version on Mark’s instructions:
Read the rest of this entry »



d
go to dashboard
l
go to login
h
show/hide help
e
edit post/page
r
comment on post/page
m
go to moderate comments
esc
cancel