• I’m migrating a multisite WP install to a new server (to hostgator).

    It looks like the trouble I’m having has been fairly common, but I did not see anything that seems to help in this situation.

    Basically, on the sub-sites the images do not load. I can upload an image and it goes into the correct folder and thumbnails are made, but wordpress cannot find the image to display it. I can go into the Media Library and the thumbnails and images do not show up there. If I click on an image and then click on the Edit Image button, then the picture will load, but it only shows in the Edit Media window.

    I have regenerated thumbnails.

    I have reset the permalink settings.

    I’ve tried a few .htaccess variants.

    Images do show up in the main site, but not the sub-sites (sub folder) (I checked more than one sub-site)

    The direct path works…
    https://icmoly.[website].com/wp-content/blogs.dir/2/files/2015/03/%5Bfile%5D.png
    The link path does not…
    https://icmoly.[website].com/%5Bsub-site%5D/files/2015/03/%5Bfile%5D.png

    My current (and last) .htaccess settings are:

    ## BEGIN Stock WordPress Multisite
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    
    #
    
    ### BEGIN WordPress (from https://www.ads-software.com/support/topic/fresh-install-subfolder-multisite-infinite-redirect-loop-sub-blog-login)
    #RewriteEngine On
    #RewriteBase /
    #RewriteRule ^index\.php$ - [L]
    ## uploaded ?les
    #RewriteRule ^([_0-9a-zA-Z-]+/)??les/(.+) wp-includes/ms-?les.php??le=$2 [L]
    ## add a trailing slash to /wp-admin
    #RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    #RewriteCond %{REQUEST_FILENAME} -f [OR]
    #RewriteCond %{REQUEST_FILENAME} -d
    #RewriteRule ^ - [L]
    #RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    #RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    #RewriteRule . index.php [L]
    ### End WordPress
    
    # Use PHP53 as default
    AddHandler application/x-httpd-php53 .php
    
    ## BEGIN custom php

    Thank you,
    Dana

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    That whole section you commented out is the right .htaccess.

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress
    Thread Starter teamicm

    (@teamicm)

    Thanks for responding. I appreciate it.

    Yes, but that whole section is commented out because I tried it and it didn’t work for me. ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Doesn’t make it wrong. I promise you, the one you are using will never work ??

    1) Change the .htaccess back

    2) Ask Hostgator if your new server has the httpd.conf directives that allow Multisite’s .htaccess rules? They SHOULD know what that means, but point ’em to this in case: https://codex.www.ads-software.com/Multisite_Network_Administration#Apache_Virtual_Hosts_and_Mod_Rewrite

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Images missing on multisite subsites’ is closed to new replies.