Are you subscribed to the right feed for my site?

A lot of my readers are still subscribed to the standard site feed, at

http://www.raoulpop.com/feed/rss2/

but that may become inactive, as I’m making some changes on the server side, so please make sure you’re subscribed to

http://feeds.feedburner.com/Raoul

which will continue to stay the same for the foreseeable future. Check your feed readers and make the change so you can continue to receive updates from me.

By the way, I’d like to apologize for the frequent and recent server outages. I’m looking into what’s causing them. They started happening as soon as I upgraded to WordPress 2.9. I’d hoped they’d go away with 2.9.1, but they’re still here… I made no other changes on the server side before or immediately after the upgrade, so the only thing I can think of is that 2.9.x has some issues. I disabled all but three essential plugins: Akismet, FeedBurner FeedSmith and WordPress.com Stats, and while my server crashes less frequently now, it still does.

It’s the strangest thing though. The server doesn’t run out of memory, my other sites stay up, Apache stays up, mySQL stays up, and yet raoulpop.com goes down. I’ve tried tweaking and re-tweaking Apache2 and PHP5 and mySQL settings to no avail. The only thing I need to do to bring my site up is to reload Apache2, but it is a very annoying thing indeed. If I had to deal with this thing long-term I’d schedule a cron job to restart Apache every once in a while, but I’ve got something in the works that should eliminate the need for that.

If anyone is having this problem and you’ve got it solved, I’d love to hear how you did it.

How to display recent photos from your SmugMug feeds

I was asked by a reader (Andrew M.) how I display the most recent photos from my SmugMug galleries on my home page. He was aware that I use the SimplePie plugin for WordPress, but wasn’t sure how to get the same look when starting from scratch.

Before you read any further, keep in mind this is a very specific tutorial about WordPress, SimplePie and SmugMug. It has other applications, like for other image feeds and with some code tweaking, for other blogging platforms, but if you want to do those things, then Google is your friend.

recent-photos-screenshot

The thing that makes things a little complicated in my situation (as opposed to other image feeds) is the somewhat non-standard structure of the SmugMug feeds. For one thing, they don’t provide a URL for the image thumbnail where you’d expect it to be, and for another, they provide the image description instead of the image title. (To check this, mouse over a SmugMug thumbnail, and you’ll see the description pop up over the image.) But as long as you’re willing to dig into the feed code and find the names for the fields you need, then you can plug that info into SimplePie and go from there. Thankfully, I’ll do it for for you below. Lucky you.

Just a quick general disclaimer before I start though: I don’t do handholding. I’ll provide the instructions for how I did it. But in the unlikely event that things still don’t make sense to you, do me a big favor and read the SimplePie Manual, before you ask me questions. I did it and it helped me work things out. It should do the same for you if you use a little elbow grease. Thanks.

Okay, onto step 1: find the SmugMug feed URI. SmugMug provides several feeds for each user account. Go to the bottom of your gallery page and click on the Available Feeds link to see all of them. We’re going to use the Recent Photos Atom feed. In my case, it is:

http://www.raoulpopphotography.com/hack/feed.mg?Type=nicknameRecentPhotos&Data=raoulpop&format=atom10

smugmug-available-feeds

Step 2 is creating an Images Only template for SimplePie. If you’re not sure what this is, you need to read through the SimplePie documentation. The location where you need to place the new template is:

[WP Install]/wp-content/plugins/simplepie-plugin-for-wordpress/templates/

This is not arcane info, btw. It’s provided in right on the SimplePie general settings page, which is what I’ll talk about in Step 3 below. Now let’s talk about what you’ll put in the template file. This is where the digging through the feed code part comes in. I kept things simple, and this is what my images_only.tmpl file looks like.

simple-pie-template-files

images-template-code

As you can see, the code is minimal, which is the way I like things. I am specifying a simplepie class in the code, but as you can see from my CSS file, I’m not styling the div in any way. I’m letting the rest of the CSS code and the other divs handle the way the images flow within this particular section.

Step 3 is adjusting the general settings for SimplePie. Now that we’ve created an Images Only template, we need to let SimplePie know that it should use it. Go to the WP Admin Panel and locate the SimplePie settings. Match my settings as you see them below.

simple-pie-rss-general-settings

I’m telling it to pull the latest 18 photos. You may find you need to pull less or more. It’s really up to you. Use the caching option, it’s faster, but know that you’ll need to create a cache directory where SimplePie can store the images. It’ll walk you through it when you say Yes, and you may need to adjust privileges on the server side. Check out this chmod tutorial from WordPress if you’re not sure how to do that.

Step 4 is placing a code snippet on the home page. Now that you’ve gone through all that fun, you’ve got to wrap things up. Go to your home page template in WordPress, and where you want the images to appear, place the following code snippet — it’s what triggers SimplePie to pull your SmugMug photos feed and display the feed items how you want them, in accordance with the code in your Images Only template.

home-page-simple-pie-codeSee the highlighted text, but you only need to worry about the php code line. The rest is my own code that specifies the div and section styles. Use your judgment about how to style the thumbnails, and how you want them to display. It may take a bit of trial and error until you get it right, but if you persist, it’ll look good in the end.

Hope this helps!

Installed and used the SimplePie RSS plugin

Installed and used the SimplePie RSS plugin for WP on my regular site at raoulpop.com. Its name is somewhat of a misnomer. It’s neither simple, nor “easy as pie” to begin with. Sure, after you check the documentation carefully, a light goes on in your head and you realize how to use it, but there’s a learning curve. I do agree, however, that the things it lets you do are quite nice. For example, I used it to rewrite my SmugMug recent photos feed and show only the thumbnails of the latest 10 images uploaded, each linked directly to the original image. I really like the result, but it took a bit of figuring out.

screenshot-home-page

Google Reader translates posts?

Yesterday morning, I added a new feed to my subscriptions in Google Reader, and noticed what I thought was a new feature: the ability to translate posts automatically, within GR. The feature was actually launched in November of last year, and it works through the normal drop-down menu. A new option was added there, and it looks like this:

Google Reader automatic post translation

Isn’t that cool? The translation technology used is the same one found in Google Translate. What’s also cool is how the languages are detected. I assume the translate option with GR uses the language setting saved in the GR settings or in the Google Account settings, and then it either uses the auto-detect capabilities built into Google Translate to figure out the language, or it looks at the language setting encoded within the feed itself.

Google Translate

It’s an incredibly useful feature, because it allows people to read blogs in other languages without worrying about copying and pasting the text into a separate translation tool. Just think, if I write a post in Romanian and publish it on my site, the auto-translation tool within GR will allow you to read it as if I’d written it in English! Granted, the translation is machine-generated so it won’t read fluently and might even miss a few meanings here and there, but it’s certainly better than nothing, which is what we had before.

I’d also like point out that if you’re reading articles on my site instead of the feed, I’ve recently added auto-translation capabilities to each post via the same Google Translate technology. You’ll have the option to translate any of my articles into several languages, by clicking on a particular language, right under any post title, as shown below. I hope this will prove useful to my readers from other countries.

Post header showing auto-translation capabilities

FriendFeed now supports RSS enclosures

See this post on FriendFeed, from 1/26/09, where Benjamin Golub from FriendFeed discusses the difference between media RSS and RSS enclosures. He mentions that they’re working on a way to accommodate RSS enclosures in addition to media RSS tags. A day or so later, they pushed the upgrade to the live site, as he states in this post.

While this is great news for the feeds from my photography catalog, it’s also great news for everyone else who uses RSS enclosure tags in their feeds. It means their photos and potentially other media, such as audio and video files, will be readily displayed on FriendFeed, making for a more interesting feed browsing experience. More specifically, it means that people who use the RSS module for Gallery 2 in conjunction with FriendFeed, like I do, will be able to readily display thumbnails of their photos in their FF streams.

The thing that makes me happy is that I didn’t even have to lobby for this. I didn’t have to bug them. Ben jumped in to help me just because he’s a nice guy. Did I mention that Ben is also the one who pointed me to SliceHost when I had problems with my other web hosts? What can I say but to offer him a big thank you for all his wonderful help!

By the way, FriendFeed now also has a way for users to test their feeds before adding them to their accounts. It was back on 12/12/08, a month and a half ago, that Ben mentioned they were working on that feature at FF in an email to me. I’m really glad to see it has become available.

Please check to see if you're subscribed to the correct feed

This is an important message for my feed subscribers.

It’s been over a year since I changed my feed URL and domain name, and I now see, inexplicably, that over 35% of my subscribers still show up under the old ComeAcross feed.

My feed traffic has been redirected (with a 301 status message, which indicates a permanent change) for that same year, which means that if your feed reader hasn’t already changed your subscription over to my new feed, you’ll need to do it manually.

The old feed will go down in the very near future, possibly within days. It was set to be deleted one year after the redirection. Please check your feed readers to make sure you are indeed subscribed to feeds.feedburner.com/Raoul, which is my main site feed, or you will not receive future updates from my site.

For historical reference, I talked about the feed changes on 1/16/08, and on 1/29/08, I explained how I did the transfer of the content.

I also want to give you advance notice of another possible change to my feed URL, which may happen when I transition my feeds from FeedBurner to Google within the next 1-2 months. You may recall that Google bought FeedBurner in 2007. Now they’re at the point where they’re moving FeedBurner publishers to the Google infrastructure, and I’m not sure how they’re going to manage the process.

I thought the migration from FeedBurner to Google was going to be fairly smooth, but I’ve already run into a roadblock. One of my feed URLs is somehow in use on Google’s servers, and my migration fails every time I initiate it. I’m not sure how that’s going to be resolved, and I would appreciate any help from Googlers out there.

So, just to be on the safe side, do a manual check in your feed reader and make sure you see feeds.feedburner.com/Raoul. When I hear what the new Google feed URL is, I’ll be sure to let you know.

Funny comics for sucky times

These “fun” times we’re living in call for some cheering up. I’m subscribed to these following comics (listed in alphabetical order), and they put a smile on my face each and every day:

Basic Instructions by Scott Meyer

Geek and Poke by Oliver Widder

Kawaii Not by Meghan Murphy

What The Duck by Aaron Johnson

Wondermark by David Malki ! (yes, the exclamation sign is required)

xkcd by Randall Munroe

I’ll let you discover what each one is about by visiting their respective sites. Enjoy!

Photos back in the site feed

A few weeks ago, I took my Flickr photos out of the site feed [reference]. Last night, I put them back in. Turns out taking them out cut their views by about 60-80%. That taught me two things:

  1. Showed me how few of the hundreds of people who’ve added me as a contact at Flickr actually care about viewing my photos, which was an interesting realization.
  2. Sometimes the desire to keep things organized and neat is trumped by convenience and practicality. Keeping my photos in the feed allows them to be viewed by more people, and for me at least, it’s no fun to share photos if no one looks at them.

The photos are back in the feed for now. We’ll see how long FeedBurner continues to offer the option to do this, or if they improve it to allow daily photo summaries, as they’ve been asked to do by others (including me). FeedBurner’s site has gone strangely silent lately (after their acquisition by Google), and I’m not sure how long they’ll stay in their current iteration. But don’t let that concern you.

Enjoy the photos!

Removing photos from my main feed

At least for now, I’m removing my Flickr feed from my main feed. If you are a feed subscriber, you’ve been able to see my Flickr photos appear as separate feed items in my main feed, thanks to a feature at FeedBurner that allows me to splice my site feed with my Flickr photos feed.

But I think the implementation of the feature isn’t well suited to my main site feed, because a separate feed item is created for each photo. Considering that I may publish 3-4 text articles per week but up to 25 photos, this means you’ll see 3-4 feed items for my articles, and up to 25 feed items for my photos, which skews the proportion of my content in a direction unacceptable (to me) for my main site feed.

