Adding Namespaces

From Wikitech
  • 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