Learn Magento MCQs
Prepare Magento MCQs (Multiple choice Questions) for exam and job interviews.
Which command is used to create a new Magento 2 module?
1) php bin/magento module:create
2) php bin/magento generate:module
3) php bin/magento setup:module:create
4) php bin/magento create:module
Answer : php bin/magento module:create
What is the file extension for Magento module registration files?
1) php
2) xml
3) txt
4) json
Answer : php
Which class is responsible for processing API requests in Magento?
1) MagentoWebapiModelRest
2) MagentoWebapiModelApi
3) MagentoWebapiModelRestRequest
4) MagentoWebapiModelRestResponse
Answer : MagentoWebapiModelRest
What is the command to generate a new class in Magento?
1) php bin/magento generate:class
2) php bin/magento make:class
3) php bin/magento create:class
4) php bin/magento generate
Answer : php bin/magento generate:class
Which database technology does Magento 2 support by default?
1) MySQL
2) PostgreSQL
3) SQLite
4) Oracle
Answer : MySQL
What is the purpose of the `app/etc/config.php` file in Magento?
1) To manage application configurations
2) To manage database connections
3) To manage module configurations
4) To manage theme configurations
Answer : To manage application configurations
What is the default cache type in Magento?
1) Full Page Cache
2) Block Cache
3) Config Cache
4) Layout Cache
Answer : Full Page Cache
Which class is used to send emails in Magento?
1) MagentoFrameworkMailTemplate
2) MagentoFrameworkMailEmail
3) MagentoFrameworkMailMessage
4) MagentoFrameworkMailTransport
Answer : MagentoFrameworkMailTemplate
What is the command to clear the cache in Magento?
1) php bin/magento cache:clean
2) php bin/magento clear:cache
3) php bin/magento cache:flush
4) Both a and c
Answer : Both a and c
Which of the following is a template file extension in Magento?
1) phtml
2) tpl
3) html
4) xml
Answer : phtml