• Resolved loafintree

    (@loafintree)


    We are migrating a large multisite network from wpengine to a Rackspace VPS. The original multisite was created pre-3.5. We are unable to import media files through WordPress Import using XML and are also unable to view media files in the library that we’ve uploaded via FTP. We believe part of this is related to the change from the /blogs.dir folder to the /uploads folder. We’ve been searching for solutions but most refer to changing the .htaccess file which doesn’t apply and “rewrites” in the nginx .conf files but we get errors when placing them in our .conf files under “sites-enabled”.

    Would greatly appreciate any incite or solutions others have found.

Viewing 4 replies - 1 through 4 (of 4 total)
  • HuddersfieldH

    (@huddersfield-hosting)

    The best way is to move media via FTP, then run the importer, but select import media – you’ll get told that they already exist, but they should now appear in the media library. If not change the links in the database.

    Also, wouldn’t it be easier to just move the entire network? (Providing domain stays same)

    Thread Starter loafintree

    (@loafintree)

    We did move the whole network but we were on WPengine before and we had no access to their proprietary network setup. We’ve built a VPS with help from Rackspace but we think there must be a configuration error somewhere. After two of us spending a day or two on the regex in the site.conf files, we’re pretty certain they’re correct and it must be something else. Here’s what we have on one network.

    http://pastebin.com/K0fC2Le8

    Thread Starter loafintree

    (@loafintree)

    I believe I found the problem. After a lot of editing of the conf files, I noticed that the lines:

    location ~ ^(/[^/]+/)?files/(.+) {
    try_files /wp-content/blogs.dir/$blogid/files/$2 /wp-includes/ms-files.php?file=$2 ;
    access_log off; log_not_found off; expires max;

    was farther down the file than other examples. I moved it to the same position as other examples and all images appeared as they should. A whole day of debug to find that. Simple little things…

    Final

    root /var/www/sitename/htdocs;
    index index.php index.html;
    
    location ~ ^(/[^/]+/)?files/(.+) {
    try_files /wp-content/blogs.dir/$blogid/files/$2 /wp-includes/ms-files.php?file=$2 ;
    access_log off; log_not_found off; expires max;
    Thread Starter loafintree

    (@loafintree)

    Another contributing factor (or possibly the solution) was adding the following line in the multisite section of the wp-config.php file:

    $base = '/';

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Media library problems with nginx and multisite migration’ is closed to new replies.