WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Images broken after move (6 posts)

  1. Anna
    Member
    Posted 3 years ago #

    Hi all. I have a multisite with several websites working great under it.

    I decided to transfer a rather image-heavy separate install into the network and this is what I did:

    1. Added new.domain.com in the multisite network.
    2. Used the import feature to get all the posts, pages, attachments, etc from old.domain.com
    3. Copied over the images from old.domain.com just to make sure.
    4. Went into Super Admin > Sites > Edit and changed "new.domain.com" into "old.domain.com"
    5. Went into my Panel and edited the records of "old.domain.com" so it would work with multisite (I have to do this manually because I'm on DreamHost.)
    6. Went into MySQL and did a search and replace for "new.domain.com" to become "old.domain.com"

    The site is working great and all my posts and pages are there. The problem is, some images are not showing up. I checked them out in the Media Library and saw that their upload paths are at "new.domain.com".

    Any ideas how I can fix this? This actually happened to me before and someone on IRC gave me some PHP code to run so that something on WP could be changed. Unfortunately, I can't find it using the WP chatlogs and it was a pretty long time ago so I'm asking here.

    Much thanks!

  2. You may need to search and replace in your database to clean that up. There are plugins that can do that as well (look for search and replace plugins)

  3. Anna
    Member
    Posted 3 years ago #

    Hey there ipstenu.

    I did a search and replace on all tables but it says no results found.

  4. Via a plugin or via the database itself?

  5. Anna
    Member
    Posted 3 years ago #

    The database itself.

  6. Anna
    Member
    Posted 3 years ago #

    Did a broader search in the database and found that the "guid" field of the posts table had "new.domain.com". Strange that it didn't come up in the first place.

    Also, I had to look for any inserted images and change "wp-content/uploads" to "files" :)

    Problem solved~!

    Thanks for your time ipstenu :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.