I found this https://www.openmage.org/magento-lts/migration-guide.html but I had trouble making it work. I was able to clone the repos and make the patch, but the patch wouldn't apply, and I also wasn't clear on if I should git init a new repo on my Magento site I'm porting or not.

Basically I have an existing site with lots of extensions, and I want to port it to OpenMage LTS using git so that future updates will be easier with just a "git pull". What is the best way to handle this? Step by step please.

For now I cloned the OpenMageLTS to a blank directory, then copied over the .git and files to my existing site overwriting the core Magento files. Should I then just exclude the existing files from git, and git pull in the future and call it a day? I feel like that's not the right way but I'm not sure.

1 Answer 1


The solution mentioned below is the method I used to convert our website to OpenMage.

Because I can't stress this enough:

Make a backup
First try on a staging environment

As from your question it's not apparent whether you installed the system via composer or just by downloading the files, the way you phrased it leads me to think you used the latter method.

The guide first says that it's good if you update to the latest Magento 1 version currenctly I would suggest you follow the default magento procedure for updating which works most of the time.

I've been using this quick reference for ages without issues

Let's upgrade to Magento

Tools used in this part:

cd <root magento installation directory>
touch maintenance.flag
chmod +x mage
php downloader/mage.php mage-setup .
php downloader/mage.php sync --force
php downloader/mage.php install http://connect20.magentocommerce.com/community Mage_All_Latest --force
rm -rf var/cache/* var/session/* var/locks/* var/full_page_cache/* tmp/*
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
chmod +x mage
php shell/indexer.php reindexall

#upgrade everything 
php downloader/mage.php upgrade-all --force

n1 index:reindex:all
n1 cache:dir:flush
rm maintenance.flag

You should have magento now.

Let's install OpenMage

For installing OpenMage it's best if you learn a bit about composer first and how to integrate with magento.

The tools we're using for this are
composer require --no-update  magento-hackathon/magento-composer-installer #="3.2.*"
composer update --no-plugins --no-scripts magento-hackathon/magento-composer-installer
composer require aydin-hassan/magento-core-composer-installer #~1.2

In order for these to work we need to setup some configuration options

composer config extra.magento-deploystrategy "copy"
composer config extra.magento-force "true"
composer config extra.magento-core-package-type "magento-source"

These config options will tell composer how to install the files for modules and the core.

Finally you need to install the openmage core

composer require openmage/magento-lts #~
composer update
  • thank you, and what about Magento extensions in the app/code/Community folder, when I change to Magento Composer version where do those go? (these do not have packagist versions) Commented Jul 5, 2020 at 9:43
  • No problem, there are 3 ways to install extensions. 1. normally with uploading the files. 2. using modman and 3 using composer. All 3 ways are interchangeable but if you install one extension using one way of them, you should keep using that. Otherwise you have to clean it up before you install it with composer. You can always use composer for new installations of new extensions that support it though.
    – gabtzi
    Commented Jul 6, 2020 at 11:09
  • I haven't had any issues mixing the installation types so far.
    – gabtzi
    Commented Jul 6, 2020 at 11:10
  • I have gotten openmage installed using your instructions in htdocs folder, but now my question is what do I do with all this site's files that are still in the main folder which correspond to the original site extensions, template files, media, etc/config.xml etc? Should I move them to the htdocs folder? Then set the nginx.conf to read from htdocs folder as the root? Commented Jul 9, 2020 at 4:15
  • I have moved my stuff from main folder app/code/Community/* different stuff there, and other folders to their matching location in htdocs. Now next time I update with composer update openmage/magento-lts the stuff in htdocs/app/code/Community, htdocs/media, etc won't be deleted right? The composer-core-installer somehow intelligently knows not to overwrite or delete that stuff? Commented Jul 9, 2020 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.