WordPress Multisite childsite image upload path incorrect

after banging my head against this for many hours, i thought i would try to explain things on here to try and find anyone that might of encountered the same behavior

i am running multisite with one parent site, and one child site, the parent site is working fine, but…

after updating my wordpress multisite to 4.7.3 my child site has “lost” all of its images, on closer inspection the images havnt been lost, they are being uploaded to a different part of the server, however, the image upload path seems to be using the “old” path, for example, if i upload image1.jpg it gets uploaded to:

http://my-url.com/wp-content/blogs.dir/7/files/2017/04/image1.jpg

however, on the media page(and front end of the site), the image is displaying as a broken image, the image path is:

http://my-url.com/wp-content/uploads/sites/7/files/2017/04/image1.jpg

i have tried changing the upload path in the network admin settings for the site here:

/wp-admin/network/site-settings.php?id=7

i have changed the upload path to /wp-content/uploads/sites/7 to no avail

my multisite root .htaccess file looks like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
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]
</IfModule>
# END WordPress

and the editable part of my wp-config.php looks like this:

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
 /** no auto update */
define( 'WP_AUTO_UPDATE_CORE', false );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', '**hidden-for-privacy**.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define( 'SUNRISE', 'on' );

define('CONCATENATE_SCRIPTS', false ); // 
//define('COOKIE_DOMAIN', $_SERVER[ 'HTTP_HOST' ] );
/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
define('WP_DEBUG', false);
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

i am running no plugins and using the twentyseventeen theme (to avoid any conflicts associated with that!)

so has anyone else encountered this? if so how did you fix it? im literally pulling my hair out looking for a needle in a haystack, any help/advice would be greatly appreciated

thanks in advance

Tommy

Read more here: WordPress Multisite childsite image upload path incorrect

Leave a Reply

Your email address will not be published. Required fields are marked *