I am working on creating the multistore website when I editing the store configuration I got the below notification.

Before modifying the website code please make sure it is not used in index.php

what is it means?

Can you explain more with any examples if possible?

1 Answer 1


If you are running Magento 2 with a sub-folder for each store view or website then your index.php file will often have code like

$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'my_store_view_code'; 
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'store'; // store or website
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);

This tells Magento which store view to load. This is just a reminder to update this code if required.

Sometimes this is also done via a .htaccess file or similar depending on how you have chosen to configure your server.

  • Thank you for your answer. I have 3 stores (fr, us and in) by default india, so how can I define? Can we have an example? If possible give me example both .htaccess and index.php
    – Bojjaiah
    Jul 10, 2019 at 4:45
  • The Magento Docs might be the best place to start. Without knowing your domain structure and server stack it's hard to advise.
    – Jamie
    Jul 11, 2019 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.