Brool brool (n.) : a low roar; a deep murmur or humming

Editing Wordpress Locally

 |  coding writing

I’ve written before on editing Wordpress locally, but recent circumstances (moving my blog to another server) made me take another look at it. I had written a utility previously that was based on git, but on reflection git is unnecessary. So, stripped out most of the code and moved it into wordpress-shuffle, that allow you to:

It’s all on Github.

Setting Up

Assuming that your blog is set up at (you can create an account at to test this out), all you’ll need to do is:

-- make a directory for the blog
mkdir blog
chdir blog

-- download everything
python --user=yourname --password=yourpass --url= init
(wait a bit)

-- now set up so we don't have to specify --user, --password, and --url every time (optional)
python --user=yourname --password=yourpass --url= defaults
-- you can skip specifying the password, and it'll prompt you when you run it

The files are downloaded in the appropriate YYYY/MM directories, with the draft directory being used for all of your unpublished drafts.

All the drafts are stored in plain text, but you’ll see some lines starting with periods – these are various Wordpress variables that are associated with the file. You can change them, as well; for example, to change the title of the post, just change the line that begins with “.title”.

Seeing What’s Different

You can use the status command to see differences between the local file system and your blog.

python status

Note that only the most recent files are checked. If you want to really check every single file for changes, do:

python status all

You can also use the –diff command line option to see the differences between local and server:

python --diff status all

Updating From The Blog

If you’ve made changes through the web interface and you’d like to bring them down, you don’t have to download everything again, but can instead just update.

python pull

Again, only the most recent changes are brought down. If you want to check every post on the blog, do:

python pull all

Posting To The Blog

If you’ve made changes to files and you’d like to post them back, do:

python push

To push everything (and not just the most recent files), do:

python push all

Note that push only changes those files that exist in both spots. If you’re adding a new post, use the “post” command.


If you’d like to add a new post, put it in the drafts folder, and then do:

python post drafts/filename

Note that add can actually take existing posts, as well – it just forces an update of that one file, rather than running through all changes like push.


To publish a file, just change the .post_status field from ‘draft’ to ‘published’. Note that doing this will cause a copy to move from the drafts folder to the appropriate year/month.


There are some gotchas due to the fact that the filename can change on you. There are cases where the filename that will be brought down is different then the one that you send up:


Comments are moderated whenever I remember that I have a blog.

Add a comment