I am facing following error :

MAGE_RUN_CODE in /var/www/html/app/etc/stores.php on line 12

I am using warden for local setup.

1 Answer 1


In OP post apache vhost config is incorrect:

SetEnv MAGE_RUN_CODE frenchstore_view;

SetEnv MAGE_RUN_TYPE store;

Parameters should be in double quotes and no semicolons.

Correct one:

SetEnv MAGE_RUN_CODE "frenchstore_view"

SetEnv MAGE_RUN_TYPE "store"

  • I Tried this solution available on stack but its also not working Commented Jan 7, 2022 at 12:03
  • Create a new directory for store2 and copy the .htaccess and index.php into that new directory. Then update /store2/index.php to set the website code and update the line require DIR . '/../../app/bootstrap.php'; to go up one directory. This way when you hit it will start at your new directory and index.php file Commented Jan 10, 2022 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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