WordPress.org

Forums

Image URLS after upgrade (6 posts)

  1. mrarrow
    Member
    Posted 4 years ago #

    I've done a fresh multisite WP 3.0 install, updated all the .htaccess etc. Then I did an export from a WPMU 2.9.2 site into 3.0. During import I told it to go off and also download/upload all the images and attachments too, which it duly did.

    However, all the actual img src links in the imported posts are all obviously referring to the old WPMU 2.9.2 URL structure of http://domainname.com/wp-content/uploads/2010/06/nameofimage.jpg rather than the new WP 3.0 URL's http://domainname.com/files/2010/06/nameofimage.jpg

    And I can't think of a way of amending the .htaccess file (for instance) to rewrite these legacy links to the new URL structure - coz I've already got RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] in the new .htaccess file.

    Any ideas or am I missing something very obvious?

  2. Yeah, that "old" URL structure was not WPMU-specifc, but *single* WordPress specific.

    Either physically move a copy of the image files over to the new server into a copy of the old folder structure, or change the URLs in the posts.

  3. mrarrow
    Member
    Posted 4 years ago #

    Thanks andrea_r, at least I know its not just me being stupid then :-)

    I guess I could just do a simple find/replace in my exported xml file before import.

    Rather irritating though - surely this legacy code could've been dealt with a bit nicer by the upgrade merge...

  4. But..... the old mu didn't use that folder. :-/ So the merge didn't have to account for it.

  5. mrarrow
    Member
    Posted 4 years ago #

    The exported file came from a standard wpmu 2.9.2 install not a single wp and was just done via the normal tools > export feature.

  6. Do you know if anything was done to that install?

    Iv;e got a few mu installs of my own. None of them put files in the /uploads/ folder.

    So yeah, you can do a search & replace on the exported file as well.

Topic Closed

This topic has been closed to new replies.

About this Topic