Learn Magento MCQs

Prepare Magento MCQs (Multiple choice Questions) for exam and job interviews.

Which file contains the environment variables for Magento?

1) app/etc/env.php

2) app/etc/config.php

3) var/.htaccess

4) app/etc/config.xml

Answer : app/etc/env.php

What is the command to run Magento in developer mode?

1) php bin/magento deploy:mode:set developer

2) php bin/magento setup:mode:developer

3) php bin/magento mode:developer

4) php bin/magento developer:mode:set

Answer : php bin/magento deploy:mode:set developer

Which of the following is a front-end framework used in Magento?

1) jQuery

2) React

3) Vue.js

4) Angular

Answer : jQuery

What file is used to declare a custom module in Magento 2?

1) registration.php

2) module.xml

3) config.xml

4) etc/module.xml

Answer : module.xml

What command is used to check the status of all modules?

1) php bin/magento module:status

2) php bin/magento status:modules

3) php bin/magento module:check

4) php bin/magento status

Answer : php bin/magento module:status

What is the purpose of the `app/code` directory in Magento?

1) To store custom modules

2) To store core modules

3) To store theme files

4) To store configuration files

Answer : To store theme files

Which class is responsible for logging in Magento?

1) MagentoFrameworkAppObjectManager

2) MagentoFrameworkLogger

3) MagentoFrameworkAppLogger

4) MagentoFrameworkLoggerMonolog

Answer : MagentoFrameworkLoggerMonolog

What is the use of the `MagentoFrameworkFilesystem` class?

1) Handles file operations

2) Manages database connections

3) Handles HTTP requests

4) Caches configurations

Answer : Handles HTTP requests

Which of the following is used to create a product in Magento?

1) MagentoCatalogModelProductFactory

2) MagentoCatalogModelProductRepository

3) MagentoCatalogModelProduct

4) MagentoCatalogModelResourceModelProduct

Answer : MagentoCatalogModelProductFactory

What is the command to check for outdated Composer dependencies in Magento?

1) composer outdated

2) composer check

3) composer status

4) php bin/magento composer:outdated

Answer : composer outdated