Translations:Manual:$wgFragmentMode/7/en

On the first step, set this variable to $legacy. After a while, when all caches (parser, HTTP, etc.) contain only pages generated with this setting, flip the value to $legacy-flip. This will result in all internal links being generated in the new encoding while old links (both external and cached internal) will still work. After a long time, you might want to ditch backwards compatibility and set it to $html5. After all, pages get edited, breaking incoming links no matter which fragment mode is used.