WordPress.org

Ready to get started?Download WordPress

Forums

problem of image path after import XML (16 posts)

  1. zedrino
    Member
    Posted 2 years ago #

    Hello everybody,

    I just installed the new wordpress 3.4 from fresh. The previous WP 3.3 (upgraded from WPMU) had no access to the Network admin... anyway, that's not the problem.

    I import XML files from the previous EXPORT (what a great tool !), and moved manually images on the server after I create each blog and upload a media (then I can have the correct folder created).

    It's all working good except the fact that in my articles/posts images have relative URLs (like ../) instead of the complete URL; http://.
    Also I don't see my medias in the dashboard/Medias but they are in the folder.

    Any suggestions ? Thank you for your help

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Relative urls should never be used in WordPress. You'll now have to turn all of those relative urls into absolute (full) urls. http://wordpress.org/extend/plugins/search-and-replace/ might help.

  3. zedrino
    Member
    Posted 2 years ago #

    Thank you !

    I don't think I ever specified to use relative urls in my posts or pages then if its "banned" in WordPress why it is like "by default" when you publish ?
    Thanks for the link too !

  4. It's not 'banned' it's just a bad idea. We don't nanny-gate people :)

    And it's not default by any means.

  5. zedrino
    Member
    Posted 2 years ago #

    Ok thank you really much,

    can I ask you if you know why I dont see the pictures in Medias while they are in the folder /files (with permission 644). Thanks again !

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    Did you import the attachments via the export .xml file?

  7. zedrino
    Member
    Posted 2 years ago #

    I copied the files from the the old folder to the new one, on the distant server.

  8. zedrino
    Member
    Posted 2 years ago #

    It might be a tracking of the images somewhere, WP is not listing the files directly in the folder is that right ?

    thank you !

  9. zedrino
    Member
    Posted 2 years ago #

  10. You ... can't just upload the files like that, not with normal WP, not with multisite. You must use the image importer, or they never get in the right location.

    /files/ is a virtual directory, it doesn't exist. It's a redirect. Putting images there would break everything.

  11. zedrino
    Member
    Posted 2 years ago #

    I see, I'm once more going to break it all !!

    Then, there is no solution to use backups that are on the distant server, I have to download everything on my computer and reload it with WP right ?!

    What about if I have many blogs, thousand of thousand of pictures and a slow (third world) internet connection ?!

    thanks

  12. zedrino
    Member
    Posted 2 years ago #

    Ah.. and it seems that its working, I can see all images when there are published but it's just the Media library that doesn't show anything except the one I upload directly with the Add new: http://backpackers.bluegreenbelize.com/

  13. Yeah, Media library is what you broke :) The images 'work' but you can't use media upload to pull them anymore.

    What about if I have many blogs, thousand of thousand of pictures and a slow (third world) internet connection ?!

    You move Multisite properly. Or rather, you don't try to move individual blogs.

    1) Backup the database
    2) Backup all your files.
    3) Shove it on a thumbdrive
    4) Upload manually

    There isn't a better way yet.

  14. zedrino
    Member
    Posted 2 years ago #

    Hum, I don't understand why it's so complicated (I'm not a coder).
    Can I ask the reason of that "broken" media Library ? Is there a listing somewhere of the files that are uploaded with WP ?

    I guess I will have to deal with a crappy WP one more time (my fault not WP of course), or reload from my computer's backup.

    Thank you Ipstenu.

  15. It's complicated because it's not just 'WordPress looks in the folder for you images, finds them, and lists them.' Which is what I suspect you're thinking it does.

    Is there a listing somewhere of the files that are uploaded with WP ?

    Yes, and that's why you broke it :) The image's data is stored in your database. That's where the custom information (title, caption, etc) is stored, and where WP says 'This image was used on this post...'

    If you were importing a single site, you'd actually have the exact same issue. WordPress's media panel associates images with data. When you break that (by not uploading the meida with the content), you... break it ;)

  16. zedrino
    Member
    Posted 2 years ago #

    Of course, it's all clear, thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic