Title: MultiSite Clone Duplicator
Author: Globalis
Published: <strong>1. awgusta 2014</strong>
Last modified: 29. nowembra 2018

---

Tykače pytać

![](https://ps.w.org/multisite-clone-duplicator/assets/banner-772x250.jpg?rev=1011466)

Tutón tykač **njeje so z najnowšimi 3 hłownymi wersijemi WordPress testował**. Snano
so hižo njewothladuje abo njepodpěruje a ma problemy z kompatibelnosću, hdyž so 
z nowšimi wersijemi WordPress wužiwa.

![](https://ps.w.org/multisite-clone-duplicator/assets/icon-256x256.png?rev=1011466)

# MultiSite Clone Duplicator

 Wot [Globalis](https://profiles.wordpress.org/globalis/)

[Sćahnyć](https://downloads.wordpress.org/plugin/multisite-clone-duplicator.1.5.3.zip)

 * [Podrobnosće](https://hsb.wordpress.org/plugins/multisite-clone-duplicator/#description)
 * [Pohódnoćenja](https://hsb.wordpress.org/plugins/multisite-clone-duplicator/#reviews)
 *  [Instalacija](https://hsb.wordpress.org/plugins/multisite-clone-duplicator/#installation)
 * [Wuwiće](https://hsb.wordpress.org/plugins/multisite-clone-duplicator/#developers)

 [Podpěra](https://wordpress.org/support/plugin/multisite-clone-duplicator/)

## Wopisanje

MultiSite Clone Duplicator adds a „Duplicate Site“ functionality to your network
installation.

It allows you to clone any site of your network into a new one : all data, files,
users and roles can be copied.

It is useful when you want to create multiple sites from the same template : Don’t
waste your time copying the same configuration again and again !

Simple and user-friendly, this plugin extends WordPress core network’s functionalities
without polluting the dashboard.

WARNING : If you clone the primary site, you must use `mucd_default_primary_tables_to_copy`
filter to declare plugins and custom database tables, or your cloned site won’t 
be complete

#### Features:

 * Clones any site of your wordpress multisite installation
 * Copies all posts and settings
 * Generates log files (if option is checked)
 * Copy all files from duplicated site (if option is checked)
 * Keep users and roles from duplicated site (if option is checked)
 * Configure which site is clonable (so you can define an unique „pattern“ site)
 * Fully hookable
 * Command line ready (provides a WP-CLI subcommand)

### Hooks

#### Action : mucd_before_copy_files / mucd_after_copy_files

Action before / after copying files
 **Args :**

 1. Int : from_site_id
 2. Int : to_site_id

#### Action : mucd_before_copy_data / mucd_after_copy_data

Action before / after copying data
 **Args :**

 1. Int : from_site_id
 2. Int : to_site_id

#### Action : mucd_before_copy_users / mucd_after_copy_users

Action before / after copying users
 **Args :**

 1. Int : from_site_id
 2. Int : to_site_id

#### Filter : mucd_copy_blog_data_saved_options

Filter options that should be preserved in the new blog (original values from created
blog will not be erased by copy of old site’s tables)
 **Args :**

 1. Array of string : option_name

#### Filter : mucd_default_fields_to_update

Filter fields to scan for an update after data copy
 **Args :**

 1. Array of ( ‚table_name‘ => array(‚field_1‘, ‚field_2‘ …));

#### Filter : mucd_default_primary_tables_to_copy

Filter tables to duplicate when duplicated site is primary site
 **Args :**

 1. Array of string table_name

#### Filter : mucd_copy_dirs

Filter directories and files you want to copy
 **Args :**

 1. Array of string : dirs
 2. Int : from_site_id
 3. Int : to_site_id

#### Filter : mucd_string_to_replace

Filter which strings we want to replace during update
 **Args :**

 1. String : string_to_replace
 2. Int : from_site_id
 3. Int : to_site_id

### WP-CLI arguments

Arguments are :

    ```
    wp site duplicate --slug=<slug> --source=<site_id> [--title=<title>]
      [--email=<email>] [--network_id=<network-id>] [--private] [--porcelain] [--v]
      [--do_not_copy_files] [--keep_users] [--log=<dir_path>]<h3>Thank’s</h3>
    ```

The original version of this plugin has been developed by [Julien OGER](https://github.com/julienOG)
who keeps following the project carefully.

Some code for search and replace in SQL serialised data were initialy taken from
[Lionel Pointet WordPress Migration tool](https://github.com/lpointet/wordpress_migration)

## Fota wobrazowki

 * [[
 * **Basic features**
 * [[
 * **Advanced features**
 * [[
 * **Settings**
 * [[
 * **Successfull duplication**
 * [[
 * **Log warning**

## Instalacija

You can install MultiSite Clone Duplicator using the built in WordPress plugin installer.
It’s easy, 2 seconds.

If you prefer download MultiSite Clone Duplicator manually :

 1. Upload multisite-clone-duplicator/ to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‚Plugins‘ menu in WordPress
 3. (Optional) Chmod 777 the logs/ directory of the plugin, if you want to activate
    logs
 4. Go to My Sites > Network Admin > Duplication and enjoy !
 5. (Optional) Change default options into Network dashboard > Network settings > Duplication

In the future, you’ll probably want to create a dedicated „template“ blog to clone
from.

## HSP

  How does it work ?

 * It creates a new user if the email was not an existing email
 * It creates a new blog with appropriate title and admin user
 * It copies all tables from cloned site, but keep some options (like title, domain,
   etc) of the new blog
 * It searches and replaces old site’s URL and DOMAINS with the new ones
 * It copies upload directory from the old site to the upload directory of the new
   one (if option is checked)
 * It imports users and roles from the old site to the new one (if option is checked)

  Does it support subdirectory AND subdomain installations ?

Yes, it supports both !

  Can I clone the primary site ?

Yes you can, but you want to be careful : WordPress saves network tables and primary
blog tables with the same prefix, and some of their data are mixed. It forces us
to restrict primary blog cloning to copy only the default wp tables. If you want
to change this (for example, include your plugin tables in the cloning), use mucd_default_primary_tables_to_copy
filter. In the future, you want probably not to copy again and again the primary
blog : use a „template“ blog dedicated to clonage instead.

  Does it clone plugins settings ?

Yes it does !

  But some data are serialized ?

It’s not a problem ! Serialized data are understood by the plugin, recursively unserialized,
replaced with appropriate values, and serialized again.

  After cloning, new site was created, but it goes on 404 page, why ?

Check your host / server configuration : you probably cloned your site into a domain
that is not available !

  How to duplicate with command line commands ?

Install [WP-CLI](http://wp-cli.org/), go to your wordpress multisite directory, 
and type `wp-cli site duplicate --source=<id_of_the_site_to_clone> --slug="<slug_of_the_new_site
>"`

Arguments are : `wp site duplicate --slug=<slug> --source=<site_id> [--title=<title
>]
 [--email=<email>] [--network_id=<network-id>] [--private] [--porcelain] [--v][--
do_not_copy_files] [--keep_users] [--log=<dir_path>]

  Which languages are currently supported?

As of now, following languages are supported : English (en_US), French (fr_FR), 
Spanish (es_ES), Lithuanian (lt_LT) and Greek (el). If you wish to, you can translate
the interface in your own language in the [standard WordPress way](https://codex.wordpress.org/Translating_WordPress)
or with [Transifex](https://www.transifex.com/projects/p/multisite-clone-duplicator/)

  GLOBALIS what ?

[Globalis media systems](http://www.globalis-ms.com/) is a web IT consulting company
based in Paris, and a pioneer of the PHP and LAMP platform. Since 1997, we have 
been designing, making and maintaining Internet, intranet or mobile software. We
have been working with open source CMS since 2000 and have regularly been using 
WordPress since 2007.

## Pohódnoćenja

![](https://secure.gravatar.com/avatar/6782efc34064425c148ef7f5fffdba5a19de8609d6bdf51400f7ac3957db7e8b?
s=60&d=retro&r=g)

### 󠀁[Fantastic plugin](https://wordpress.org/support/topic/fantastic-plugin-1616/)󠁿

 [unapersona](https://profiles.wordpress.org/unapersona/) 9. julija 2021

A must-have when working with multiple sites.

![](https://secure.gravatar.com/avatar/29d7f082fa5fb69cc5c6177ba4aa3b23fae4f7bbf9befe8c1d0f6663fbe6db36?
s=60&d=retro&r=g)

### 󠀁[Plugin no longer maintained, no support](https://wordpress.org/support/topic/plugin-no-longer-maintained-no-support/)󠁿

 [Ronaldt](https://profiles.wordpress.org/neejoh/) 5. julija 2021

This plugin has not been maintained for a very long time. It is not compatible with
new versions of PHP (7.4+) and there have not been answers in the support sections
for over 2 years.

![](https://secure.gravatar.com/avatar/23f47353269ac7716695a9f4820aade8412a9eed7940a77c56a7124f176f7ab7?
s=60&d=retro&r=g)

### 󠀁[Плагин отличный!](https://wordpress.org/support/topic/%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd-%d0%be%d1%82%d0%bb%d0%b8%d1%87%d0%bd%d1%8b%d0%b9-10/)󠁿

 [dreams911](https://profiles.wordpress.org/dreams911/) 3. nowembra 2020

Плагин работает отлично – теперь нет проблемы с быстрым размножением удачных лендингов!

![](https://secure.gravatar.com/avatar/379bf20a18c736fa3ab686d6c75b280bf27d508b29ab694781f28d0d7d1fd39a?
s=60&d=retro&r=g)

### 󠀁[Exelente Y rapido](https://wordpress.org/support/topic/exelente-y-rapido/)󠁿

 [Gabriel Bravo](https://profiles.wordpress.org/gabrielbravo/) 19. meje 2020

Muy buen pligin, hace su trabajo. Ye ahora mucho tiempo para traducir sitios en 
MU. Bravo

![](https://secure.gravatar.com/avatar/eea8e8b36980f791f34dc4ec92fbab8311a1010ec35e89bf63695f91785a4b6c?
s=60&d=retro&r=g)

### 󠀁[Works easy](https://wordpress.org/support/topic/works-easy-11/)󠁿

 [Damiaan van Vliet](https://profiles.wordpress.org/damnsharp/) 28. nowembra 2019

Great plug-in for duplicating a single site within a multi-site. And free of charge!
I hope it will be developed also in the future, I would pay gladly for the development.

![](https://secure.gravatar.com/avatar/a9e1c3b02a34fa228a8b06bc21c3ddf019f45078129cae10f8bd0e474aaef4db?
s=60&d=retro&r=g)

### 󠀁[Can’t do first clone, the main site is not listed, documentation is poor on this](https://wordpress.org/support/topic/have-no-idea-how-to-do-my-first-clone-the-main-site-is-not-listed-documentatio/)󠁿

 [amityweb](https://profiles.wordpress.org/amityweb/) 1. nowembra 2019

I cant use this plugin, my main site is missing in the drop down. If I could clone
the main site then I have to specific what tables to clone in a function. I cant
documentation on it. I found this thread https://wordpress.org/support/topic/duplicating-
primary-site/, but that does not say what tables. I have no idea what tables I would
need to enter to clone the main site. This really needs more documentation. I would
assume most people would start with 1 site but if they cant clone it with this plugin
they cant create a template to clone other sites. Its a non starter.

 [ Čitajće 85 pohódnoćenjow ](https://wordpress.org/support/plugin/multisite-clone-duplicator/reviews/)

## Sobuskutkowarjo a wuwiwarjo

„MultiSite Clone Duplicator“ je softwara wotewrjeneho žórła. Slědowacy ludźo su 
k tutomu tykačej přinošowali.

Sobuskutkowarjo

 *   [ Globalis ](https://profiles.wordpress.org/globalis/)
 *   [ Pierre Dargham ](https://profiles.wordpress.org/pdargham/)
 *   [ Julien OGER ](https://profiles.wordpress.org/julienog/)
 *   [ David Daugreilh ](https://profiles.wordpress.org/daviddaug/)

[Přełožće „MultiSite Clone Duplicator“ do swojeje rěče.](https://translate.wordpress.org/projects/wp-plugins/multisite-clone-duplicator)

### Na wuwiću zajimowany?

[Přehladajće kod](https://plugins.trac.wordpress.org/browser/multisite-clone-duplicator/),
hladajće do [SVN-repozitorija](https://plugins.svn.wordpress.org/multisite-clone-duplicator/)
abo abonujće [wuwiwanski protokol](https://plugins.trac.wordpress.org/log/multisite-clone-duplicator/)
přez [RSS](https://plugins.trac.wordpress.org/log/multisite-clone-duplicator/?limit=100&mode=stop_on_copy&format=rss).

## Protokol změnow

#### 1.5.3

 * Test compatibily with WordPress 5.0.0
 * Improvement translations
 * Fix unix file path from log directory

#### 1.5.2

 * Fix file path on duplicate

#### 1.5.1

 * Fix compatibility with PHP version < 5.4

#### 1.5.0

 * Fix duplicating exponentially usermeta
 * Fix unix WP path validation and allow points
 * Remove cache flushing on error

#### 1.4.1

 * Fix wp_cli activation

#### 1.4.0

 * Added select2 support (Ajax dropdown when selecting site)
 * Restrict activate to network admin only (network admin area)
 * Default logs path moved in upload dir
 * Added language zh_CN
 * Bugfix : SSL compatibility

#### 1.3.3

 * Bugfix : Compatibility : WordPress 4.7 (wp_get_sites was deprecated)

#### 1.3.2

 * Bugfix : Check on admin referer broke some admin page

#### 1.3.1

 * Bugfix : Compatibility with PHP 5.2

#### 1.3.0

 * Added wp-cli site duplicate subcommand
 * Added default options in network settings pannel
 * Languages : added translation for spanish, lithuanian and greek
 * Bugfix : Using backtricks on CREATE TABLE LIKE
 * Bugfix : Remove HyperDB compat. : it made some bug on schema / table selection

#### 1.2.0

 * Bugfix : duplication of tables without primary key / with several primary keys
   was causing SQL error
 * Bugfix : escape underscore characters ( ‚_‘ ) in sql queries

#### 1.1.0

 * Bugfix : „Keep users and roles“ was broken
 * Bugfix : Compatibility with plugins that use reserved mysql words in table names
 * Bugfix : Partial compatibility with HyperDB

#### 1.0.0

 * Tested on WP 4.0.0
 * Bugfix : Compatibility with PHP 5.2
 * Bugfix : SQL Error replace mysql_real_escape_string by $wpdb->prepare
 * Bugfix : unable to delete, deactivate, etc. site when plugin is active
 * Bugfix : Fields in duplicate form lost information after validate with error

#### 0.2.0

 * First public version released by Pierre Dargham
 * Generates logs
 * Primary site is clonable
 * Auto-suggest for admin email
 * Keep users and roles from duplicated site
 * Translating
 * Hookable

#### 0.1.0

 * Initial version released by Julien Oger
 * Copies all the posts, settings and files from a site to a new one
 * Cannot clone primary site

## Meta

 *  Version **1.5.3**
 *  Last updated **7 lět**
 *  Active installations **100+**
 *  WordPress version ** 4.0.0 abo nowši **
 *  Tested up to **5.0.0**
 *  Language
 * [English (US)](https://wordpress.org/plugins/multisite-clone-duplicator/)
 * Tags
 * [clone](https://hsb.wordpress.org/plugins/tags/clone/)[copy](https://hsb.wordpress.org/plugins/tags/copy/)
   [duplicate](https://hsb.wordpress.org/plugins/tags/duplicate/)[duplication](https://hsb.wordpress.org/plugins/tags/duplication/)
   [duplicator](https://hsb.wordpress.org/plugins/tags/duplicator/)
 *  [Rozšěrjeny napohlad](https://hsb.wordpress.org/plugins/multisite-clone-duplicator/advanced/)

## Pohódnoćenja

 4.4 out of 5 stars.

 *  [  68 5-star reviews     ](https://wordpress.org/support/plugin/multisite-clone-duplicator/reviews/?filter=5)
 *  [  5 4-star reviews     ](https://wordpress.org/support/plugin/multisite-clone-duplicator/reviews/?filter=4)
 *  [  2 3-star reviews     ](https://wordpress.org/support/plugin/multisite-clone-duplicator/reviews/?filter=3)
 *  [  1 2-star review     ](https://wordpress.org/support/plugin/multisite-clone-duplicator/reviews/?filter=2)
 *  [  11 1-star reviews     ](https://wordpress.org/support/plugin/multisite-clone-duplicator/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/multisite-clone-duplicator/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/multisite-clone-duplicator/reviews/)

## Sobuskutkowarjo

 *   [ Globalis ](https://profiles.wordpress.org/globalis/)
 *   [ Pierre Dargham ](https://profiles.wordpress.org/pdargham/)
 *   [ Julien OGER ](https://profiles.wordpress.org/julienog/)
 *   [ David Daugreilh ](https://profiles.wordpress.org/daviddaug/)

## Podpěra

Chceće něšto prajić? Trjebaće pomoc?

 [Forum pomocy pokazać](https://wordpress.org/support/plugin/multisite-clone-duplicator/)