Support » Fixing WordPress » Migrated WordPress to a new Domain, Media Library Links are broken

  • Resolved cheezitman

    (@cheezitman)


    Hello,

    Due to my new boss our sites are to be moved to a new server (yea!) and have the domain change (boo), the problem is a WordPress Mutlisite full of student ePortfolios.

    1. I moved the files with rsync,
    2. dumped and imported the database
    3. and ran searchreplacedb2.php to change the domain name on the site.
    4. lastly I modified wp-config to change the URL and modified my and the server’s host files so I can test it internally.
    5. The site seems to work, but all (and I mean ALL) the media links are broken. The files are there, I can edit them with FTP and the webserver has access to them, and I can upload new media, but existing links seem broken.

      Any idea how I can fix this? Images I can see in the library if I go to edit them, but I can’t see them in attachment pages etc, I just get 404 messages.

      I’m running the server on nginx with php-fpm, but the old server was using that as well.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter cheezitman

    (@cheezitman)

    If nothing else where is WordPress storing the path information for media?

    Are you using permalinks? If so, try turning them on and of again. Remember to store your custom structure, if you have, somewhere as this might disapear.

    Also, are you using any kind of on-the-fly resizing tool, timthumb.php etc? Are you using any plugins that might have there own databases that where not included when you run the s&r script?

    Thread Starter cheezitman

    (@cheezitman)

    I’ll try permalinks, we’re not using any resizing tool, but I’ll see if I can disable all plugins except Active Directory.

    Thread Starter cheezitman

    (@cheezitman)

    Tried all, no joy. From what I can tell all my media, even new uploads (while they end up in the server in the correct spot), can’t be accessed.

    Thread Starter cheezitman

    (@cheezitman)

    Nevermind I found that in my nginx virtualhost file I needed to set:

    location ^~ /blogs.dir {
                    internal;
                    alias /var/www/SITENAME/wp-content/blogs.dir ;
                    access_log off; log_not_found off;      expires max;
            }
    Thread Starter cheezitman

    (@cheezitman)

    resolved

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Migrated WordPress to a new Domain, Media Library Links are broken’ is closed to new replies.