I contacted FeedBurner to ask if at some point they might put through an enhancement that would allow users to select a “digest” option for the Flickr feed. It would work the same as the “digest” or summary option on their Link Splicer features, which publishes a single feed item with all of that day’s bookmarks. It’s been a while, I haven’t yet received a reply, and I’m not waiting any longer.

So, at least for now, the photos are out of the main site feed. You can still find them in my photography feed (they’ve been there all along), so if you’re interested in getting them along with my photography posts, please subscribe to that feed as well.

Do let me know if you really want to see them here in the main feed. If I get enough responses, I may put them back, but I didn’t want to distract or deter folks who are interested in reading my usual content.

Thanks for reading my stuff!

Where are the Condensed Knowledge posts?

Good question. Some of you have gotten quite accustomed to those daily Condensed Knowledge posts, and they’ve gone AWOL since last week. On the other hand, others have told me they were distracting, and detracted from the substance of my site.

I’d been giving the matter some thought myself, and in the end, sided with the folks who said I should stick to writing original content. You see, while I enjoy sharing the information with you, and while I also believe that it’s important to highlight valuable content on the Internet, those posts were distracting me from writing. Since I had something to post every day, other than my own writing, I tended to do less of it, and that was not good.

So, for the time being, no more Condensed Knowledge posts. That’s not to say you can’t access them anymore. You still can, but in a separate feed: feeds.feedburner.com/FavoriteBlogPosts. Subscribe to it if you’d like. The feed is actually more reliable than the method I used with the Condensed Knowledge posts, which was to share items from Google Reader, publish them to Twitter, then use the Twitter Tools plugin to collect them in a daily summary. That method was highly dependent on Twitter’s uptime/downtime, and that meant you weren’t getting the full link list every day. With the feed, you are getting everything I share from Google Reader.

I can’t deny I’d rather have the same link summaries present in my site feed, just like with my daily del.icio.us links, and perhaps at some point in the future that’ll be possible, but until then, the separate feed will do just fine.

If you have any questions, let me know in the comments and I’ll see if I can answer them.

How I moved all my content from comeacross.info to raoulpop.com

A place in this world

Background info

As midnight approached this past New Year’s Eve, I was busy working on a long-term project. I was about to move all of my content (every article and post I’d written) from comeacross.info to raoulpop.com. There were many reasons for this, but consolidation was the most readily apparent.

As detailed on my About page, I’d already combined my content from other sites of mine onto comeacross.info, but there was one more piece of the puzzle that needed to fall into place. I’d alluded to it already. I was thinking about doing it in 2006, believe it or not. As a matter of fact, when I sat down and thought about whether to start writing at comeacross.info or raoulpop.com, I knew deep down I should choose to start writing on my personal domain, but worried it might be too difficult for people to remember and type the name.

After a year or so at ComeAcross, I realized that the subjects I was writing about were much too varied for a standalone site. I was writing in a personal voice, using a lot of 1st person, and it only made sense to have that sort of content reside on my personal site. Plus, there were so many splogs (spam blogs) on the .info TLD, that I worried whether I would be taken seriously if I stayed on .info. I’d owned raoulpop.com for a long time, I wasn’t really putting it to good use, and it didn’t make sense not to.

I set a deadline of 12/31, and got to work on planning and research. What better time for such a big change as this than New Year’s, right?

I’m documenting this for you because someone else might need to know how to do it. And I figure the thought process that went on behind the scenes is also worth knowing.

Planning and research

My biggest challenge was to figure out how to redirect all of the traffic from comeacross.info to raoulpop.com, reliably and accurately. I needed to make sure that every one of my articles and posts would redirect to my new domain automatically, so that a URL like

http://comeacross.info/2007/12/30/my-photographic-portfolio/

would automatically change to

https://raoulpop.com/2007/12/30/my-photographic-portfolio/

and the redirect would work in such a way that search engines would be properly notified and I wouldn’t lose my page rank.

