Question

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 1.9.4.5 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.

Was it helpful?

Solution

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 1.9.4.5. 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 1.9.4.5

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 1.9.4.5 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 #~1.9.4.5
composer update
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top