- Written by
Ed
- Posted March 1, 2010 at 4:35 pm
Migrating from TypePad isn’t too difficult – they provide the standard MT export file, which most platforms readily accept. The one big challenge my latest migration project involved was getting the images out. Since the client is a domain user, their images hosted at TypePad will stop working once the domain is switched over and there is no way in the TypePad control panel to export them.
The solution I came up with was to use php on the new destination (a dedicated server) and parse the export file itself, denoting when I’m in a body section, and using a regular expression to try and find any image tags that point to the domain being relocated. For each TypePad hosted image that was found, the same directory structure was created locally, and then the file was copied from the TypePad server to the local matching directory structure.
It took quite a while to run, since the client had been on TypePad since 2004, but the result was wonderful – all I have to do is relocate the created directory to the webspace and not only have all the images been released from they TypePad prison, but all the existing links will still work correctly. The one caveat is that the base image directory started with a period, which is not a problem as long as you understand that Unix variants hide all files and folders that start with a period. Use ls -la to see what is normally hidden.
Code is below the fold… Read the rest of this entry »