There may be times when you need to clone a site from one server to another. GridPane makes this process simple and you can use the GridPane single site migration/cloning tool located in the site configuration mode > backups tab.
This article is for cloning a duplicate site with the same URL to a different server, but you can also: -
- Clone a duplicate site with a new URL to a different server
- Clone a duplicate site with a new URL to the same server
Cloning a duplicate site with the same URL to a different server
Our cloning tool will replicate a near-identical state for the cloned site. The duplicate site will belong to the same owner if that user exists on the server, and it will match all the main control panel settings including:
- WordPress Core
- WordPress Database structure
- System User (If available)
- PHP version and settings
- Nginx settings
We will also duplicate your site-specific PHP in settings and PHP process manager settings that GP-CLI manages, alongside the GP-CLI adjusted site-specific Nginx settings and any includes in your site level Nginx directory.
When cloning a duplicate site to another server the following limitations exist:
- System user will only be synced IF they exist on the destination server
- www/root routing will not be synced
- http auth state will not be synced
Step 0. Prepare...
If you want the newly cloned site to share the same System User on the destination server as the origin site on the origin server, then you can manually create this user on the destination server before proceeding. Alternatively, you can always create the user and swap site ownership after the migrate/clone process has finished. We have articles here to assist:
Step 1. Go to the Sites Section of the GridPane Control Panel
Click on the Sites link in the GridPane main menu to go to the Sites management page.
Step 2. Open the site customizer for the site you wish to clone a duplicate of
Click on the URL of the site you want to clone a duplicate of in the active site's panel.
This will open the site customizer.
Step 3. Configure the Migrate/Clone tool for same URL / new server inside the customizer Backups tab
Click on the backups tab in the site customizer. Here you will find the Migrate/Clone tool.
Select Migrate/Clone and then Same URL, then choose your server from the dropdown.
Step 4. Click Migrate/Clone Now
Click the "Migrate/Clone Now" button to start the server process. Your server will begin to clone your site to the destination server immediately.
Please be patient while the duplicate cloning process is ongoing and refrain from making any changes to your site and either the origin server or the destination server.
You will receive a string of notifications to keep you informed about how the migrate/clone is proceeding throughout the process. Please pay attention to these.
When the process is complete, your configurations will match your original site
Step 5. Adjust WWW/Root routing if necessary
Unfortunately at the moment the clone/migrate tool does not automatically adjust www/root routing on the duplicate site to match the origin site. If you have your origin site routing to either www or root and wish for the duplicate clone to also follow this routing scheme then you will need to make these adjustments manually once the clone is complete.
Step 6. Check your cloned duplicate site
You should check your duplicate site to make sure everything is as expected. The content and database will have been cloned across and the URLs and file paths will have been updated to the new URL. We will have matched most states for the GridPane features, including all PHP ini settings, PHP process manager settings, and Nginx configuration settings that have been adjusted by GP-CLI. We will also have migrated across cloned files from your Nginx includes directory.