• I am using one folder for all blog uploads by following code :

    add_filter('upload_dir', 'fix_my_upload_dir');
    
    function fix_my_upload_dir($uploads) {
        $uploads['basedir'] = '/home/example/www/wp-content/uploads/';
        $uploads['baseurl'] = 'https://www.example.com/wp-content/uploads/';
    
        $uploads['path'] = $uploads['basedir'] . $uploads['subdir'];
        $uploads['url'] = $uploads['baseurl'] . $uploads['subdir'];
    
        return $uploads;
    }

    When I delete sub domain from my network through network admin images disappear from all sub domains as well as main blog. And when I look to uploads folder there is no folder left.

    Please let me know where i am wrong ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Harjeevan Singh

    (@hstanda)

    here is .htaccess file code :

    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]
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Uh… cause you told it to.

    I am using one folder for all blog uploads by following code :

    When the site deletes, it cleans up the uploads to save you space on the server. Since everyone uses the same space…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Upload folder disappear while deleting sub doamin’ is closed to new replies.