Category Archives: Code

Using git to Remotely Install Website Updates

There’s a great recipe for this at Using Git to manage a web site. I thought I’d share my version of it, just slightly modified from the original and HostGator-centric. Even if you’re using shared hosting, you may still be able to use git to remotely install updates to your sites.

I was pleasantly surprised to discover that HostGator DOES include git in it’s shared hosting packages. You’ll need ssh access for this recipe to work — an extra hoop for HostGator customers using shared hosting.

Continue reading

Rewriting WordPress URLs from the Ground Up

If you’re creating an application that uses WordPress for other than a blogging platform, then you might want to consider throwing out its default URL rules. I’ll use my Savory Bookmarks as an example.

Savory uses custom post types to store bookmarks. This means that the WordPress LOOP has to be completly sidetracked to instead query for this post type instead of standard blog posts. In fact, the Savory application does NOTHING with blog posts, archives and categories. So, why not clean up the URL rules and make sure nobody is taking backdoors to unforeseen 404 pages.

There are lots of filters for handling URL re-write rules, but since we’re starting from scratch, we’ll use rewrite_rules_array filter.

Continue reading