Manual:$wgScript/es

Detalles
The URL of index.php, relative to DOCUMENT_ROOT.

is defined relative to. If you redefine this in your then you must also make sure you update.