Adding Namespaces

From Wikitech
(Difference between revisions)
Jump to: navigation, search
(Created page with '* Go into the wmf-deployment directory: cd /home/wikipedia/common/wmf-deployment/ * Edit InitialiseSettings.php vim wmf-config/InitialiseSettings.php * Inside the file, find ...')
 
(Add note about space->underscore and unresolvable names in namespaceDupes)
 
Line 6: Line 6:
 
:* Scroll down in the file and find the existing section for the project you are adding namespaces to
 
:* Scroll down in the file and find the existing section for the project you are adding namespaces to
 
:* If it doesn't list in that section, create a new entry for it
 
:* If it doesn't list in that section, create a new entry for it
 +
:* NOTE: You have to replace spaces with underscores in the new namespace name and add a corresponding talk namespace, or things will break
 
* Update the file to list off the namespaces you are adding & save your changes
 
* Update the file to list off the namespaces you are adding & save your changes
 
:* Try to keep the namespace numbers in some sort of order (IE: Portal is often 100.)
 
:* Try to keep the namespace numbers in some sort of order (IE: Portal is often 100.)
Line 13: Line 14:
 
   php maintenance/namespaceDupes.php --wiki=<wikidbname> --fix
 
   php maintenance/namespaceDupes.php --wiki=<wikidbname> --fix
 
* This will fix all the broken names due to the new namespace.
 
* This will fix all the broken names due to the new namespace.
 +
* If the script lists any unresolved names, run it again with --suffix=/BROKEN or something similar, and report the output on the Bugzilla bug
  
 
[[Category:How-To]]
 
[[Category:How-To]]

Latest revision as of 21:53, 18 December 2009

  • Go into the wmf-deployment directory:
 cd /home/wikipedia/common/wmf-deployment/
  • Edit InitialiseSettings.php
 vim wmf-config/InitialiseSettings.php
  • Inside the file, find the section variable called wgExtraNamespaces.
  • Scroll down in the file and find the existing section for the project you are adding namespaces to
  • If it doesn't list in that section, create a new entry for it
  • NOTE: You have to replace spaces with underscores in the new namespace name and add a corresponding talk namespace, or things will break
  • Update the file to list off the namespaces you are adding & save your changes
  • Try to keep the namespace numbers in some sort of order (IE: Portal is often 100.)
  • Once you have exited the now updated file, you need to push it live to the cluster:
 sync-file wmf-config/InitialiseSettings.php <one line summary of change and reason>
  • Now you MUST run the following script to clean up any pages that are using the new namespace in the title before it existed:
 php maintenance/namespaceDupes.php --wiki=<wikidbname> --fix
  • This will fix all the broken names due to the new namespace.
  • If the script lists any unresolved names, run it again with --suffix=/BROKEN or something similar, and report the output on the Bugzilla bug
Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox