• I’m going to be converting my ‘large’ blog (300 entries, 1500 comments) from MT to WP soon. My problem is that all uploaded images are in a folder inside my MT blog folder. I’m running WP in another folder to be able to do all the required templating whilst having the MT site still running. I’d like to change the path for all images to another folder (located in the folder where WP resides).
    Has anyone tried doing a search and replace on the exported MT entries? I guess I could do that to change the paths and then just copy the images to their new location, right?
    All images are currently in https://www.myserver.com/blogname/archives and the new url would look something like https://www.myserver.com/blogname2/mt-uploaded.
    Any thoughts?

Viewing 7 replies - 1 through 7 (of 7 total)
  • It sounds like a logical solution. Once everything is in the export file, so a search and replace. Then move all the images to the new directory. It’s what I would do.

    Thread Starter weefselkweekje

    (@weefselkweekje)

    I looked throught the exported file and indeed it seems that should do the trick. One minor problem is that MT (by default) stores the images with the generated html files. Luckily there’s only very few entries with links to other entries. The paths for these links will be changed as well, but there are few enough to repair the links afterwards…
    I’ll post here once I’ve tried to let you know whether it worked. Might be a few days, I still have a few layout-things to iron out…

    I just did this. It was straightforward, but you need to be careful to catch all of the places where you need to replace text.
    On my ISP’s server, I copied the mt-archives folder to wp-archives. I removed all of the automatically generated .html files that I won’t need in the future (like 00001.html, etc).
    Then I used sed to change all instances of “mt-archives” to “wp-archives” in each of the remaining .html files.
    I also did a global search and replace in the MT exported file.
    I installed wordpress on my FreeBSD machine at home to practice once before doing it on my ISP’s server.
    I still have all of my MT files there, untouched. I renamed the index.html file so that the wordpress index.php file gets picked up. I’ll give it a few days, and then get rid of the MT installation entirely!

    I couldn’t get the MT migration to work!
    I don’t know what I did wrong. I followed the instructions on the site.

    Thread Starter weefselkweekje

    (@weefselkweekje)

    I had a hard time getting the import to work as well… It soon turned out to have something to do with the import.txt file’s end of line characters. I repaired mine using CS Unipad, setting the EOL character to “Macintosh CR”. Without this, even the file I saved straight from Mozilla didn’t work. The script simply wouldn’t go to the next step. Clicking the “let’s go” link did nothing.
    Anyway, while I had the file open in Unipad, I did a search and replace on the image paths and it worked like a charm. Images seem to be showing up everywhere (too many entries to check them all), even thougth I renamed the old blog folder. Just thought I’d let you know…

    What happens if you import the MT entries before you figure out that you might want to change the links?

    I’ve just had to delete all my imported posts and then change the image path and then re-import them.

    In the next WordPress version it might help to add a tick box next to the posts in the ‘manage’ section so you can delete mutiple posts in one go?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Importing MT entries change image paths?’ is closed to new replies.