Magento 1.x includes the mage script, a command‑line tool that allows you to manage Magento Connect extensions without using the web interface. On ruachost.com, this is useful for automation, cron jobs, and troubleshooting.

 

Why Use the Command Line?

  • Faster than using the Magento admin panel.

  • Enables automation with cron jobs.

  • Useful for bulk extension management.

  • Provides more control for developers.

 

About the Mage Script

  • The mage script is included with Magento 1.x by default.

  • It is located in the Magento installation directory.

  • Magento 2 does not use the mage script — it has its own CLI tool.

 

Configuring the Mage Script

  1. Log in to your hosting account via SSH.

  2. Navigate to your Magento installation directory:

    Bash
    
    cd ~/public_html
    
     
  3. Set permissions:

    Bash
    
    chmod 700 mage
    

     

  4. Run the mage script:

    Bash
    
    ./mage
    
     

Common Commands

List Installed Extensions

Bash

./mage list-installed

List Available Extensions

Bash

./mage list-available
 

Install an Extension

Bash

./mage install community <extension_name>

Download an Extension Without Installing

 
Bash

./mage download community <extension_name>


Install from a File

 
Bash

./mage install-file <filename>


Upgrade Extensions

  • Upgrade all extensions:

    Bash
    
    ./mage upgrade-all
    
  • Upgrade a specific extension:

    Bash
    
    ./mage upgrade community <extension_name>
    

     

Uninstall an Extension

Bash

./mage uninstall community <extension_name>
 

Automating with Cron Jobs

You can automate extension upgrades with cron. Example: upgrade all extensions every Sunday at 2:00 AM:

Bash

./mage uninstall community <extension_name>
​
 

Important Notes

  • The mage script only applies to Magento 1.x.

  • Magento 2 uses its own CLI tool (bin/magento).

  • Always back up your site before installing or upgrading extensions.

  • Use the community channel unless you add a third‑party channel with:

    Bash
    
    ./mage channel-add <channel_url>
    
    
    
 
¿Le ha resultado útil esta respuesta? 0 Los usuarios encontraron esto útil (0 Votos)

Powered by WHMCompleteSolution