WordPress.org

Ready to get started?Download WordPress

Forums

NS Cloner - Site Copier
[resolved] Clone of ID=1 site gives signup redirect when visiting the subdomain (6 posts)

  1. SwabTheDeck
    Member
    Posted 3 months ago #

    Hello,

    I attempted a few times to make a clone of the main blog on my multisite installation at positivelybeta.com, but after the cloning process completes, visiting the new subdomain (clone2.positivelybeta.com) shows a redirect to sign up, as though the new blog doesn't exist. The database tables and site files appear to have copied correctly, and the clone log (http://positivelybeta.com/wp-content/plugins/ns-cloner-site-copier/logs/ns-cloner-20140108-010042.html) shows no errors. I'm aware that cloning an ID=1 site is not bulletproof, but has anyone else encountered such a problem and have any advice? Thanks in advance.

    http://wordpress.org/plugins/ns-cloner-site-copier/

  2. Never Settle
    Member
    Plugin Author

    Posted 3 months ago #

    Hello!

    Thanks for posting the log... something stands out as strange. Normally the tables for ID=1 do not have a prefix like wp_1_ (a standard default install and configuration of the database has the wp_ prefix for all ID=1 tables and then
    wp_2_
    wp_3_
    and so on for the subsites).

    Can you confirm if your database is actually using wp_1_ as the name in all the ID=1 tables. If so, was this something that you changed?

    Also, normally the site ID=1 upload files are not stored in a blogs.dir/1/ folder. Usually there's no blogs.dir (or sites/#/) uploads folder for ID=1. The uploads are just stored in /uploads/.

    We're just trying to figure out the unusual results in the log for an ID=1 cloning operation. Can you confirm more details of your setup - actual DB table names for site ID=1 and actual uploads folder location.

    Thanks!

  3. SwabTheDeck
    Member
    Posted 3 months ago #

    Hi!

    Thanks for your quick response. Yes, we are using wp_1_ as the prefix for all of the tables of the main site of the multisite, and blogs.dir/1/ is the folder where the uploaded files are stored. As far as why it is set up this way, I don't have a good answer. This site is fairly old and has been maintained by many before me. If there is anything other information that would be helpful, let me know and I'd be happy to do my best to get it to you. Thanks again!

  4. Never Settle
    Member
    Plugin Author

    Posted 2 months ago #

    Sorry for the delay! Just reviewing any loose threads and realized we hadn't closed the loop on this. We did some additional brainstorming and came up with a potential self-serve fix. This isn't something we'll add to the Cloner since it would mess up other standard environments, and the bummer is that if you update the Cloner in the future you'll have to "re-apply" this patch. Also, we don't have a valid way to test this since it is so environment specific - so USE AT YOUR OWN RISK :)

    That said, an experimental fix would be to change line 425 of ns-cloner.php from this:

    $source_pre = $source_id==1? $wpdb->base_prefix : $wpdb->base_prefix . $source_id . '_'; // the wp id of the source database

    To this:

    $source_pre = /*$source_id==1? $wpdb->base_prefix :*/ $wpdb->base_prefix . $source_id . '_'; // the wp id of the source database

    If you were still having issues, hopefully this gives an option of something new to try. Again, though, please be very careful in trying this. Best case would be to try it on an off-line duplicate of your live site / isolated dev environment.

    Let us know if it works out for you. Thanks!

  5. SwabTheDeck
    Member
    Posted 2 months ago #

    Hi,

    Thanks for your reply. We had ended up using a different strategy for our client without having to use the Cloner, but I appreciate the response. Sorry for not updating the ticket to notify you.

  6. Never Settle
    Member
    Plugin Author

    Posted 2 months ago #

    Sure thing! Glad you figured something out!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.