I knew about 301 redirects, but I wasn’t sure how to accomplish them in the Linux/WordPress environment the way that I wanted them to work. I had worked mainly with Microsoft web servers until recent times, and Linux was and still is fairly new to me. I was using John Godley’s Redirection plugin for WP (it’s an awesome plugin btw), and I knew it could do 301 redirects quite nicely. I had been using it heavily when I changed post slugs or deleted/consolidated posts at ComeAcross.

I worked out a line of Regex code that I could use to create a site-wide redirection, I tested it and it worked fine. In case you’re wondering, you can easily test it by creating a 307 (temporary) redirection instead of a 301 (permanent) redirection. Here’s how to do it:

Create a new 301 redirection where the source URL is

/(.*)

and the target URL is

http://www.example.com/$1

Make sure you check the Regex box, add it, and you’re done.

Just to make sure, I contacted John Godley to confirm whether it was the best way to do things. He said that would certainly do the job, but there was a MUCH easier and faster way to do it, one that saves a lot of the overhead that comes into play when WP gets used. It works through the .htaccess file. He was kind enough to provide me with the code, which is reproduced below.

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

</IfModule>

Just paste that into your .htaccess file (remove all other code but make sure you back it up somewhere in case you need it), save it, upload it, and you’re done.

Don’t do anything yet though! Not before you’ve thoroughly backed up everything! Let me outline the steps for you, and keep in mind that I wanted to mirror all of my content from two separate WP sites using the same WP version, and to redirect from the first to the second. These two conditions have to be met in order for my advice to apply to your situation.

  1. Make sure both sites are on the latest and greatest version of WP, or at least they’re on the SAME version of WP
  2. Back up the database from the old domain
  3. Download all site files from the old domain
  4. Upload site files to new domain
  5. Restore database to new domain
  6. Make changes to .htaccess file as shown above
  7. Log into your new domain’s WP admin panel and change the site and blog URLs. Now you’re done! Check to make sure the redirection works properly and all of your content is there.

Upgrade your WP installs

The two sites have to be on the same version, or else things might not work as expected. Upgrade both sites to the latest and greatest, or at least make sure they’re on the SAME version before you do anything else. Go to WordPress, download and install the latest versions. There’s also an Automatic Upgrade plugin, but I haven’t tried it yet, so I can’t vouch for it.

BEFORE you do any sort of upgrade, you need to back up. Yes, you can’t get away from this… You’ll need to do two backups, one before you upgrade, and one after you upgrade, before you transfer the content.

Back up your content

This combines steps 2 and 3 listed above. Backing up your site files is easy. Use an FTP client to access the files on the web server and download them to your hard drive. I always keep a local copy of my site files. It just makes sense.

Backing up your database is a little more involved. Your database contains all of your site content (posts, links, comments, tags, categories, etc.) so you definitely don’t want to lose it. There are detailed instructions on backing up the database on the WordPress site. You can follow those, or you can go to your site’s Admin Panel >> Manage >> Export and download the WordPress WXR file, which you can import into your new site afterwards.

While this is great for backups, restores are another matter. I tried it and found that the import operation kept timing out at my web host. Given that I have thousands of posts, I didn’t want to sit there re-restoring the WXR file only to get a few posts done with every operation. I needed something quicker.

There is a plugin called WordPress Database Backup which lets you download a zipped SQL file of the database. You can use this to restore the database through the MySQL Admin Panel, if your webhost provides you access to it.

What I did was to simply point my new site install to my old database. This is a very handy and easy solution if you plan to host both sites with the same web host. But this still doesn’t excuse you from backing up the DB before you upgrade the WP install! 🙂

Restore your content to the new site

