How to Port Your Blog from TypePad to WordPress (Part 2)
March 19, 2008
This is Part 2 of a 2-part post on migrating your blog from TypePad to WordPress. << Part 1
While the information in this post uses TypePad as the subject. much is transferable to other platforms.
Part 1 discussed overall migration considerations, preparing for the move, exporting data from TypePad, Importing data into WordPress, cleaning up images and file references, and taking advantage of some of WordPress’s features.
Redirect Traffic to your New Blog
If you’re going to drop any traffic, it’s going to happen right here!
- Make sure the receiving server is ready for traffic.
- Go to your domain registrar, and point your domain to the nameservers on your new hosting account or server. You’ll probably also have to delete the MX records that still exist.
- Wait.
- Ping your domain name to see which IP address responds, TypePad or your new server. As soon as the responding IP address is your new server, continue.
- In your WordPress administrative panel, go to Options | General, and make sure your blog is pointing to your domain name, and not the temporary URL or IP address you used to setup your WordPress blog. If you’re using a new domain, this step doesn’t apply to you. Important: don’t perform this step until you know your domain is pointed to your server or you’ll lose access to your administrative panel. If this does happens to you, just open up your MySQL database, and update the entry in the wp_options table.
- After cutover, go to your TypePad control panel and select Site Access | Domain Mapping. Remove your domain mapping. This step doesn’t need to be done, but I prefer to make a clean break.
DNS is painful. You need to coordinate different servers in different locations, and you can never be sure if what you see is what someone else will see (until propagation completes). So when something goes wrong, it’s often hard to pinpoint where the problem is. If you do things in the above order, you shouldn’t run into any problems. [Read more]
How to Port Your Blog from TypePad to WordPress (Part 1)
March 17, 2008
This is Part 1 of a 2-part post on migrating your blog from TypePad to WordPress. Part 2 >>
While the information in this post uses TypePad as the subject. much is transferable to other platforms.
You’re reading this post for one of several possible reasons:
- You’re looking into moving your TypePad blog to a self-hosted WordPress version, and you want to know what to expect
- You’re in the process of moving your blog, and something isn’t going right or something appears a bit wonky
- You’ve already moved your blog, and you want to make sure you’ve dotted your i’s and crossed your t’s
- You like me and you’re bored
When Quick Migrations Get Ugly
I have good news and bad news for you. Migrating to WordPress is incredibly easy (for the most part). And for most people, it should be a relatively simple move, even if some parts can get rather tedious:
- If you’ve hacked TypePad with any custom styles, stripping out the remnants of those styles can be painful
- If you have a large number of posts, error checking can be tedious
- If your posts are thoroughly cross-linked, you’ll have to re-link them
- If you’ve used a lot of photos in your posts, you’ll have to re-reference them and create your own thumbnails
That was the good news. The bad news is that to minimize downtime, to make sure your feed is available to your readers, and to ensure that you maintain your page rank after the move, you will have to jump through some hoops. So the physical migration itself is easy — moving your content from one blog on one server to a new blog on another server — but attending to the other concerns is what could cause you some headaches. If you have a high page rank, and want to maintain it, you’ll have to jump through some hoops. If you want to minimize site and feed downtime, be prepared for a little extra work.
There are many other smaller considerations, but the above are what consumed most of my effort. At the risk of stating the obvious, you probably noticed that characteristics of larger, more active blogs lend themselves to the more difficult migrations. Even still, I wouldn’t expect the total migration time to exceed 15 to 20 hours. For smaller, simpler installations, 1 hour would seem like an eternity.
Another thing I’d like to point out before going further is that I’m assuming that you’re going to be transferring a domain name along with porting your blog. That is, your TypePad blog is available at http://yourblog.com, and it should maintain that address when the migration is complete. If you’re moving from http://youraccount.typepad.com to http://yourblog.com, then the process is far simpler, because you won’t need to worry about the DNS propagation lags. Of course, you’ll also lose any page rank (at least temporarily) that you’ve worked to achieve, so understand that before you go in. [Read more]
Nifty hack: turn text into images with CSS
February 18, 2008
This is a pretty slick CSS effect — hiding images in plain sight. If you’re using Safari or Firefox, this should work for you.
This post looks like plain text, right?
It is, except that many styles have been
applied to the letters. See the styles
and the overall effect by selecting all
of the text in this paragraph.This post
looks like plain text, right? It is, exc
ept that many styles have been applied t
o the letters. See the styles and the ov
erall effect by selecting all of the tex
t in this paragraph.This post looks like
plain text, right? It is, except that m
any styles have been applied to the lett
ers. See the styles and the overall effe
ct by selecting all of the text in this
paragraph.This post looks like plain tex
Interesting, no? Try it for yourself at http://metaatem.net/highlite/. You can select the text width and color to control resolution. BTW, this is the image that is being used as a source:

Swirl Connect: location-based mobile social software
January 28, 2008
We have quietly released Swirl Connect, software for your mobile phone that helps you stay connected with your friends and their latest activity, as well find new people and places, whether you’re mobile or at home on your PC.
The current release is slightly hobbled, as $$$$ is tight, and we had to turn off the messaging features, but there’s still plenty to do and see. Here are a few features:
- Find your friends and get alerted to their latest activity
- Explore nearby places of interest
- View and share photos, notes, and places on your PC or mobile phone
- Mobile instant message or group message with your friends
- Meet new people while you’re on the move
- Get location-based alerts
- Interact with both PC and mobile users in real time
Try it out! It’s free, supports popular Nokia, Sony-Ericsson, and Motorola phones (with plenty more coming), and is a lot of fun.

I Can’t Imagine a Worse Suggestion
January 3, 2008
I was searching for relevant keywords for Swirl Connect. I don’t recall
exactly what I entered, but I was using keywords similar to “mobile
social software, friend finder, geotag photos, mobile instant
messaging, location based, share photos, share place.” I don’t know
what kind of leap in logic resulted in this suggestion:
Credit: this is posted on the Swirl Connect site, as I was generating keywords for it when it appeared. Swirl Connect is location-based mobile social software that helps you stay connected with friends and meet new people while you’re on the move.
Free Geocoders / Geocoding Posts
December 28, 2007
Several weeks ago I was making changes to an as-yet-unreleased wiki, and to protect it from prying eyes I locked it up from all IP addresses except my own. My IP address was just updated, and looky looky, I can no longer access the wiki, which brought that permission change to the forefront.
Problem is, I posted several articles on some free geocoders I wrote. Just simple tools that you can use to geocode addresses via Google’s Map API or the Geocoder.us service. Those tools are only available on the wiki, so I’m afraid that everyone was met with a ‘403 access denied’ error when attempting to access them.
Everything is open again; please accept my sincerest apologies. There’s nothing I hate more than wasting my time, so I hope I didn’t waste too much of yours.
Geocoding based on an IP Address
November 13, 2007
Okay, so I’m on a bit of a geocoding kick here. Previous posts have discussed geocoding when you have a physical street address. But obtaining an address can be obtrusive, and the dataset used is North America-centric. This post focuses on very quickly geocoding a user’s location based on their originating IP address with MaxMind’s GeoLite City database and Java API.
There are a number of reasons why you might want to determine a user’s location based on their IP address:
- Center a map mashup on the user’s location
- Serve localized content, e.g. language, currency, time
- Reduce credit card fraud (this seems to be the most commercial use at present)
- Target marketing and ads
The biggest problem with geocoding by IP address is that it can be inaccurate for many IP addresses. This is because the coordinates for a given IP address are for the organization that owns the IP address block, and not necessarily the location of the end user of that IP address. Complicating this further are those users who connect via a proxy — e.g. AOL users. So private IP’s, VPN’s, proxied browsers, internal network blocks, and so on are difficult to geocode.
Using the GeoLite City Database on Your Server
You have two download options: CSV and binary. If your project requires that you import data into MySQL, you can use the CSV option, but it is much slower and requires more effort to setup. Binary is your best bet, and is what I used.
I installed the GeoLite City binary on both a Windows development PC and a Linux server. On Windows, download to your PC, and extract using WinZip or similar tool. On Linux:
$ wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
$ gunzip GeoLiteCity.dat.gz
$ mv GeoLiteCity.dat /path/to/database/location/GeoLiteCity.dat
Import the Java API into your current project in your IDE of choice. I’m using JBuilder (boo, hiss). There are also API’s for C, Perl, PHP, C#, Ruby, Python, VB.NET, Pascal, and JavaScript.
Using the Database (IP Address to Latitude and Longitude)
1) In your class file, create a LookupService object, specifying the location of the database you extracted. Then create a Location object for the IP address you want to geocode:
LookupService lookup = null;
try {
lookup = new LookupService(PATH_TO_DATA, LookupService.GEOIP_MEMORY_CACHE);
} catch (IOException e) {
System.out.println(ex.getMessage());
ex.printStackTrace(System.err);
}
Location location = lookup.getLocation(”62.75.185.174″);
2) Then you can extract location information from the Location object, including country, region, city, postal code, latitude, longitude, area code, and timezone.
String city = location.city;
float latitude = location.latitude;
float longitude = location.longitude;
If you create two Location objects from LookupService, you can calculate distance between them with:
double distance = location1.distance(location2);
3) Remember to close the database connection. Data access is thread safe, by the way.
lookup.close();
Note that to use GeoLite City on a public web site, you must include the line “This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/” in any documentation or promotional materials.
Apache and Tomcat via Cpanel - Servlet Display Problems
November 7, 2007
Problem
Apache Web Server was not passing servlet requests to Apache Tomcat. Instead it served 404 errors, even though the Apache Tomcat Connector (JK 1.2, mod_jk) was auto-configured by the WHM / Cpanel installation.
Other Possible Descriptions of the Problem
- Jsp’s work in Tomcat, but servlets do not
- Apache Http Server won’t pass servlet requests to Tomcat
- Tomcat problems using the Cpanel plugin
- Virtual host configuration problem with Cpanel Tomcat
- Apache not recognizing servlets
- Servlets can’t be accessed through Apache
In the latest Cpanel Release (11.15.0-RELEASE 17853), Tomcat support has been integrated. Prior to this (I’m not sure for how long), Tomcat was available via a beta plug-in. I experienced this problem with both the beta plug-in and the integrated support.
What’s Happening
Apache Http Server accepts all web requests and determines which are requests for static content, and which requests should be forwarded to Tomcat.
Apache correctly serves static content, and correctly passes all requests for .jsp pages to Tomcat. But when a servlet is requested, e.g. www.myserver.com/myapp/myservlet, Apache looks for the “/myapp/myservlet” directory, and finding none, spits out a 404 error.
How to Resolve the Problem
I tried several things that I thought should work but did not, though I don’t know if it was due to my specific configuration or because they were just the wrong things to do. What finally solved the problem was just adding an .htaccess file to the root of the web application with the following lines:
SetHandler jakarta-servlet
SetEnv JK_WORKER_NAME ajp13
This forces Apache to forward all requests to resources within this context to Tomcat for processing, specifically to worker ajp13. Ajp13 is one of the default workers set up, and is defined (on my system) in /usr/local/jakarta/tomcat/conf/workers.properties.
Other things that I thought should work but didn’t (your mileage may vary):
1) In /etc/httpd/conf/jk.conf (if your httpd.conf file includes jk.conf),
add/edit the switch “+ForwardDirectories.” Normally, if Apache runs
across a directory it doesn’t recognize, it will spit out a 404. This
switch says to forward those requests to Tomcat, and let Tomcat spit
out a 404 if it can’t fulfill the request.
2) In /etc/httpd/conf/jk.conf (if your httpd.conf file includes jk.conf), specifically mount each context, and unmount static content. Mounting tells Apache to pass requests to Tomcat, and unmounting tells Apache to serve the content itself. Newer versions of Tomcat are faster than Apache at serving static content, but apparently, using Apache to serve static content is safer from a security perspective.
JkMount /mywebapp/* ajp13
JkUnMount /*.gif ajp13
JkUnMount /*.jpg ajp13
A separate issue that is outside the scope of this post is whether you should use Apache Web Server to front Tomcat requests, or whether you should just have Tomcat accept requests over port 80. If you’re using a recent Tomcat version (5.5+), Tomcat can serve both static and dynamic content faster than Apache.
Use Tomcat if: 1) you’re only dealing with a single server; 2) and you’re not using any other software that requires Apache (e.g. forums or wikis written in PHP).
Use Apache to front Tomcat requests if: 1) you want to load balance across multiple servers; 2) or you want different web applications or virtual hosts to be served by different processes.
Disclaimer
I know embarrassingly little about hardware, networking, or server setup. This solution might be a hack or it might be obvious to some more familiar with the components mentioned, but it couldn’t be resolved through a dedicated server help desk or through the Cpanel help desk, so I assume there are others out there that this could help. Everything in this post is based on my limited experience with the aforementioned software and my own research. If you know of a better, cleaner way to do this, or if you know how better to describe this problem or solution, please forward to me and I’ll amend this post.
Rationale Behind this Post
I recently (as in yesterday) resolved a difficult to diagnose problem involving Cpanel, Apache Web Server, Apache Tomcat, and the Apache Tomcat Connector (JK 1.2, mod_jk2). My googling skills tend to be above average, but I could find no reference to this specific problem anywhere, and the sole purpose of this post is to hopefully save someone else the aggravation. So please disregard the keyword-heavy text — it’s altruistic in nature, I assure you.
Geocoding with the Google Geocoder
November 5, 2007
Before using the Google Geocoder, you must have a Google Maps API key. It will not work without one. If you don’t yet have one, get yours via the Google Maps API page. Also, to get this out of the way, Google has provided a fantastic service free of charge for non-commercial purposes. Please respect their terms of service.
Download the free Google Geocoder
The Google Geocoder is very similar to the Quick ‘n Dirty Geocoder. It is free software, and can be used and distributed however you like. It installs in a servlet container, and accesses the Google Maps web service to translate the names and addresses you supply (in a text file) into geographic coordinates, which it then writes back to your PC and/or a database.
For details on how to install and use this software, frequently asked questions, configuration, etc., refer to the wiki article. The short version is just drop goog.war into Tomcat’s webapps directory, start it, then follow the instructions at http://localhost:8080/goog/code. This post describes some of the Java code used to implement the communication between the Google geocoder and the Google Maps web service.
Geocoding with the Quick ‘n Dirty Geocoder
November 1, 2007
The geocoder described in this post is free software, and can be used and distributed however you like.
It installs in a servlet container like Tomcat, and accesses the geocoder.us web service to translate the names and addresses you supply (in a text file) into geographic coordinates, which it then writes back to your PC and/or a database.
For details on how to install and use this software, frequently asked questions, configuration, etc., refer to the wiki article. The short version is just drop geo.war into Tomcat’s webapps directory, start it, then follow the instructions at http://localhost:8080/geo/code. This post describes some of the Java code used to implement the communication between the Q&D geocoder and the geocoder.us web service.
Most lines of code in this application are used in IO on your own PC, rather than the web service. The GeoServlet receives requests, and uses the GeoImporter to read in and parse files from the text file on your PC. It then uses the GeoTransport class to communicate with the geocoder.us service, and finally writes the results back to a file and/or database with the GeoExporter class.





Recent Comments