internal links don’t work after wordpress.com export

  • Unknown's avatar

    Hi,

    I recently exported my posts and comments from my wordpress.com blog (bedbugger.wordpress.com) to a site hosting wordpress 2.1.2. Everything was fine (once Trent and Drmike helped me figure out that I needed to break the .xml file into smaller pieces–wordpress says files up to 30m can be imported, but this was not true).

    But once I got the site up and running, one thing was seriously wrong: my internal links all still pointed to my old site. (I have a site with lots of faqs and we often point to those, so there are a good number of internal links).

    I took the new site down, thinking I would have to go through and edit the .xml before importing it. (I realize I should have left it up for people to see the problem, but I am redirecting traffic to my old site until the new one is up, so this won’t work anyway.)

    Any advice on how to do this right? If I do find and replace in the .xml file to correct the old internal links to reflect what the new blog’s internal links should be, will this work? (I am slightly concerned that on being imported to the new wordpress installation, wordpress will try to convert these again, and it might cause errors.)

    If it makes any difference, I am using the type of links that are
    /year/month/day/post-title/

    Is there an easier way? (Can internal links on my own wordpress install be fixed somehow once the site is up, besides going through every post and comment?

    I hope this makes sense. I have hosted offsite once before, but I am pretty much a beginner.

    Many Thanks!

  • Unknown's avatar

    I am no expert at this, but it seems to me natural that you’ll have to manually update each of the links. If you’re fortunate, someone more experienced will post a workaround, but I’m not aware of any at the moment.

  • Unknown's avatar

    Thanks Raincoaster. Even knowing if doing this in advance on the .xml file should work would help.

  • Unknown's avatar

    If you do a search and replace using a normal text editor on the .xml file it should do – just strip out every mention of “http://bedbugger.wordpress.com” and replace it with “” (nothing at all) it should work – this will make all the links relative, rather than absolute. Test it with a version of the file, obviously – rather than doing it on your only copy.

  • Unknown's avatar

    OH, so you don’t change the bedbugger.wordpress.com –> bedbugger.com (new url). You just leave it blank!? Thanks ozrisk. Will try.

  • The topic ‘internal links don’t work after wordpress.com export’ is closed to new replies.