This is a two-step process (see #4 and #5 above) and involves reversing the steps you took during the backups. You will now upload your site files to the new domain, and you will restore the database to the new domain as well. If you’re in my situation, where you’re using the same web host, you can simply point the wpconfig.php file on your new domain to the old database.

Make sure all your content is properly restored before going on to the next step!

Make changes to the .htaccess file

You will need to make sure you don’t touch the .htaccess file before you transfer it to your new domain. Only the .htaccess file on your old domain needs to change. Remember this, or you’ll be wondering what’s going on with the redirects afterwards…

Use the code I’ve given you above, in the Planning and Research section, to make changes to the .htaccess file on your old domain, after you’ve made absolutely sure that all of your content is now mirrored on the new domain. Once this is done, the redirects will occur automatically and seamlessly.

Final checks and tweaks

This is very important. Surf to your old URL. You should get re-directed to your new URL. Do a search in the search engines for content of yours that you know is easily found. Click on the search results and make sure the links get redirected to your new site. Because you’re using 301 redirects, the search engines will automatically change their search results to reflect the URL changes without affecting your page rank, so you shouldn’t lose any search engine traffic if you execute the content move correctly.

There are a few more things you’ll need to check:

If you’d like to make changes to your site feed (and I did), you’ll need to handle that properly. I use FeedBurner, and there are people that subscribe to my content via RSS or via email. I needed to transfer both groups of subscribers to my new feed seamlessly. The FeedBurner folks helped me do just that, and I didn’t lose a single subscriber during the move. I detailed that process in this post.

What about internal links? If you’ve blogged for a while, you’ll have linked to older posts of yours. Those link URLs now contain the old domain, and you’ll need to change all of them at some point, or you’ll risk making those links invalid if you should ever stop renewing your old domain. Fortunately, there’s a Search and Replace plugin for WP that lets you do just that. It works directly with the database, it’s very powerful, and it’s very fast. That means you have to be VERY careful when you use it, because there’s no undo button. You can easily mess up all of your content if you don’t know what you’re doing.

What I did was to replace all instances of “.raoulpop.com/” with “.raoulpop.com/“. That did the trick nicely. I then did a regular site search for all instances of ComeAcross and manually made any needed changes to those posts. (Here’s a thought: back up the DB before you start replacing anything. This way you can restore if something should go wrong.)

Finally, if you’re using the Google Sitemaps Generator plugin, you’ll want to make sure you manually rebuild your site map. You don’t want to have your old site information in the site map as Google and the other search engines start to crawl your new domain.

That’s about all I did for the site content transfer. It occupied half my New Year’s Eve night, but it was worth it. It’s quite a bit of work, but if you plan it out, it should only take you 4-5 hours or less to execute the transfer, depending on your familiarity with this sort of thing, and the speed of your internet connection (keep in mind that upload speeds are a LOT slower than download speeds on most broadband connections).

Given how much work is involved, I was a bit surprised to see Matthew Mullenweg (founding developer of WordPress) talk about doing his own switch to a new domain in “2 seconds“. I think what he referred to is the changes to the .htaccess file and the blog URLs, which are the fastest parts of the process. There is, however, quite a bit of work that needs to take place behind the scenes before those switches can get flipped. And I also believe (someone correct me if I’m wrong) that he pointed both domains to the same web files — in other words, re-used his existing WP install — so he bypassed a lot of the steps that are otherwise required.

Hope this proves helpful to someone!

A few feed changes for my site

Birds of a feather…

The transfer of all my content from comeacross.info to raoulpop.com has gone smoother than expected, which is great. I’ve been monitoring the feed usage stats, and it looks like everyone has migrated over to the new feed. Just in case, please check your bookmarks and feeds, and correct them as follows, where appropriate:

All of my other feeds have stayed the same. Here they are:

Of course, all URLs are getting automatically redirected (with a 301 status) from comeacross.info to raoulpop.com. That’s been working great, although some people reported issues during the first few days. Thanks for letting me know about those!

If you’re linking to my site in your sidebar, could you do me a big favor and check to make sure you’re no longer linking to comeacross.info but to raoulpop.com? And if you’re not linking to me, would you please?

A big thank you goes out to FeedBurner for migrating my email subscribers and helping with the feed redirect!