WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Problem with attachments after migrating to multisite (12 posts)

  1. marianograndioso
    Member
    Posted 1 year ago #

    I just migrated my blog into a multisite network. I managed to get mostly everything working, except for post thumbnails. They seem to be unattached, and I can't figure out which DB record does this. When I go to "Set featured image" screen, I see all the images there and I can set the featured image, but I don't want to do this manually for each post obviously. The postmeta table is the same as on the old website. They both use the same domain name, so the image paths are still valid.

  2. How did you import posts?

  3. marianograndioso
    Member
    Posted 1 year ago #

    I exported the whole database from the old site, opened it in N++, replaced all old db prefixes with [new_prefix]_[blog_number], cleared all the tables that were going to be imported from the new blog and finally imported the old database into the new one.

  4. *wince* Well that was the hard way 'round. An export/import will keep those attachments for you.

    It should be in wp_x_posts and wp_x_postmeta, provided the IDs all stayed the same.

    They both use the same domain name, so the image paths are still valid.

    Not if this is a subsite. Your image paths are now /wp-content/uploads/sites/#/...

  5. marianograndioso
    Member
    Posted 1 year ago #

    I just mapped my domain back to the old site, exported all data thru the exporter in tools, remapped to the multisite, imported... and the thumbnails still don't work.

    The images were indeed in the same path, because that's where I copied them. There was no 'sites' folder yet. So I uploaded a file, let WP create that directory, moved the files from 'uploads' to 'uploads/sites/3' and changed all records in the DB. Still nothing...

    I did the latter first. Now, after the import, I have duplicate posts. I'm re-importing my database from this morning...

    Any other ideas ? I even tried manually setting the thumbnail to an existing image and it wouldn't work. The thumbnail code doesn't seem to output anything.

  6. How was all this set up originally?

    You have domain1.com which is your multisite, and domain2.com which was a totally separate single site. So you created domain1.com/domain2 (or whatever) on the Multisite.

    Is that right?

  7. marianograndioso
    Member
    Posted 1 year ago #

    Originally I had the single site/blog on domain 1 (it's actually nowillnoskill.net). I also have another site - my homepage, which is just simple HTML at myname.com (actually mariancerny.com). I am now building a third site, for which I have domain 3 reserved (cavemanprinciples.com).

    I decided I want to have all the sites under one wordpress installation, so I:
    - installed WordPress with a fresh new DB
    - mapped domain 2 - my homepage to this WP installation
    - created multisite - subdomain style
    - created two new sites
    - mapped domain 1 and domain 3 to the new WP folder
    - copied plug-ins, uploads and the database from the original blog as stated above

    A strange thing is that other images that are just embedded in posts work fine and when I click the add image button, I see all the images. When I click media gallery, I only see blank white images.

  8. When I click media gallery, I only see blank white images.

    Is allowOverride set to All on your httpd.conf?

  9. marianograndioso
    Member
    Posted 1 year ago #

    Unfortunately I don't have access to it...

  10. Ask your host?

  11. marianograndioso
    Member
    Posted 1 year ago #

    The problem was that WP didn't have write permissions to the new upload folder. I changed them to 777 and now I can set featured images. I had to manually update all of them though. Luckily I only have around 30 posts.

  12. Try 755 instead of 777. It's safer.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags