Packaging a Magento extension in CE 1.5+ has changed due to the creation of Magento Connect 2.0 – this document reflects those changes. If you have questions, please refer to the Magento Connect forum for further guidance.

This admin page will help to package your extensions, such as modules, add-ons, language packs, interfaces and themes, into CONNECT packages which you could upload to MagentoConnect and share with other community members.

For starting on extension packaging process, log in to Magento Admin panel and go to :

Admin Panel: » System » Magento Connect » Package Extensions

You can easily follow the 5 step process there to generate the extension that are described in the remaining article.

The extension packaging process includes generation of package.xml file with information about the package collected by the 5 steps below, and archiving content files and folders specified by the Contents step.

After package release is uploaded to MagentoConnect, it will be available for download and installation for other members, by pasting extension key into MagentoConnect downloader.

After all steps have been completed, you can click “Save” button to save package for future retrieval by clicking “Load” button.

Also you can generate the release package by clicking on “Save data and Create Package” button, which will validate information and create .tar.gz file in var/connect that you can upload to MagentoConnect.

NOTES: Please be aware of the following guidelines when packaging an extension. These are important and if entered wrong in packaging, could give you problems when uploading.

Extensions are case sensitive: Make sure the package name reflects accordingly in all folders and xml files. e.g. MyExtension is not same as Myextension.

Do not put spaces in the package name: The package name must NOT have space inside. For example, use Foo_Bar, don’t use “Foo Bar”. You will have ”There was a problem saving package data” when you save the extension if there is space inside the module name.

ZLIB Requirements: Make sure you have zlib enabled in your php cli. Typically it is under “/usr/local/bin/php”. Otherwise you won’t be able to generate the package.

Authors of the package, user names the same as in MagentoConnect Only LEAD authors can upload releases The User field is your magentocommerce.com user name (found under My Account, User Name and Password). Don’t use your screen name here.

Path: Path within the role (location). The path is relative to role directory. ex: Magento Community Module file is relative to app/code/community/ ; Magento Global Configuration is relative to app/etc/ ...

*IMPORTANT NOTE:* For broader extension support for free (unpaid) community extensions, it is best to package using pre-1.5.0.0 option. When uploading the 1.0 version from var/pear – Magento Connect will make the 2.0 version for you. If you wish to only support 1.5 and higher versions of Magento only then only upload the 2.0 file from the var/connect directory to Magento. If you are trying to create separate packages (such as to upload both a 1.0 and 2.0 version to your site for a PAID extension, or if you want different version numbers for different releases) then you must select both options when packaging which generates both 1.0 and 2.0 file types.

Make sure that you add this information to your extension description so that merchants are aware of the supported versions of your extensions.

Additionally, if you have previously uploaded a 1.5+ (2.0 only) extension and would like it to have support for Pre 1.5 (1.0) as well, repackage the existing extension with a new version number but be sure to upload the file from the var/pear directory when adding to Magento Connect. This will update both versions but also give you a 1.0 version fro Pre 1.5.