WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Image Upload Issue on Sub-directory Sites (30 posts)

  1. kb123
    Member
    Posted 7 months ago #

    WordPress 3.8, Multisite installed thru godaddy. Sunrise.php moved to correct location, all files edited as need be.

    This is not my 1st use of WordPress Multisite, I have researched this issue, and see people with the same issues, but still cannot seem to correct this on my own.

    Main-Site: scrapmetalalloytester.com
    Sub-Site (Domain Mapped): innoifs-10.com

    I cannot upload any images to my sub-site. They just show up as a greyed out box in my media library.

    I currently have this in my htaccess:

    <IfModule mod_rewrite.c>
    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]
    
    </IfModule>

    For the site setting, 'wp-content/blogs.dir/4/files' is what it is currently set as by default.

    Here is a page where an image should be: http://innoifs-10.com/?attachment_id=11

    I verified thru ftp that the image is there '/wp-content/blogs.dir/4/files/2013/12' and all permissions are fine.

    Any help is appreciated.

    Thanks,
    Ken

  2. kb123
    Member
    Posted 7 months ago #

    Upload path for main site: /home/xxxxx/public_html/wp-content/uploads
    Upload Path for sub-site: wp-content/blogs.dir/4/files

  3. kb123
    Member
    Posted 7 months ago #

    I have checked my other multisite install's upload path which is hosted on a different server.

    The main and subsites both have the same upload path, which is the same as my main site in question above. /home/xxxxx/public_html/wp-content/uploads

    I changed the subsited upload path above to be the same as the main, but am still having the same issue :(

    Ken

  4. The main and subsites both have the same upload path, which is the same as my main site in question above. /home/xxxxx/public_html/wp-content/uploads

    Well that isn't right.

    Upload path for subsitess should be /home/xxxxx/public_html/wp-content/uploads/sites/4/ OR wp-content/blogs.dir/4/files

    The first one (uploads/sites/) is for all networks created on WP 3.4 or older. The second one (blogs.dir) is for any network started on 3.5 or later.

    So for that your .htaccess should be this:

    # 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
  5. kb123
    Member
    Posted 7 months ago #

    Hi Mika,

    I changed .htaccess to what you posted above. Still no change. And Upload path remained the same for the subsite. wp-content/blogs.dir/4/files

    Thanks,
    Ken

  6. I just want to doublecheck something...

    SOME sites have upload paths of /wp-content/uploads/sites/#/...

    OTHERS (or one other) has /wp-content/blogs.dir/4/files

    Have you tried changing the theme on the site #4?

  7. kb123
    Member
    Posted 7 months ago #

    Hi Mika,

    I just tried changing site 4 to the twenty fourteen theme (From Vantage), it had no effect. Images still do not display properly, upload path stayed the same.

    As stated, My main site (WP 3.8) where Multisite is installed has a upload path of '/public_html/wp-content/uploads'

    The sub site has one of 'wp-content/blogs.dir/4/files'

    My other Multisite installation which is being ran on a different server is being run on WP 3.7 also using the Vantage theme, and has upload paths of '/public_html/wp-content/uploads' for both main and subsites (and works fine).

    Thanks,
    Ken

  8. The sub site has one of 'wp-content/blogs.dir/4/files'

    That path is NOT WRONG in most cases.

    How many sites on the broken network do you have? Is this site the ONLY subsite? I'm asking for a reason :) This will help me understand where the thing broke!

    My other Multisite installation which is being ran on a different server is being run on WP 3.7 also using the Vantage theme, and has upload paths of '/public_html/wp-content/uploads' for both main and subsites (and works fine).

    I betcha not. I bet that your subsites are ACTUALLY putting files in /public_html/wp-content/uploads/sites/2/

  9. kb123
    Member
    Posted 7 months ago #

    Is this site the ONLY subsite? I'm asking for a reason :) This will help me understand where the thing broke!

    Yes, I didn't want to add any more subsites until I had this figured out.

    I betcha not. I bet that your subsites are ACTUALLY putting files in /public_html/wp-content/uploads/sites/2/

    You may be correct, I'm just telling you what is showed when viewing the settings for the pages though ;)

    Ken

  10. So to explain some history for you, if your multisite was activated on 3.0 through 3.4, the URLs for subsites would be wp-content/blogs.dir/#/files and the settings would reflect that exactly.

    If your multisite was activated AFTER (so 3.5 and up), you get /public_html/wp-content/uploads/sites/2/ but the settings say /public_html/wp-content/uploads/

    If you upgraded a multisite from 3.4 to 3.5, however, your urls were not magically changed.

    All this means? Your server doesn't understand this line:

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

    You need to check the httpd.conf file and make sure that "AllowOverride" is set to "All" or "Options All"

  11. kb123
    Member
    Posted 7 months ago #

    So to explain some history for you, if your multisite was activated on 3.0 through 3.4, the URLs for subsites would be wp-content/blogs.dir/#/files and the settings would reflect that exactly.

    If your multisite was activated AFTER (so 3.5 and up), you get /public_html/wp-content/uploads/sites/2/ but the settings say /public_html/wp-content/uploads/

    If you upgraded a multisite from 3.4 to 3.5, however, your urls were not magically changed.

    Both installs were fresh. One from 3.7 one from 3.8. No upgrading done. :)

    You need to check the httpd.conf file and make sure that "AllowOverride" is set to "All" or "Options All"

    Cool, where do I find this file though?

    From the godaddy forums:

    You cannot edit the httpd.conf file on our web hosting plans. However, most changes can be done using a .htaccess file in the directory you want to the changes to take effect in.

    Thanks So Much,
    Ken

  12. GoDaddy? You are now the SECOND person who has had this problem with GoDaddy. Did you happen to use their one-click magic installer?

    If there's nothing to lose, I would start over and MANUALLY install WordPress.

  13. kb123
    Member
    Posted 7 months ago #

    GoDaddy? You are now the SECOND person who has had this problem with GoDaddy. Did you happen to use their one-click magic installer?

    Yes I did. And now that I think about it. When I did my install on the other server, I setup Multisite manually. Godaddy has an option to auto-setup MU for you, which I used. So maybe something happened there.

    If there's nothing to lose, I would start over and MANUALLY install WordPress.

    Thanks for trying.

    Ken

  14. I'm starting to think that GoDaddy's auto-setup of MU is janking you guys badly :( I'm tagging this for their support rep to look into.

    Summary: When people are using the GoDaddy WPMU install, it's causing their image upload directories to reflect the OLD directory structure for images instead of the new /wp-content/uploads one!

  15. Eric A. Silva
    Member
    Posted 7 months ago #

    Hello All,

    Just want to put out there that I am yet another GoDaddy customer who tried the one-click installer with the MU setup and mine does the same thing. It was a fresh install also.

    kb123, Did re-installing it manually fix the problem?

    Thanks,
    Eric

  16. kb123
    Member
    Posted 7 months ago #

    Hi Eric,

    I haven't done it yet. But as stated, in my previous installation. I did install WordPress via Godaddy, and manually setup MU,and had no issues. So I suspect you should be fine.

    Ken

  17. Sonoffa.... Okay, I'm pinging GD directly.

  18. GeekStreetWP
    Member
    Posted 7 months ago #

    Can you create your own install, without using their set up, and see if it's working correctly?

    I'm sure you have thought of this, but is a wildcard domain setup on your hosting? On a regular shared server provided by GoDaddy, it was to my knowledge, that you can't work with sub-domain's on WP without an individual IP. If that's not the case anymore, I'd install WordPress myself with out using any of their help and go from there.

  19. The manual installs seem to be working just fine. This is (apparently) limited to GoDaddy's 'click to install WP!' for Multisite. Which I have no familiarity with.

  20. GeekStreetWP
    Member
    Posted 7 months ago #

    I would definitely stick to doing the work manually for now. The only multisite install that work 100% for sure, to my knowledge, is on WPENGINE.

    Generally, when I am going to do domain mapping, I'll set it up on something like Media Temple (<- Purchased by GoDaddy). I've never had problems there.

  21. Someone informed me there's an 'extra' .htaccess in your wp-includes? If someone on GoDaddy with this problem can check, please report back and let us know what's in it :)

    GeekStreetWP - We try really hard to avoid hosting recommendations here. Please keep the sales pitches out of your posts. You'll notice I'm not naming where I host WP (and by the way, have no problems). :) Be cool.

  22. bgabler
    GoDaddy Support Rep
    Posted 7 months ago #

    Hi,

    I apologize for the inconvenience. We are currently working with Installatron (our auto installer) to get this fixed.

    They are usually pretty quick so I would expect this to be fixed within the next few hours and pushed out within the next 24 hours.

    In the mean time if you need any assistance manually installing multi-site please do not hesitate to ask and I'll make sure we get it taken care of.

    Thank you for your patience and understanding.

    --
    Ben Gabler
    Senior Product Manager, Hosting @ Go Daddy

  23. Eric A. Silva
    Member
    Posted 7 months ago #

    They are usually pretty quick so I would expect this to be fixed within the next few hours and pushed out within the next 24 hours.

    Hi Ben, Thanks for your response and reassuring us that GoDaddy is working to resolve this issue. Will the update be automatically pushed to our WP Sites or is there something that we will have to do on our end?

    Someone informed me there's an 'extra' .htaccess in your wp-includes? If someone on GoDaddy with this problem can check, please report back and let us know what's in it :)

    This is what the .htaccess says in 'wp-includes'

    <Files *.php>
    deny from all
    </Files>
    <Files wp-tinymce.php>
    allow from all
    </Files>
  24. bgabler
    GoDaddy Support Rep
    Posted 7 months ago #

    Eric,

    You're very welcome.

    The .htaccess file in the wp-includes folder does contain

    <Files *.php>
    deny from all
    </Files>
    <Files wp-tinymce.php>
    allow from all
    </Files>

    We have already heard back from Installatron and they are currently working on a fix which has been promised to us by end of day. As soon as it's available we'll make sure we update all of our servers right away.

    As for existing installs I'm not too sure as I believe the wordpress version itself will be the same so an auto-update will not occur. However, we will get the details on the fix and pass them along so existing customers that need Multi-site can be fixed.

    Thanks!

    --
    Ben Gabler
    Senior Product Manager, Hosting @ Go Daddy

  25. ghmichael
    Member
    Posted 7 months ago #

    Ben,

    I have been having the same issue since the beginning of December. I already had a hosting account with Godaddy and set up a new one good for 3 years just to be able to set up Mult-site with WordPress. I have not been able to load images to the subdomains --the main account works fine--this is the same issue that is being discussed all through this thread.

    During several calls with Godaddy I have not been able to get this resolved--they have gone so far as to tell me they don't offer support for Multi-site installations. Why offer Multi-site if you aren't going to offer support for it? And with all the support techs you have I find it hard to believe (or I did before I experienced it) that none of them know how to successfully set up Multi-site.

    I have spent the last 2 WEEKS trying to get this to work. AND THE LAST 3 days looking at other hosting companies. While I was happy with Godaddy why do I need two hosting accounts at a company that I can't run Multi-site on?

    What I do want to be able to do is to set up a new subdomain on Multi-site and create a website and then move it to its OWN domain after it is finished and approved. This will involve mapping to the new domain--is there a plugin that will do the re-mapping? Once I move the subdomain to its new domain do I have to install all the plugins that were part of the parent domain?

    I don't really want to switch hosting companies, so please tell me how to get Mult-site working on Godaddy. BTW a VIDEO or two on some of these type topics might save a few tech support calls and also lower the frustration of some of us trying to figure out how to do these things.

  26. bgabler
    GoDaddy Support Rep
    Posted 7 months ago #

    Hi,

    I apologize for the delay.

    This has been tracked down to extra security hardening we're doing as
    recommended by Sucuri. This issue affects multisite-enabled installs
    that have two or more sites (the 'main' site isn't affected). It looks
    like this issue has been present for new installs only since the 3.8
    release. Any installs made on previous versions aren't affected
    (whether or not they've updated to 3.8).

    We've updated our WP package to include the fixed
    wp-includes/.htaccess for all new installs and all future upgrades.
    Any upgrades to 3.8 or 3.8.1 in the future will get the fix. The
    updated WP package is live at this time so the next automatic or
    forced Installatron Update will instate it.

    To fix an affected install right now, simply append these lines to
    wp-includes/.htaccess

    <Files ms-files.php>
    allow from all
    </Files>

    Alternatively, the whole .htaccess file at wp-includes/.htaccess could
    be deleted as it's only there to handle Sucuri's hardening
    recommendations.

  27. bgabler
    GoDaddy Support Rep
    Posted 7 months ago #

    I sincerely apologize for the inconvenience this caused you.

    Is there an email address I can reach you at? I can apply these changes for you so we can get your install up and running properly.

  28. ghmichael
    Member
    Posted 6 months ago #

    FIXED!

    Thank you BGABLER at GODADDY.

    I added the 3 lines of code per bgabler (see the post 2 before this one)
    and MAGICALLY those grey thumbnails turned into the pictures they were supposed to be.

    Below is the pertinent part of the fix. Note the code is being added to the htaccess file in the FOLDER marked WP-INCLUDES.

    ----HERE IS THE FIX PER BGABLER----
    To fix an affected install right now, simply append these lines to
    wp-includes/.htaccess

    <Files ms-files.php>
    allow from all
    </Files>

    I did the above and not only did it fix the problem but the pictures that had been uploaded previously and were showing as grey thumbnails magically turned into real live pictures. Hooray.
    Note: I am using Godaddy for hosting and I think this problem was related to their security blocking the subdomain pix from showing correctly. Adding the code "allows" them to be seen.

  29. You would be correct that something 'security' was blocking MS files. So that's ... got to be fixed in their setup.

    Mind you? You shouldn't be calling ms-files at all with a NEW install of Multisite!

    No, really. If you do it by hand, that file doesn't get use since Wp 3.5!

    Something's wrong in their installer :/

  30. iiidasiii
    Member
    Posted 6 months ago #

    i purchased hosting through blue host
    - then i purchased a bunch of domains through host gator
    - then added them to my blue host as an add on domains
    - then installed wordpress on my main domain which was given to me when i purchased hosting through blue host ..
    - then i found out about multisite and installed it on my existing wordpress install
    - wordpress looks okay ceppt when i go to make a new page it shows as it cant find it ..
    - and its the same problem with the custom domains ..

    please help im new to this .. im sure i skipped a stepped or messed something up cant seem to find where i went wrong .. did i place blog.dr wrong or create a wrong cname ? those are to things i didnt understand while i was doing them .

Reply

You must log in to post.

About this Topic