How to Generate a New confluence.cfg.xml
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
If Confluence is started and takes you to the Setup Wizard, as if you were installing it for the first time, that means something has happened to prevent Confluence from finding its home directory, which is defined in <confluence_install_directory>/confluence/WEB-INF/classes/confluence-init.properties
.
If the <confluence_home_directory/confluence.cfg.xml
file is missing or damaged, here is a way to generate a new, valid one.
Step-by-Step Guide
Back up your production database and Confluence home directory.
- Create a new, blank database. This is solely for creating the new
confluence.cfg.xml
file and will be discarded later. - Create a temporary home directory. This is solely for creating the new
confluence.cfg.xml
file and will be discarded later. Edit
<confluence_install_directory>/confluence/WEB-INF/classes/confluence-init.properties
by changing it to point to the temporary home directory you created in Step 3.Start Confluence.
Go through the Setup Wizard. On the database configuration screen, point Confluence to the database you created in Step 2.
Complete the Setup Wizard.
Once the installation is complete, shut down Confluence.
At this point you should have a brand new Confluence installation with a temporary home directory containing a new (and complete)
confluence.cfg.xml
file.Copy that file to your actual home directory (the one you backed up in Step1). Delete the old
confluence.cfg.xml
file if it exists.Modify the new
confluence.cfg.xml
file by changing the database connection string so that it's pointing to your production DB.Modify
<confluence_install_directory>/confluence/WEB-INF/classes/confluence-init.properties
again by pointing it back to your existing Confluence home.Start Confluence.