WordPress.org

Forums

Add Clone Sites for WPMU (batch)
images aren´t cloning (5 posts)

  1. jcpcosta
    Member
    Posted 2 years ago #

    Hi there!

    When building my model-site which I want to clone, I saved all pictures in media library in order to have them available when cloning. Happens that cloning went ok with no errors but images aren't in the new site... can you tell me what could possibly be done?? Thank you!

    http://wordpress.org/extend/plugins/add-cloned-sites-for-wpmu-batch/

  2. asdflol
    Member
    Posted 2 years ago #

    ^ Same here. Images are not copied.

  3. canheread7
    Member
    Posted 2 years ago #

    ^The same thing is happening on my end. I'm not sure this is important but I'm on a sub Directory Network running 3.5

  4. Septyaman
    Member
    Posted 2 years ago #

    I ask sir, Is the mu does work? so iam wan to instaling to my Tips sahabat

  5. vincegx
    Member
    Posted 2 years ago #

    Hi,

    The plugin is not fully compatible with wordpress 3.5 because uploads directory are complety different in wordpress < 3.5 .

    In wordpress < 3.5, wordpress use wp-content/blog.dir/files directory while wordpress > 3.5 use wp-content/blog.dir/files

    In the case of wordpress MU, wordpress separate blog folder into wp-content/uploads/sites

    So i replace some hook to have FULLY compatible with wordpress 3.5 and older version

    Just Edit magic-add-cloned-sites.php and changes :

    1/ line 196

    Change line

    $fileupload_url = $full_url . "/files";

    TO

    /// Hook - Test if wordpress version is < 3.5  -- blog.dir upload different - VinceGx 
    
    if ( get_bloginfo('version') >= 3.5 ):
    	$fileupload_url = $full_url . "/";
    elseif ( get_bloginfo('version') < 3.5 ):
    	 $fileupload_url = $full_url . "/files";
    endif;

    2/ line 254 / 255

    Change line

    $dir_to_copy = ABSPATH . 'wp-content/blogs.dir/' . $template_id . '/files';
    $dir_to_copy_into = ABSPATH .'wp-content/blogs.dir/' . $new_blog_id . '/files';

    TO

    /// Hook - Test if wordpress version is < 3.5  -- blog.dir upload different - VinceGx 
    
    if ( get_bloginfo('version') >= 3.5 ):
    			$dir_to_copy = ABSPATH . 'wp-content/uploads/sites/' . $template_id;
    			$dir_to_copy_into = ABSPATH .'wp-content/uploads/sites/' . $new_blog_id;
    elseif ( get_bloginfo('version') < 3.5 ):
    		     $dir_to_copy = ABSPATH . 'wp-content/blogs.dir/' . $template_id . '/files';
    		     $dir_to_copy_into = ABSPATH .'wp-content/blogs.dir/' . $new_blog_id . '/files';
    endif;

    1/ line 205

    Change line

    update_blog_option ($new_blog_id, 'upload_path', 'wp-content/blogs.dir/' . $new_blog_id . '/files');

    TO

    /// Hook - Test if wordpress version is < 3.5  -- blog.dir upload different - VinceGx 
    
    if ( get_bloginfo('version') < 3.5 ):
    		     update_blog_option ($new_blog_id, 'upload_path', 'wp-content/blogs.dir/' . $new_blog_id . '/files');
    endif;

    That's it!

    And normally when you copy any blog , folder are created into wp-content/uploads/sites/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Add Clone Sites for WPMU (batch)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.