VPS Migration Step 1

I have been hosting my sites or blogs on Virtual Private Servers (VPS) since 2003 or so. I thought that a Unix guy like me should eat his own dogfood and do sysadmin on his own server. And, I’ve been planning to run my own apps – Rails, Java, etc.

But that didn’t happen. I am still doing my own personal R&D, but in its current iteration it does not need a public-facing website. It all lives inside my PC.

So, to cut costs and save time (yet another server to update and check), I canceled my VPS. I still want paraz.com content to be visible and searchable, so I migrated it here to wordpress.com. But, I was using a custom permalink structure – my preference, which is /POST-ID/post-slug. wordpress.com uses the default date-based scheme.

Therefore, I had to make my own redirect. The post slugs are the same, but WordPress has no “search by post slug” query. I had to make a 1:1 mapping for each post. I did this by performing an XML export on both blogs, then writing a small Python script to parse the XML and do the matching. The output is a flat file with the old URI on the left and the wordpress.com URL on the right. This is used by a RewriteRule which looks for a match and issues a HTTP 301 redirect.

The effect now: people who click on my old URLs from a search engin, or from a link, will land here in wordpress.com.

The effect later: The new URLs should replace the old URLs in the search engine results.

Advertisements

2 Responses

  1. Hi, Migs,

    If you want me to host you, just let me know. 🙂

  2. merci!
    http://www.ar4.us

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: