Magento 1.5 mage command-line
Magento 1.5 has moved the built-in downloader away from the original PEAR-architecture towards their own: Instead of working with PEAR-packages, third party extensions are now installed through a specific Magento format, and the Magento application ships with a new script mage to deal with this. This blog gives you an introduction on what the tool can do for you.
Getting mage up and running
The mage command can only be used from the command-line - in other words, if you have only FTP-access, this information is of no value. But if you're a UNIX geeks fond of SSH, this is where the fun stuff of Magento starts. First of all, the mage script needs to be made executable:
# chmod 700 mage
You might also give it less restricive permissions (depending on your hosting environment):
# chmod 777 mage
First round
By running the command without parameters, you are given a short preview of what is hidden away:
# ./mage Connect commands available: =========================== channel-add Add a Channel channel-alias Specify an alias to a channel name channel-delete Remove a Channel From the List channel-info Retrieve Information on a Channel channel-login Connects and authenticates to remote channel server channel-logout Logs out from the remote channel server clear-cache Clear Web Services Cache config-get Show One Setting config-help Show Information About Setting config-set Change Setting config-show Show All Settings convert Convert old magento PEAR package to new format download Download Package info Display information about a package install Install Package install-file Install Package Archive File list-available List Available Packages list-channels List Available Channels list-files List Files In Installed Package list-installed List Installed Packages In The Default Channel list-upgrades List Available Upgrades package Build Package package-dependencies Show package dependencies package-prepare Show installation information of package sync Synchronize Manually Installed Packages sync-pear Synchronize already Installed Packages by pear uninstall Un-install Package upgrade Upgrade Package upgrade-all Upgrade All Packages
Looking for extensions
As you can see, most of the commands are ment for dealing with extensions - installing them, removing them, upgrading them. For instance, we can display a list of all the current Magento 2.0 extensions installed:
# ./mage list-installed
But we can also check for extensions that are not yet installed:
# ./mage list-available
This gives a listing of all the extensions available in the configured channels. By default, only the community channel is availabe. A couple of Yireo extensions are also listed here:
# ./mage list-available | grep -i yireo
Upgrading Magento
When you want to upgrade Magento, it is first of all needed to have the package Mage_All_Latest installed. This can be done with the following command:
# ./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force
We just added the --force attribute to make sure this is executed regardless of whether something is conflicting or already installed. After this, we can check for new upgrades:
# ./mage list-upgrades
And we can upgrade:
# ./mage upgrade-all
Adding new channels
As mentioned earlier, by default, only the community channel exists:
# ./mage channel-add http://connect20.magentocommerce.com/community
But in the near future, we might see third party extensions being delivered over custom channels. For instance, if we of Yireo are up to it, we could create a specific Yireo channel filled with Magento extensions: Instead of buying all extensions individually, we could just give you access to the yireo channel instead. Exciting stuff.
Switching from stable to beta
Within the Magento Downloader application, the preferred state is also stored: By default, this is stable, but if you want to switch to beta-packages, you can use the mage command as well:
# ./mage config-set preferred_state beta
Other options
Further options include more ways to handle extensions, but some other options probably need some more thorough documentation. For instance, the configuration-options allow to use a remote FTP-server for installing extensions. This would allow one extension-provider to install a Magento extension over FTP:
# ./mage config-set remote_config ftp://name:password@host.com:port/path/to/folder/
Another option allows to reset the XML-RPC / REST cache, but it's not yet clear why:
# ./mage clear-cache
Hope you find the above useful.
Created on Monday, 28 March 2011Modified on Monday, 28 March 2011
More tutorials in this section
- Troubleshooting ByAttribute
- Solving Magento 404s with Joomla! Dynamic404
- Next level templating with MageBridge
- Content Plugin in MageBridge
- Some nice videotutorials on Magento.
- Selling a single product
- Tagging in MageBridge
- MageBridge performance tricks
- Hiding conflicting JavaScript with MageBridge
- Plugging things into MageBridge
- MageBridge hidden features: Disable JavaScript
- Revolutionary in Magento, basic stuff in Joomla!
- World-writable permissions in Magento
- Yireo migration (4): CSS3
- Yireo migration (3): Performance
- What should be in MageBridge 1.3?
- PHP 5 is outdated
- Joomla! 1.6 custom profiles
- Handling Magento errors
- Upgrade of template-patches
- Open source dumpware
- E-commerce is not just selling products
- Hidden secrets: MageBridge products module
- Yireo reborn
- Switch between HTTP and HTTPS looses PHP-session
- RocketTheme and YooTheme templates for Magento
- Why pay for MageBridge?
- MageBridge on Joomla!Days NL
- Braindumps on a Magento bridge in Joomla!
- Book-review Joomla! Web Security
- Mage::Camp presentation on MageBridge
- Comparing VirtueMart and Magento
- Vulnerabilities in Magento 1.2
- Magento Commerce Security Vulnerabilities
- We have a newsletter!
- Help us improve!
- MageBridge Live Soon
- Yireo has started
- Magento 2.0 from scratch
- This is still MageBridge
- MageBridge is free
- Yireo sponsoring Joomla!Day UK
- Joomla! 1.6 bootcamp on 25th of November 2010
- Magento 1.4 and PHP Deprecated warnings
- Thanks for Joomla!Day UK 2010
- MageBridge URL Replacements
- New MageBridge template-patch for JoomlArt Purity II
- Bad MageBridge sites
- MageBridge for RocketTheme Hybrid
- Forcing redirects for usage with Dynamic404
- MageBridge Standard and MageBridge Enterprise
- How to trust payment providers?
- What do I need to get a MageBridge webshop?
- Migrate to Magento using Vm2Mage and MageBridge
- Interview with Jisse Reitsma
- Dynamic404 to fix VirtueMart 404s
- New MageBridge template-patch for JA Social
- Magento 1.4.2.0 and MageBridge
- RocketTheme Paradox for MageBridge
- Howto disable MailTo component
- MageBridge on Podcast of JoomStew and Bob Bloom
- Part 2 of the Bob Bloom podcast with MageBridge
- YOOtheme Pure for MageBridge
- Arrival of Joomla! 1.6
- Another great 1.6 Bootcamp
- Joomla! 1.6 Bug Event in Amsterdam
- Magento at Webwinkel Vakdagen
- Partner XLS Hosting and Magento VPSs
- Fancybox for Joomla! 1.6 released
- High priority security-fix Magento 1.5.0.1
- Free trial for MageBridge
- New MageBridge patch for YOOtheme Vanilla
- Modified build process of MageBridge
- MageBridge 1.6 for Joomla! 1.6
- MageBridge backend-demo based on Joomla! 1.6
- Introducing Yireo labs
- Introducing FLEXIcontent labs
- What's new in MageBridge thanks to Joomla! 1.6?
- Joomla! enterprise - small but noticable
- Dutch Magento usergroups
- April 7th: Free Dutch Magento seminar on fulfilment
- We'er moving our servers
- Magento 1.5 mage command-line
- JoomlaDays NL 2011
- Windows 7, Google Chrome, Magento admin cookie problem
- RT Mercado for MageBridge
- Vm2Mage comes to life
- New version of Joomla! ScriptMerge
- Measure Page Load Time with Site Speed Analytics Report
- MageBridge patch for YOOtheme Nano
- Jdoc-tags in Magento PHTML
- RocketTheme Entropy and YOOtheme Milk for MageBridge
- Magento 2.0 - where is it?
- Schedule your tweets
- Pointing to each other for support
- Conditional load of jQuery
- XLSHosting offers MageBridge VPS
- Magento Shop By Brand or Manufacturer
- RT Nebulae for MageBridge
- Magento Developers Paradise 2011 - Day 1
