Confluence Documentation

Confluence Latest 
Confluence 5.3 Documentation 
Confluence 5.2 Documentation 
Confluence 5.1 Documentation 
More...
 

 

Search the Confluence Knowledge Base

You're visiting the Confluence Knowledge Base. Visit the Confluence Knowledge Base Home for an overview.

Skip to end of metadata
Go to start of metadata

See Copy or Rename a Space in Confluence.

Related Content

Help us improve!
Is this article helpful?
Is the content complete?
Is it well written?

16 Comments

  1. Here is a different approach:

    1. Create a space backup of the space just to have a backup
    2. Create a new space with the new key
    3. Edit and delete the home page that was automatically created in the new space
    4. Edit the old space's home page
    5. Edit the location field to specify the new space
    6. (warning) Make sure the move children box is checked
    7. Save

    This moves the home page and all children to the new space. For us, this is normally all the pages in the space since we always try to have everything as children of the home page. If you have a few pages that are not in the home hierarchy, then follow similar procedures for each one. If you have a lot of these pages or you just need to organize them into your hierarchy better, using TimTam drag and drop might be easier.

    1. (thumbs down) Bad idea. If the space contains pages that the admin cannot see, these pages will be deleted. (sad)

      Please vote for this issue: http://jira.atlassian.com/browse/CONF-11267 

    2. Anonymous

  2. Anonymous

    What if the space key is numeric?

    dougl27@cs.com

  3. Anonymous

    I think it is really lame one cannot change a space key.

    I wanted to set up a specs-space and spent a day or two trying out the possibilities of Confluence. I'm quite happy with those but now I cannot 'formalize' my space by giving it a meaningful key (instead of TEST). It seems the only way to change the key is to do all the work over again, because moving pages keeps resulting in an error!

    1. Hi,

      Sorry to hear that you are experiencing this issue. And I am afraid that this feature is not currently available. But there is already a feature request here which has not been resolved yet. Please feel free to add yourself as a watcher, vote for this feature and add your own comments to this request. For further details on how we include new features and improvements, you might want to read this page.

      Meanwhile I would suggest you to do the workaround as instructed here

      Cheers,
      Husein

  4. You can change the space key by using this macro (I call it setspacekey) on any page in the space (even preview works to apply the new key):

    ## no body
    ## generate wiki markup
    ## usage: {setspacekey: newkey}
    ##
    #if ($param0)
       ## trim and test for illegal characters
       #set ($newkey = $param0.trim())
       #if ( $newkey.matches("[a-zA-Z0-9]+") )
          $space.setKey($newkey)
          Space key set to $newkey
          You should now rebuild the content index.
       #else
          Space key not set: {color:red} The new key  "$newkey" has characters other than a-z, A-Z, 0-9. {color}
       #end
    #end
    
    

    Once you've used the macro and changed the space key, remove it from the page.

    1. Does this usermacro take care of reindexing and relinking of whole content?

      A spacekey is a mandatory entry in every single index entry. I wonder if just changing a spacekey forces confluence to reindex and relink all content?

      Cheers.

      1. You're quite correct.  This macro does not force a rebuild of the index.  You should rebuild the content index after any key change.

        Thanks,

        -Ed

        1. I will use your user-macro if I am able to do an reindex and if I dont care of all the links within all pages and I use the secure way

          1. of creating a new space

          2. changing the home page name of this new space

          3. and just move the old home pagetree to the new space

          4. and by the end delting the whole old space which is now empty.

          I get all reindexed except those links which are inside macro bodies as confluence missed their major/mandatory feature to relink automatically if a page got moved.

          Cheers.

    2. This code doesn't work on latest Confluence since they changed some bits. I have updated the Macro. This seems to be extremely helpful, thanks Ed!

      For who may be interested: you can add the macro in your Confluence Admin under User Macros (http://your-confluence-domain.com/admin/usermacros.action)

  5. Anonymous

    Hi, I followed the instructions above to move all pages from one space to another (the method of moving the home page)

    Everything seems to have worked well, all the pages are there, however the navigation tree on the left side does not appear. I see it flash "Loading" very quickly, then it disappears. Otherwise if I go in hierarchy view, all the pages are there and properly ordered in the tree.

    Using Confluence 4.0.4

    Any clues?

  6. Anonymous

    Set your own life time more simple take the loans and everything you require.
  7. Anonymous

    @Ed Bacher

     

    I don't understand how to use your makro inside the WYSIWYG Editor of Confluence 4.2.

    If i enter it into the Wiki-Markup Box nothing seems to happen.

     

    Thanx


    Chris

  8. Hi.

    I'm writing plug-in in Java and i would like to get spaceKey. I use class which extends ConfluenceActionSupport. Can i get spaceKey using class like this one ?

     

  9. That new macro worked like a charm.  Put it in the User Macros area (default settings/no rendering) then inserted it into the space, supplied the parameter during the insert macro stage (prompts you) and wa la.  New space key.  Thank you!

    We are on Confluence 4.3.7