Support » Networking WordPress » Multisite trouble with os upgrade

  • Resolved pferrel

    (@pferrel)



    I upgraded ubuntu 12.04 to 14.04, which upgraded apache 2.2 to 2.4. I had to do a lot of messing with permissions to get other sites working (RoR and Owncloud).

    My WordPress Multisite config was set up to use subfolders. I can see the admin pages for the sites but can’t go to mydomain.com/blogdir. I get a “Not Found”.

    I have mod rewrite enabled and the following in my .htaccess notice that I tried to update the rewrite rules with an answer from another topic. Any ideas?

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ wp/$1 [L]
    RewriteRule . index.php [L]
    
    # pat: older rules, trying the above
    #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]
Viewing 7 replies - 1 through 7 (of 7 total)
  • Found to “official” .htaccess was below but still get a not found for mydomain.com/blogdir

    Switched to:

    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]

    Mostly working now. One thing missing from the new Apache 2.4 virtualhost config helped

    <Directory /path/to/docroot/>
            allow from all  #had this
            Require all granted #had this
            AllowOverride All # <===== added this to get most running
        </Directory>

    Now everything except self-hosted images from uploads works. They have a URL like:
    http://mydomain.com/blogdir/files/2014/09/Guide-2014-09-03-08-43-43-2014-09-03-08-44-54-1024×565.png

    But the images don’t load. My media lib has placeholders but show the missing image icon.

    IMO, your trouble is due to Apache configuration file being reset and not due to OS being upgraded.

    What do you mean by self-hosted images? Did you look in the WP folder where the image is supposed to be? Is the image there? If so, then that means you are missing an Apache httpd configuration.

    By self-hosted I mean they were uploaded to the blogs so yes they are all there in the filesystem. I am quite sure you are right that it’s an Apache config issue but happened in the upgrade. Anyway, there a few tutorials for troubleshooting that I haven’t already looked at so any clue to help track this down would be appreciated.

    If anyone has done an Apache 2.2 to 2.4 upgrade maybe they’ve seen something like this?

    Your url image link seems off. I pulled one link from our system. It looks like this (two different urls for the same file):
    http://news.usc.edu/wp-content/blogs.dir/59/files/2014/08/Newal-Osman-300×200.jpg
    http://news.usc.edu/files/2014/08/Newal-Osman-300×200.jpg

    If you uploaded the folders manually, you may have put them in the wrong location. For example your url contains ‘blogsdir’ without the dot in the middle and it is missing ‘wp-content’

    Aha, fixed. For some reason the old .htaccess was best

    ## uploaded files
    #RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    When I found the images, I saw that the line was pointing to where each blog’s images were. So this may be an artifact of a very old starting point for the Blogs–around 2009. They have undergone many updates and even a conversion to multisite.

    The old ,htaccess was correct (mostly)

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Plugin Review Team Rep

    Just to explain what happened, if your WP install PREDATES WP 3.9, then you used /files/ for your images.

    Anything after does not because /files/ is a janky pile of emojji.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Multisite trouble with os upgrade’ is closed to new replies.