About Magento
Magento is a free open-source e-commerce platform that helps users to create online stores. It is the most popular content management system (CMS) used to build online stores and is compatible with the latest technologies like PHP7.
Magento 2 is also mobile-friendly, with responsive themes and easy checkout.
Magento command
In Magento, several commands are used for different purposes.
We run all these commands from the Magento root directory (The directory where Magento is installed).
Open the Magento root directory in terminal
You can open the Magento root directory in the terminal by simply opening the Magento root directory folder in the file explorer.
Now right-click on the mouse and select the “Open in Terminal” option.
It will open your Magento root directory in the terminal where you can execute your Magento commands.
Here you can execute your Magento commands.
Magento basic commands
- php bin/magento deploy:mode:show
- php bin/magento setup:upgrade
- php bin/magento setup:di:compile
- php bin/magento setup:static-content:deploy
- php bin/magento indexer:reindex
- php bin/magento cache:flush
deploy:mode:show
This command uses to check the current execution mode of Magento.
setup:upgrade
This command uses to install the new modules in Magento.
setup:di:compile
This command uses to compile code like Factories, Proxies, Interceptors, etc., and puts them in generated or var/generation directory.
setup:static-content:deploy
This command helps to write static files to the Magento 2 file system. It uses to optimize static files properly, allowing for a better user experience.
indexer: reindex
The Mangeto indexer: reindex command uses to update the transformed data as the data changes.
E.g.: when updating a product price the data should be reindexed to be correctly displayed on the frontend.
cache:flush
This command uses to remove all stored data from the cache, so it may affect the performance of other processes using the same storage.
Explore more about Magento commands.
Next Blog -> Magento 2 Area codes
Previous Blog -> Magento Architecture
Be the first to comment.