Things I tend to forget


Redirect all traffic to https

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

Similar Posts:




Handyman

I’m not really the handy-man type. But it’s been frustrating to depend on others to setup the simplest things. So, last week I went shopping for some tools..

I found a good deal on a “Bosch” impact drill with a bunch of spare drills and other “accessories”.

I also got some shelves from the mall: those turned up nicely as a makeshift closet while we’re waiting for the IKEA closet to arrive by ground delivery from KSA (thanks Juliano for taking the trouble to send us those!)

Later, I got some hooks and setup a clothesline with some wires. That looked really good 🙂

After that, I setup some door stoppers, a plastic net so “the boss” (our cat) can go out to the balcony without venturing “outside” to the garden.

Next on my list is setting up a metal closet/racks in the office room. Also for the office, I’m getting a large white-board and a black foam board. Plenty to do and it’s lots of fun (so far).

Going back to my day job now!

Similar Posts:




WordPress + SVN + Auto-update

I’ve been using the latest cutting edge wordpress from svn for a while now and it’s been good. At the time of the writing

You are using WordPress 3.0-alpha.

Basically, even the latest code is safe(ish) and things don’t break easily.

I’m not using it for “production” per se, as the only other person who ever reads this blog is probably me!

So, here’s how I do it:

svn up

If you expected more, there’s really not much there. As everything is pretty simple to setup as per the notes in http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion

Some would only want to update to “stable” version. Others, like me will follow the absolute latest.

Now, how about the permissions for the directory where wordpress is setup. Here’s what I use:

my username: wpuser

apache user: nobody

wordpress installation directory: /home/wpuser/public_html/

cd /home/wpuser/public_html

chown -R wpuser:nobody

find . -type d -exec chmod 755 {} \;

find . -type f -exec chmod 644 {} \;

With the above, it’s easy to upgrade simply by going:

su wpuser

svn up

Now, the automatic upgrade/setup for plugins should work perfectly from within wordpress’ admin interface. If it doesn’t you might want to add the following in wp-config.php:

// Additional variables to allow auto update

define('FS_CHMOD_FILE',0644);

define('FS_CHMOD_DIR',0755);

define('FS_METHOD', 'direct');

I hope this helps someone out there. Give me a shout if it does 😉

Similar Posts: