Can you guess who is better than a certified developer for a Magento based online store? A smart magento developer! There is no dearth of open source tools out there which can be leveraged for a smarter Magento development. But which one you should go after?
I recommend n98-Magerun. There is a reason they call it the ‘Swiss Army Knife’ for Magento developers.
Magerun is an open source tool which is extremely handy for all Magento developers out there. It can save hours of work by reducing the effort of routine tasks such as accessing the admin or running complex commands.
We as a company have been using Magerun to better our efficiencies when it comes to Magento development projects. I have listed few tips to show how n98-magerun can be used by magento developers to enhance their efficiency and eventually get better results.
List all modules
If you want to investigate the modules installed in your magento instance, simply run the below command. It will list out all the modules. Going to Admin panel, checking the list will take time and you cannot save the list if required.
- $ n98-magerun.phar sys:modules:list
In Magento clearing cache will solve many problems. To do this we usually go to admin panel and will do cache refresh or clear. To save the time to login and going to the cache management screen use the following command.
- $ n98-magerun.phar cache:flush
For re-indexing run the below command. It has options to re-index a specific indexer. It is so easy with n98-magerun.
- $ n98-magerun.phar index:reindex:all
If cron is not running properly. To check whether cron ran or not run below command for its history.
- $ n98-magerun.phar sys:cron:history
If it didn’t ran use below command to run it
- $ n98-magerun.phar sys:cron:run
You have the DB dump and application with you but not the admin username and password. Just create admin user using below command.
- $ n98-magerun.phar admin:user:create [username] [email] [password] [firstname] [lastname] [role]
- $ n98-magerun.phar admin:user:change-password [username][password]
While working with different instances of application. We may need to export and import DB. It is quite a taxing routine task. It can be done easily using below command.
- $ n98-magerun.phar db:dump [filename]
- $ n98-magerun.phar db:import [filename]
If you want to exclude customers data, sales data.
- $ n98-magerun.phar db:dump -s @development [filename]
Many plugins are available to extend the features of the tool. The below provided links will tell you more about how to extend its features and make it more advanced tool for your Magento.
Follow this link to learn more about – https://github.com/netz98/n98-magerun
For list of all commands – https://github.com/netz98/n98-magerun/wiki/Commands
I hope you have found these tips useful. Do let me know your views or queries in the comments section below. At Sigma, we are focused on delivering smarter & innovative Magento solutions which deliver better ROI to a merchant’s investment on Magento.