You can place the code snippet into the index.php located in the subdiretory that the Media Wiki is installed into.