Applies to: Self-Hosted
Audience: IT Administrators
Time: Approximately 45 to 60 minutes
This guide walks you through duplicating your Axero site from one environment to another, such as copying a production site to a sandbox or staging environment. This process also applies when migrating your site to a new domain (e.g., changing from my.oldcompany.com to my.newcompany.com).
my.oldcompany.com
my.newcompany.com
Note: This guide applies to self-hosted (on-premises) installations only. If you are on Axero Cloud and need an additional site, contact your Client Success Manager for assistance.
Before you begin, ensure the following are in place:
If your site uses Single Sign-On (SSO), change the login method to SSO Login + Communifire Login before proceeding. This ensures you can still sign in with a username and password if SSO is temporarily unavailable during the migration.
Note: If your site does not use SSO, skip this step and proceed to Copy Site Files and Database.
D:\websites\intranet.com
CFAppSettings.config
CFAppSettings-Overrides.config
CFConnectionStrings.config
CFProviders.config
CFSSOSettings.config
saml.config
web.config
WindowsADSettings.config
Important: Do not run more than one SQL Server instance on the same virtual machine.
Important: Back up the restored database before running the queries in this section. If a query produces unexpected results, you can restore from this backup without repeating the full database restore process.
Each Axero installation requires a unique identifier. Run the following SQL query against the target database to generate a new one:
DECLARE @Guid UNIQUEIDENTIFIER; SET @Guid = LOWER(NEWID()); UPDATE Dyve_Dynamic_Property SET PropertyValue = @Guid WHERE PropertyName = 'UniqueID'; UPDATE Dyve_Tenant SET UniqueID = @Guid;
Run the following SQL query to update all internal references from the old domain to the new domain. Replace <NEW DOMAIN URL> with the URL of your target site and <OLD DOMAIN URL> with the URL of the site you are copying:
<NEW DOMAIN URL>
<OLD DOMAIN URL>
DECLARE @NewDomain NVARCHAR(200) = '<NEW DOMAIN URL>' UPDATE Dyve_Content SET ContentBody = REPLACE(ContentBody, '<OLD DOMAIN URL>', @NewDomain) WHERE ContentBody like '%<OLD DOMAIN URL>%' UPDATE Dyve_PB_Widget SET WidgetProperties = REPLACE(WidgetProperties, '<OLD DOMAIN URL>', @NewDomain) WHERE WidgetProperties like '%<OLD DOMAIN URL>%' UPDATE Dyve_UrlMapper SET OldUrl = REPLACE(OldUrl, '<OLD DOMAIN URL>', @NewDomain), NewUrl = REPLACE(NewUrl, '<OLD DOMAIN URL>', @NewDomain) UPDATE Dyve_Media_Server SET MediaServerRootURL = REPLACE(MediaServerRootURL, '<OLD DOMAIN URL>', @NewDomain) WHERE MediaServerRootURL like '%<OLD DOMAIN URL>%'
Elasticsearch connection settings are stored in the database. When you restore a production database, these settings still point to the source environment. Run the following SQL queries to update them:
-- Update Elasticsearch Server URL UPDATE [Dyve_Dynamic_Property] SET [PropertyValue] = 'http://your-elasticsearch-server:9200' WHERE [PropertyName] = 'ElasticsearchServer'; -- Update Elasticsearch Username UPDATE [Dyve_Dynamic_Property] SET [PropertyValue] = 'your_elasticsearch_username' WHERE [PropertyName] = 'ElasticsearchUsername'; -- Update Elasticsearch Password UPDATE [Dyve_Dynamic_Property] SET [PropertyValue] = 'your_elasticsearch_password' WHERE [PropertyName] = 'ElasticsearchPassword'; -- Update the CA fingerprint, only needed when Elasticsearch serves https UPDATE [Dyve_Dynamic_Property] SET [PropertyValue] = 'your_ca_fingerprint' WHERE [PropertyName] = 'ElasticsearchCAFingerprint';
The protocol has to match how Elasticsearch is actually serving. ElasticsearchServer carries the protocol, so use http://localhost:9200 when Elasticsearch is not running TLS, which is common on a same-server install, and https:// only when it is. Setting https against a plain-http service produces "Cluster state is invalid" on the Rebuild Index page after a clone, while the service itself is running fine.
ElasticsearchServer
http://localhost:9200
https://
There are four settings here, not three. ElasticsearchCAFingerprint matters when the connection is https: it has to match the target environment's Elasticsearch certificate or the connection fails. Using the http value on a same-server install keeps the certificate out of the picture altogether.
Replace the placeholder values with the Elasticsearch credentials for your target environment. If Elasticsearch is installed on the same server, the server URL is typically https://localhost:9200.
https://localhost:9200
Important: If the Elasticsearch settings still point to the source environment, the site will fail to load or time out on startup. This is a common cause of post-migration issues.
If your new site does not have SSL enabled, open the web.config file and comment out the HTTPS redirect rule to prevent redirect loops:
<!-- <rule name="HTTP to HTTPS redirect" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> <add input="{HTTP_X_FORWARDED_PROTO}" pattern="^https$" negate="true" ignoreCase="true" /> </conditions> <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" /> </rule> -->
If your site uses SAML-based Single Sign-On (e.g., Microsoft Entra ID / Azure AD), update your identity provider to recognize the new domain. Skip this section if your site does not use SSO.
https://my.newcompany.com
/SAML/AssertionConsumerService.aspx
https://my.newcompany.com/SAML/AssertionConsumerService.aspx
Note: If you are using a different SAML identity provider, update the Entity ID and Assertion Consumer Service URL in your provider's configuration to match the new domain.
iisreset
Note: Disabling email sending on the new site prevents it from sending notifications to production users. Re-enable email sending only after you have fully configured the new environment and are ready to go live.
If the site displays an error after starting, enable detailed error messages to diagnose the issue:
customErrors
<customErrors mode="Off" defaultRedirect="Errors-CF/default.aspx" redirectMode="ResponseRewrite">
Important: Set customErrors mode back to On or RemoteOnly after troubleshooting is complete. Leaving it set to Off in a production environment exposes detailed error information to end users.
If your site is behind Cloudflare or another reverse proxy and you receive a 524 timeout error, the proxy can reach your server but the application is not responding in time. To diagnose:
https://localhost
127.0.0.1
We are always working to improve our documentation. If you encounter an issue not covered here, or if a step could be clearer, let us know through a Support Case so we can help you and improve this guide for everyone.
is requesting access to a wiki that you have locked: https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/25620/on-premises-additional-instances
Your session has expired. You are being logged out.