Support » Plugin: NS Cloner - Site Copier » NS Cloner don't copy the content of pages and posts (tabels)

  • Resolved singfa


    All seems to be fine when i cloning a site but when i visit the new site, I don’t find the posts and page contents from the cloned site.

    Here is the Detailed Log:

    013-10-31 20:22:58 – RUNNING NS Cloner version:

    2013-10-31 20:22:58 – Source Prefix: wp_14_
    2013-10-31 20:22:58 – Target Prefix: wp_16_
    2013-10-31 20:22:58 – Cloned: 0 tables!
    2013-10-31 20:22:58 – running replace on Target table prefix: wp_16_
    2013-10-31 20:22:58 – Replace: >> With >> Arclite0Demo.
    2013-10-31 20:22:58 – Replace: Andreas09 Theme Demo >> With >> Arclite Theme Demo
    2013-10-31 20:22:58 – Replace: blogs.dir/14/ >> With >> blogs.dir/16/
    2013-10-31 20:22:58 – Replace: /sites/14/ >> With >> /sites/16/
    2013-10-31 20:22:58 – Replace: wp_14_user_roles >> With >> wp_16_user_roles
    2013-10-31 20:22:58 – Original basedir returned by wp_upload_dir() = /home1/bhostpro/public_html/wp-content/uploads/sites/14
    2013-10-31 20:22:58 – Original basedir returned by wp_upload_dir() = /home1/bhostpro/public_html/wp-content/uploads/sites/16
    2013-10-31 20:22:58 – Copied: 18 folders and files!
    2013-10-31 20:22:58 – From: /home1/bhostpro/public_html/wp-content/uploads/sites/14
    2013-10-31 20:22:58 – To: /home1/bhostpro/public_html/wp-content/uploads/sites/16
    2013-10-31 20:22:58 – Entire cloning process took: 7.09678292274 seconds.

    And the hystorcal Log:

    2013-10-31 19:52:19 – Site: created!
    2013-10-31 19:52:19 – Arclite0Demo. cloned in 4.89139795303 seconds.
    2013-10-31 20:22:58 – Site: created!
    2013-10-31 20:22:58 – Arclite0Demo. cloned in 7.09678292274 seconds.

    It seems that the new site was created as whenI create a new one from the dashboard.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Never Settle


    Thanks for the log data. We haven’t seen anything like that scenario before. It clearly says there were no tables copied in the process, so it’s a bit of a mystery why.

    This line also looks weird:
    2013-10-31 20:22:58 – Replace: >> With >> Arclite0Demo.

    It should have said something like
    Replace: >> With >>

    Did you have anything non-standard with your DB? Have you checked your tables for wp_14_* and wp_16_* to see what’s there? It’s almost like wp_14_* tables don’t exist?

    Can you provide any other details about
    – how was it originally created?
    – what plugins are running?
    – any other quirks?

    It looks like there’s something no normal with that site. And you didn’t get any other errors, right?

    Can you check your PHP logs to see if there are any errors in there?

    So, I wanted to clone the site where I have created some posts and I put some data
    and create the new website
    The site was created normally with add new site from admin dashboard for theme demo purpose. So there isn’t much plugins installed. This plugins is activated: Advanced Responsive Video Embedder, Akismet and Lorem Ipsum Generator Shortcode.
    If you visit thetwo sites you see that the first site that i wantoed to clone ( has two posts and a page where i put some data.
    The second (, that should be the clone of the first have no posts and the page is the default that have the template.

    Now i see that the database base name for is: _wrdp1_a
    I use the multi database (16 database) so i have the names for this specific type

    So the second site that was ceated like a clone isin the _wrdp1_c database.

    The table prefix in the database _wrdp1_a for is wp_14_

    The table prefix in the database _wrdp1_c for is wp_16_

    So this means that the database table prefixes is OK but for some reason the data or the tables were not copied.

    Plugin Author Never Settle


    Ah. That’s the missing key right there – unfortunately the Cloner is not compatible with multi DB because it is only operating on / expecting a single database, which is why 0 tables could be cloned (they are not found in the main / original DB).

    2013-10-31 20:22:58 – Source Prefix: wp_14_
    2013-10-31 20:22:58 – Target Prefix: wp_16_
    2013-10-31 20:22:58 – Cloned: 0 tables!

    Support for multi DB is something that we hope to have an add-on for in the future. It’s just very difficult because multi DB inserts a layer between WordPress and the DB which changes all the normal conventions about how the tables are stored and referenced. It also means executing commands across multiple databases rather than a single database.

    I hope this add-on will be made ​​as soon, since this plugin is made for multi site environment.
    Thanks for your quick response.

    Plugin Author Never Settle


    Sure thing! Out of curiosity why are you running multi DB at all? Do you anticipate more than a couple million tables (which a single DB can actually handle no problem)? The cloner is made for multisite which is different than multisite + multi-db. Unless you have usage data that suggests you’ll have over 100-200 thousand sites, it might be better to stick with a standard multisite configuration for now which will simplify a lot of things (and allow the Cloner to work right now 🙂 )

    Here’s a good thread with some experience on sizing, albeit from a couple years ago.

    Multi-db is really not necessary except in extreme situations, and we haven’t added support for it yet because it is a fairly uncommon configuration. But we do definitely still intend to add support for it, but not sure when it will be ready. We’ve had 1 or 2 others ask about it too. But out of over 11,000 downloads so far that is a tiny percentage.

    Anyway, all the best, and we’ll try to post updates when new features like multi-db are added!

    I think it will not be too hard to find a solution because the multi DB system uses a logical system to create tables for each site.
    And the name of the database is given according to a precise algorithm.
    There are three types of multi DB after their number (16, 256, 4096) and depending on the type used, we can find every site in in which database is after the MD5 checksum of the blog ID number.

    In the opinion of :

    “1-5,000 blogs/sites you should be fine with your WordPress default database

    5,000 – 50,000 blogs/sites – go with 16 databases

    50,000 – 100,000 blogs/sites – use 256 databases

    100,000+ blogs/sites – use 4096 databases”

    So i don’t know how many sites will have in the future but to have no problems if I need to make this, I thought from the beginning to choose this option.

    Plugin Author Never Settle


    Makes total sense to start out in multi-db if you think you’ll need it! I think those estimates are very conservative and real-world on an adequate machine a single DB can handle a lot more, but we respect the folks over at WPMUdev a lot and love their stuff. It also of course depends a lot on what each of those sites will be doing – the more each one is doing the sooner you need multi-db, etc.

    Anyway, thanks for the extra info on the db naming scheme. We’ll try to tackle that as soon as we can (might be a while though) and will update this thread when we do.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘NS Cloner don't copy the content of pages and posts (tabels)’ is closed to new replies.