---
title: "Step 2 - Set up the new development space"
canonical: "https://support.appfire.com/space/CPCL/2864546446/Step%202%20-%20Set%20up%20the%20new%20development%20space"
format: markdown
---
> Macro (aura-html)


![sm-lockup-logo-comala-publishing-dark.png](media://48fcd50f-02e7-48f6-9404-a1a66a0978c5)

## Overview

If you already have a space for content, your production space, you can easily and safely create a new development environment using Comala Publishing.


![image](media://c9fd179f-8ba1-4e0f-bfae-44a49390a994)

- a new development space is created
- the pages in the existing production space are copied to this space using Comala Publishing

The new development space is

- set up as the source space for publishing pages to the production space
- published to the production space

## Step 2 - Set up the development space as your source space

In the current Comala Publishing configuration

- the original **PROD** production space is the source space
- the new **DEV** development space is the target space

After successfully publishing to the **DEV** space from the **PROD** space

- the existing publishing configuration linking the PROD space and the DEV space is removed
- a new publishing configuration is added with
  - the **DEV** space is configured as the source space
  - the **PROD** space is configured as the target space

The DEV space pages are then published to the PROD space. 

This allows all your development work to be undertaken in the **DEV** space and when the pages are ready for your wider audience, publish them to your **PROD** space.

### Remove existing publishing configuration

In the current source space, clear the publishing configuration.

In the **PROD** space

- navigate to the space settings publishing dashboard
- choose the ellipsis menu
- choose the **Clear Publishing Configuration**


## Space homepage and publishing

Ensure an appropriate homepage is defined in the published space page hierarchy before publishing any content from the new development (**DEV**) space to the production (**PROD**) space.

Comala Publishing cannot publish the space home page (**Overview** page).

The homepage content is static in each space - you must manually add any content as the page is not published.

You can make the source space homepage and the target space homepage content dynamic by adding Confluence page macros such as

- **Page tree**
- **Children**
- **Content by label**
- **insert excerpt**
- **page include**

Configure the macros to source page content from the current space.

> ⚠️ After an initial space publishing action, changing a homepage (in either the source or target space) may result in pages being published to the root of the target space.

## Set up the new development space

> 📝 Comala Publishing is designed to publish content from a source space to an “**empty**” target space. Although a space with existing pages can be configured as a target space, if you set a target space that has some existing title pages that are the same as in the source space, this can cause publishing issues.
> 📝 
> 📝 In this example, after copying your current production space to your new development space, you need to **delete the content (except for the space homepage) in your existing production space before publishing** from the new source development space.

In the **development (DEV) space**

- navigate to the Comala publishing dashboard in the **DEV** space by heading to **Space Settings > Manage pages > Publishing**
- add the original production (**PROD**) space as the **target space**
- choose **Publish space** to copy the space pages to the production space

> ℹ️ You need to first initiate a **space publish** operation before using the **single-page publishing** option.


## Tips and troubleshooting

Refer to the [https://appfire.atlassian.net/wiki/spaces/CPCL/pages/2864841561](https://appfire.atlassian.net/wiki/spaces/CPCL/pages/2864841561)  page for further information on how Comala Publishing manages publishing

- page URLs and **contentIds**
- in-page hyperlinks
- deleting pages after publishing


## Related pages

> Macro (contentbylabel)