WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress Multisite Broken Images (6 posts)

  1. Jason
    Member
    Posted 11 months ago #

    Hello, I've got a problem with one of my clients sites on a WP Multisite. After uploading images to sub-sites the image is broken, however I can see that it's uploaded to the server if I check via FTP. Any ideas on how to fix the broken images?

    Some helpful specs to help troubleshoot:

    .htaccess file:

    # 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).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    # END WordPress

    Located in wp-config.php:
    define( 'UPLOADS', ''.'media' );

    also:

    /** Enable Multi-Site options in WordPress. */
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'mysite.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    Main site images: http://www.mysite.com/media/imagehere.jpg
    Sub site images: http://www.mysite.com/media/sites/2/2013/05/imagehere.jpg

    Let me know if you have other questions that I can help, but I can't figure this one out. Thanks for your help in advance.

  2. Main site images: http://www.mysite.com/media/imagehere.jpg
    Sub site images: http://www.mysite.com/media/sites/2/2013/05/imagehere.jpg

    Did you move the media folder from wp-contents/uploads? And if so, how?

  3. Jason
    Member
    Posted 11 months ago #

    Added this to the wp-config.php file:

    define( 'UPLOADS', ''.'media' );

  4. Jason
    Member
    Posted 11 months ago #

    More info: I had the /media folder specified pre-WP 3.5 when it was available to set in the settings > Media (before I converting the site to a multisite). Then when I converted it to multisite added that line to the wp-config.

  5. Jason
    Member
    Posted 11 months ago #

    Even when I remove the
    define( 'UPLOADS', ''.'media' );
    it still goes to the media folder (probably from the setting I had prior to 3.5 update.) I've checked everything and can't figure out why?

  6. Jason
    Member
    Posted 11 months ago #

    RESOLVED!!!

    My host provider (StormOnDemand) helped me figure it out. If anyone out there has an issue like this, here is how to solve it.

    1) Go you your "Sites" section in the network admin
    2) Click the "edit" button on the child site that the images aren't working
    3) Click the "Settings" tab and scroll down till you find "Upload Url Path"
    4) Make sure the URL is pointing to your upload location http://yoursite.com/uploadfolder
    5) Done

    Hope this helps someone in the future, as it cost me hours of troubleshooting. ;-)

Reply

You must log in to post.

About this Topic

Tags

No tags yet.