Ask your Question

Discover our new Professionals

Nitish
Nitish

Implementing Facebook pixel in ecommerce platform

Noida,  India
Ritu
Ritu

Professional Content Writer

Delhi,  India
Jaskaran
Jaskaran

Web Developer

Noida,  India
Akashdeep
Akashdeep

Mohali,  India
Shraddha
Shraddha

HR professional

Slough,  United Kingdom

Write to us

Ask Question

Magento 2 Interview Questions

  • 1 In which directory we can write our own custom module in Magento2

    app/code
  • 2 In which directory we write our own custom module in Magento2

     If we need to create our own module e.g Hello World then we define it in

    app/code folder. It will be app/code/VendorName/moduleName.

    e.g : app/code/Letsknowit/Hello_world.

  • 3 From where in admin panel we can enable/disable cache

    Admin->System->Tools->Cache Management

  • 4 What is the command to enable/disable a module in Magento2

    php bin/magento module:enable module_name

    php bin/magento module:disable module_name

  • 5 Which method a controller loads by default in Magento2

     execute method

    public function execute()

        {

        }

  • 6 How to enable/disable module in magento2

    To enable we need to run
         php bin/magento module:enable Namespace_modulename
      
       e.g php bin/magento module:enable Letsknowit_Custommodule
     
        to disable we need to run 
        
        php bin/magento module:disable Namespace_modulename
      
       e.g php bin/magento module:disable Letsknowit_Custommodule
  • 7 What is the command to know the status of all modules in magento2

     php bin/magento module:status

  • 8 What is the command to clear and flush magento cache

     To clean the cache 

      php bin/magento cache:clean
      To flush cache
      php bin/magento cache:flush