Template site to generate a site outside of current domain.

Every time I create a new domain and wordpress site I go thru he same ritual of installation.
Download load about 30 base plugins, couple of themes and then go thru configuring all of this over and over.

I know about wpmudev tools for "cloning" a template site in a multisite. But as far as I can tell that stops there in that 1 multisite.

I don't know what would be the best way to create the 2nd multisite core with 30 plugins configured.

It takes me to long to do anything with shell scripts. I did use "make files". In another CMS we had a "make file" which had an entry for every module and version and settings. That really got out of hand trying to keep that updated and correct. Looking at a long file was almost like looking thru a database.

Today I spun up another server in the cloud, created a new domain site, installed wordpress, installed wpmudev plugins and all my goto plugins and themes. Takes a lot of checking and rechecking to get it configured.

I used to play chess with a few friends. We got so tired of the first 10 moves that we just set the board up already 10 moves into the game. We played from that "cloned" board.

The cloning concept is really what I would like to know how to do.

Do you know of a simple yet dependable way to create the 2nd, 3rd etc multisite on any server and domain from a model / template multisite? Not talking about a network of multisites.

Thank you

  • Rupok

    Hi Lee,

    The cloning concept is really what I would like to know how to do.

    Thanks for asking. I just searched for you and found a plugin which seems to clone an entire multisite: https://snapcreek.com/duplicator/

    Instructions are available here:
    https://snapcreek.com/duplicator/docs/moving-a-multisite-install-with-duplicator-pro/

    Please note, I've not used this plugin, so can't confirm that it will work 100% but it's worth trying. As their description says, it should serve your purpose.

    Please let us know how it goes. If it doesn't work, we will be glad to help further.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Lee,

    From your response it sounds like there is not a wpmudev way of doing this

    I'm really sorry if my response sounded like that. We already have Snapshot Pro plugin with which, you can create a backup of your entire network and then restore it on another multisite. But I didn't mention it in my first reply because you said you are looking for ways to "clone" your network. I'm afraid, Snapshot Pro doesn't provide "cloning" feature. You will need to have a multisite setup ready and Snapshot Pro installed and activated to your target setup to restore your backup. From your original description, I thought you need such a system where you can simply clone one setup and deploy on another instance.

    But I should have mentioned Snapshot Pro, I do apologize for not mentioning it.

    The duplicator plugin does not require any preloaded skeleton of plugins to restore the site like or snapshot requires

    Actually, both plugins serve the same purpose, but in a different way. With Duplicator, you can clone your setup, but you can't extract a single site from your multisite setup to import in another multisite. With Snapshot Pro, you can simply take backup of one specific subsite and then restore that subsite in another multisite. You can also take backup of a single subsite and then restore that in another single setup. Snapshot Pro gives you the liberty to backup and restore each subsite as a standalone site. This is not available in Duplicator.

    But I do agree with you that if Snapshot Pro also had the feature of cloning, then it would be great. So I'm moving your thread to our Features and Feedback section. More people liking this idea, more chances our developers will work on this and will include this feature in our future releases.

    Have a nice day. Cheers!
    Rupok

  • Lee

    Thanks. I know about the differences I have been using snapshot pro for almost a year.
    One of the things I don't like about snapshot pro is that I have to load all of the plugins and themes prior to restore. So I have to keep track of all of that or shh and review plugins when I should not have to do those extra steps. If you lose the drive and no access then the snapshot does not help.

    Anyhow hope others see this as not only an additional feature but maybe a better way of restoring backups.

  • Nithin

    Hi Lee,

    Hope you are doing good today. :slight_smile:

    One of the things I don't like about snapshot pro is that I have to load all of the plugins and themes prior to restore. So I have to keep track of all of that or shh and review plugins when I should not have to do those extra steps.

    Did you meant you have to upload /themes, and /plugins folder, as Snapshot restore doesn't do that? If you have included all the files during backup, Snapshot should have restored it. Do you have a thread related to this issue?

    Snapshot restore should have performed it, but I could understand that such anomalies might happen depending upon one server to another. If you think it's something you want us to troubleshoot, and if you haven't created a thread related to this yet, please do create a new thread, and one of the support staffs will get back to you asap.

    Check this link to create a thread:
    https://premium.wpmudev.org/forums/#question

    Best Regards,
    Nithin

  • Nithin

    Hi Lee,

    Thanks for pointing that article, I was thinking as you were having issues with taking Snapshots. Copying the plugins, and themes are recommended in that article to achieve the best results while restoring, and to avoid any anomalies. However, in normal use case, if you have access to your dashboard, and if you have included these folders in the backup, restore would still work, ie it'll include themes/plugins folder, even if you didn't manually copy these folders to the destination.

    Kind Regards,
    Nithin

  • Lee

    Thanks for the info.

    My normal case is loss of a server or loss of access to a domain. Rarely have i had to restore a working site.

    I do backups for total failure on all things related. Any partial solution is a weak link in that process.

    I am struggling with record keeping of plugins of 100's of sites using snapshot.

    I really need a one click restore of a site, multisite or any site regardless of the type of failure or reason i need to restore.

  • Lee

    I found this script on a search. I have not tested it but looks like it will work. I imagine making one for each site and storing it with the backup files.

    #!/usr/bin/env bash
    
    #WordPress Batch Plugin Installer WP-CLI
    #Author https://guides.wp-bullet.com
    
    #define array of plugin slugs to install
    WPPLUGINS=( wordpress-seo ewww-image-optimizer better-wp-security )
    
    #specify path to WordPress installation
    WPPATH=/var/www/guides.wp-bullet.com
    
    #loop through array, install and activate the plugin, ${WPPLUGINS[@]}
    for WPPLUGIN in "${WPPLUGINS[@]}"; do
    #check if plugin is installed, sets exit status to 1 if not found
        wp plugin is-installed $WPPLUGIN --path=$WPPATH --allow-root
    
    #install plugin if not present based on exit code value
        if [ $? -eq 1 ]; then
            wp plugin install $WPPLUGIN --activate --path=$WPPATH --allow-root
        fi
    done
    
    #Fix permissions in case you ran as root
    sudo chown -R www-data:www-data $WPPATH
    sudo find $WPPATH -type f -exec chmod 644 {} +
    sudo find $WPPATH -type d -exec chmod 755 {} +

    found here https://guides.wp-bullet.com/batch-install-wordpress-plugins-using-wp-cli-bash-script/

  • Kasia Swiderska

    Hello Lee,

    I really need a one click restore of a site, multisite or any site regardless of the type of failure or reason i need to restore.

    Actually Managed Backups can do such a thing - first you can take a backup of whole site (single or multisite) and then with installer you can restore it - you can find installer and backup in HUB where you manage your sites

    You need to only have uploaded backup file and installer in root directory of your site and proceed with restoration (in case your site it destroyed). Or if you have still access to wp-admin, you can restore it from there

    You can read more about on project page https://premium.wpmudev.org/project/snapshot/ - give it a try and let us know what do you think.

    kind regards,
    Kasia

  • Kasia Swiderska

    Hello Lee,

    In case of managed backups (that step is described at the bottom of that article under Restoring Your Cloud Backup) it is almost "one click". At the moment we don't offer direct restoration from HUB, but when you have backup and installer uploaded to root directory of your site then it requires running Wizard in installer.
    It works similar to Duplicator. It does not require installed WordPress and plugins - maybe that is not clear in blog forum post, but it really works that way. You upload two files and restore whole site with those.


    This is installer Wizard when its deploying site.

    kind regards,
    Kasia

  • Lee

    Thank you for pointing out the snapshot-installer files to upload to the site. I used the hub managed backup one time shortly after it was available and at that time I do not remember any page that showed these two files. In fact I believe it only sent me to the site and if the site was not up it would not work.

    I am glad to see that this feature has been implemented. I was not aware of it.

    Will the snapshot-installer restore a completely blank domain directory to a working site?
    Will the snapshot-installer install the snapshots that are saved to external like dropbox?

    I don't see away to change what managed backups backup up like the normal snapshot configs. I would like to backup the site(s) MINUS the media library assets since I have those out on AWS S3. I have to much video and images to backup in any snapshot.

    Thanks

  • Lee

    Looks like I can set in the "global file exclusions" directory to exclude.
    But it is excluding my media library without setting /uploads/2017

    I am using AWS and Offload Lite.
    Example asset it has:
    local path: wp-content/uploads/2017/03/14131341/elephant-590020_1920_21.jpg
    URL: https://s3.amazonaws.com/bucket/wp-content/uploads/2017/03/14131341/elephant-590020_1920_21.jpg

    Managed Backups is NOT backing up this asset or others in the media library.

    1. IS this the correct action ?
    2. Is this because of Offload S3 Lite Plugin?
    3. If this AWS S3 Offload S3 Lite combo was not present would it be backing up the media library?

    thank you

  • Nithin

    Hi Lee,

    Hope you are doing good today. :slight_smile:

    Will the snapshot-installer restore a completely blank domain directory to a working site?

    The primary purpose of Snapshot is for Backup, what restore does is copy all the exact files to the destination, and at the moment it doesn't have any ability to restore, if WordPress isn't running in your destination domain.

    Will the snapshot-installer install the snapshots that are saved to external like dropbox?

    At the moment, Installer is meant to be used for Managed backups, ie the backups created, and store via the WPMU DEV Hub. Other than that, Snapshots created via Snapshot > Add New, has the option to add Dropbox as it's destination. You can create destination via Snapshot > Destination

    Will managed backup follow the "global file exclusions" settings ?

    Yes, Managed backups does follow the "global file exclusion" settings.

    1. IS this the correct action ?

    It would have worked fine, Managed backup by default shouldn't exclude the media library, could you please enable support access, so that we could give a closer look at your settings, and also check your backup zip files, to have a better idea regarding this.

    You can grant access from WPMU DEV > Support > Support Access > Grant Access, or check this manual: http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Please let us know once you enable access, so that we could get this sorted. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.