Hypernode Magerun Addons
Some additional commands for the excellent N98-magerun Magento command-line tool.
There are a few options. You can check out the different options in the Magerun docs.
Here's the easiest:
Create ~/.n98-magerun/modules/ if it doesn't already exist.
mkdir -p ~/.n98-magerun/modules/ mkdir -p ~/.n98-magerun2/modules/
Clone the hypernode-magerun repository in there
git clone https://github.com/Hypernode/hypernode-magerun.git ~/.n98-magerun/modules/hypernode-magerun
Link the repository for n98-magerun2
ln -s ~/.n98-magerun/modules/hypernode-magerun ~/.n98-magerun2/modules/hypernode-magerun
It should be installed. To see that it was installed, run magerun without any arguments to see if one of the new commands is in there.
Find available updates for installed modules
See if newer versions exist for your currently installed Magento 1 modules (local & community). I hear you say, Magento Connect already does this? Not really, as Magento Connect only contains Magento-registered modules. As it appears, about 20% of modules-in-the-wild are not registered with Magento.
This tool is a crowdsourced initiative: it will report the latest version of any module as seen in the wild. This does not necessarily mean a newer version is publicly available, just that it exists.
As of Feb 2016, it contains version information of over 500 installations.
Determine required patches
John Knowles maintains an excellent spreadsheet which links Magento versions with required patches.
Running this command will show you which patches you need for the current Magento version and which are already installed. Note that if a patch is installed and not listed in the
app/etc/applied.patches.list a false positive may be the result.
Get a (system).log analyses of the most frequent lines
Quickly reference the most common lines in the log file ordered by frequency.
Generate a boilerplate for Nginx http.magerunmaps
Outputs or saves a http.magerunmaps boilerplate containing your store setup for Nginx. Refer to the Hypernode Nginx documentation.
Fetches the VCL configuration from turpentine and applies it. Make sure turpentine is installed and configured correctly.
Flush all URL's in Varnish cache
Flush all URL's that were cached by varnish.
By default this command loads Magento's sitemap collection from which you can choose what sitemaps you want to crawl. If the store URL does not match the URL's in the sitemap you will be prompted several options (compare, replace, continue). For instance the old and new URL can be compared in a performance report. Additionally a sitemap can be loaded by specifying a path or URL.
Checking for weak admin credentials
n98-magerun hypernode:crack:admin-passwords -r best64 vendors
Check your site for weak admin credentials by attempting to brute force the password with popular password / variations.
Checking for weak admin credentials
n98-magerun hypernode:crack:api-keys -r best64 vendors
This command words exactly the same as the
hypernode:crack:admin-passwords except it attempts to crack the api_key of SOAP / XML-RPC users. All arguments are the same, check the commands
--help for details.
For development/testing (build package of your feature branch):
gbp buildpackage --git-pbuilder --git-dist=precise --git-arch=amd64
Building a .deb for release:
Then if everything is alright, upload the new version to your repository with something like dput
Currently, only the command
hypernode:perfomance is partially compatible with n98-magerun2.
Please contribute to make more commands available for n98-magerun2!