Set up the project for local development

Sitefinity Cloud has been designed to facilitate custom development and code changes at any time. The platform provides full access to the project’s source code, database backups, as well as an optimal CI/CD setup to enable deployment of custom code.  

Setting up the project code locally

The project’s code files can be accessed from the Repository tab on the Management Portal. You can download the code for local development by cloning the solution locally.

To set up a Sitefinity Cloud project on your local development environment, follow these steps:

  1. Log in to your Sitefinity Cloud Management Portal.
  2. Navigate to Repos.
  3. From the branches dropdown, select the project branch you want to setup locally, for example, select master.
  4. To clone the project Git repository on your local machine, click the Clone button, located in the upper right corner of the screen.
    You can clone the repository using the command line or by selecting an IDE you want to clone to. For example, to clone the project in Visual Studio, select Clone in Visual Studio from the IDE dropdown and specify your Sitefinity Cloud Azure AD credentials when prompted by Visual Studio.
  5. Restore the project NuGet packages and build the solution.
  6. Restore a DB backup on your local machine. For more information on backing up and restoring Sitefinity Cloud project databases, see Backup and restore the database.
  7. Change the connection string in the web.config file (or the DataConfig.config file, if not available in the web.config file) to point to the local copy of the project database on your SQL server.
  8. Create a new IIS website:
    1. Point the physical path of the website to the folder of the locally cloned project.
    2. Host the website under http://localhost:18080 for the Azure AD integration to work out-of-the-box. Alternatively, you can add domains for local development by following these steps. If you need the Azure AD integration to work with your customer domains, you have to submit a support case for the Sitefinity Cloud team to make the necessary changes.
  9. Browse the website at the configured domain.

On the local environment, developers can connect to a local copy of the database to implement and test their solution. 

Deploying code updates

Once the development team is done implementing any code updates on their local environment, they can push the code to a dedicated feature branch and then make a pull request to merge it to the Master branch of the project. 

Upon detecting a commit to the Master branch, Sitefinity Cloud triggers an automated build process, and the project is tested against all available tests. Once the tests pass, the code is deployed to the the first non-production environment (usually, Staging), where you can verify the code runs successfully. Then you can promote it to the Production environment.

For more information, see Deploy code changes to the Cloud.   

Deploying database changes

In case there are data structure changes, such as creation of a custom field or a dynamic module, they can be promoted from the local environment to the Sitefinity Cloud environments using the Export for deployment functionality. For more information, see Sitefinity CMS documentation » Export and deploy code changes.

NOTE: Executing database queries directly on the Sitefinity Cloud environment databases is not supported. 

Was this article helpful?