WordPress Automatic Upgrade on NearlyFreeSpeech.NET Hosting
It’s been a long time since I’ve updated this site so I figured I should give it some attention. First on my list was to switch web hosts; the site was loading incredibly slow on a lifetime account at TextDrive (now Joyent). A while ago I set a friend of mine up at NearlyFreeSpeech.NET and they’ve been great so far, not to mention cheap. So I opened an account and transferred my site without any problems.
Then, when I tried to automatically upgrade WordPress (which I hadn’t done in a long time) I got a load of errors. First, I couldn’t get WordPress to connect to my hosting account. I added the code below to wp-config.php and that problem was fixed (which I found here).
define('FS_METHOD', 'direct');
define('FTP_BASE', '/public/');
define('FTP_CONTENT_DIR', '/public/wp-content/');
define('FTP_PLUGIN_DIR ', '/public/wp-content/plugins/');
define('FTP_USER', 'your-username');
define('FTP_HOST', 'ssh.phx.nearlyfreespeech.net:22');
define('FTP_PASS', 'your-password');
Once I got that out of the way I hit another snag. I was getting a couple temporary file permissions errors. Evidently it’s a side-effect of NFS’s hosting setup (PHP safe_mode, etc). A few web searches later and I had an answer.
- SSH into the server
- chgrp -R web ./public
- find ./public -type f -exec chmod 664 {} \;
- find ./public -type d -exec chmod 775 {} \;
After making those changes it was smooth sailing. And as expected, the site is loading much faster now.
SparkStats Widget Patch
Luc Betheder wrote a handy little widget for Sean McBride’s SparkStats plugin, which I recently started to use. I noticed, though, that whenever I made changes to my widgets the custom title I set for the Sparks plugin would get wiped out. So I fixed the problem in the plugin and thought I’d send the patch to Luc. Turns out, I can’t get in touch with him. You have to be registered on his blog to comment, but he has registrations turned off. Also, his email address was nowhere to be found. Hmm…slightly frustrating. I’m not giving up though, so here’s my patch (I’m also testing out the Google Syntax Highlighter):
--- sparks.php 2008-02-16 14:14:22.000000000 -0500
+++ sparks.php.mine 2008-02-16 14:14:58.000000000 -0500
@@ -63,13 +63,13 @@
// Clean up control form submission options
$newoptions['title'] = strip_tags(stripslashes($_POST['Sparks-title']));
$newoptions['text'] = strip_tags(stripslashes($_POST['Sparks-text']));
- }
- // If original widget options do not match control form
- // submission options, update them.
- if ( $options != $newoptions ) {
- $options = $newoptions;
- update_option('widget_Sparks', $options);
+ // If original widget options do not match control form
+ // submission options, update them.
+ if ( $options != $newoptions ) {
+ $options = $newoptions;
+ update_option('widget_Sparks', $options);
+ }
}
// Format options as valid HTML. Hey, why not.
Download the patch: SparkStats Widget Patch
Site Moved
You probably saw this coming when I talked about purchasing IamSeanMurphy.com a few weeks ago (okay, maybe it was longer). I moved my site from CoreQuantum.com to IamSeanMurphy.com. Update your links ladies and gentlemen!
New Domains
As a few people know, I have wanted to own seanmurphy.com for some time. The only thing preventing me from buying it was the $3,500 price tag—it just didn’t seem reasonable. Granted, Sean Murphy is an awesome name. Further, to have your name as a domain is to be desired. But three and a half large?!
In the past I tried to come up with a suitable (and less expensive) alternative, but failed. Nothing could come close to seanmurphy.com. Well, let me take that back. There was one seanmurphy.ie that I would have been happy with, which I bought—and then was rejected registration. Apparently I’m required to have a “real and substantial connection with Ireland” in order to register an .ie domain. So I waited. And waited. Seanmurphy.com still cost $3,500. I still don’t have $3,500 to guiltlessly spend on a domain.
Alas!, I found an alternative I can live with: iamseanmurphy.com (and .net, and .org!). I have no idea why I didn’t think of it before. Maybe I did, but was dissatisfied with it. Maybe I didn’t, but no matter, that’s not the point. What is of note is that I have a fresh new domain with my name in it!.