0

I work as a freelancer and I am increasingly confronted with prospects who want to update their obsolete Magento 2 site to a newer version (example M2.3.0 > M2.4.6).
The problem is that many themes have brought big changes which makes upgrading the theme complicated, for example MGS/claue, it is even impossible to migrate claue v1 to v2 without creating a new site.

I concluded that there were two approaches:

Approach A: keep the site as it is and upgrade magento, change theme, disable/remove modules that can be disabled.

Approach B: Start from scratch on a clean magento 2 and migrate the data (customers, orders, etc.) + installation of a new theme.

The disadvantage of approach A is that it's rather “dirty” at the end there is a lot of obsolete data left in the database, but also in terms of modules in app/code.

For approach B, I don't know how to migrate the essential data between the two databases, for the M1 > M2 migrations there were the migration tools provided by Magento which were effective, is there a equivalent to do M2 to M2?

Are there other approaches?
How do you handle this kind of situation?
Thank you in advance for your thoughts and advice :-)

3 Answers 3

0

Upgrading an outdated Magento 2 site to a newer version can be a complex and challenging task, especially when the theme has significant changes. As you have rightly pointed out, there are two main approaches to this problem:

Approach A: Upgrade the existing site and make necessary changes This approach involves upgrading the Magento version, changing the theme, and disabling/removing modules that are no longer needed. While this approach may seem like a quick fix, it can leave behind a lot of obsolete data in the database and may not be the best option in the long term. Additionally, you may need to spend a lot of time debugging issues and making adjustments to ensure that everything works smoothly.

Approach B: Start from scratch on a clean Magento 2 and migrate essential data This approach involves starting from scratch with a clean Magento 2 installation and migrating essential data such as customers, orders, etc. to the new database. While this approach can be time-consuming, it is usually the best option for long-term maintenance and scalability. You can also take the opportunity to optimize your database, clean up unused data, and improve site performance.

To migrate data from an old Magento 2 site to a new one, there are a few options available:

  1. Use the Magento Data Migration Tool - this tool is designed to migrate data from an older version of Magento 2 to a newer version. It can be used to migrate products, customers, orders, categories, and other data. However, it may not be suitable for migrating custom data or non-Magento data.

  2. Use third-party migration tools - there are several third-party tools available that can help you migrate data from one Magento 2 site to another. These tools can be used to migrate custom data, extensions, and other non-Magento data.

  3. Manual migration - if you have a small amount of data to migrate, you can manually migrate it using CSV files or other data transfer methods.

When choosing an approach, consider the size and complexity of the site, the amount of data to be migrated, and the time and resources available. It's important to plan and prepare carefully to ensure a smooth transition to the new site.

1
  • Thanks for your answer, I also prefer approach B for the reasons you mentioned. can you please elaborate on the options you provide for migrating the data: Option 1 - To my knowledge, the Magento Data Migration Tool can only migrate data from M1 to M2? Is it possible to use it to migrate M2 to M2? If so can you indicate a link to the doc, github or other sources? Option 3 - Is transferring the entire tables a viable solution? Do you know all the tables containing the essential data? thanks a lot for your help
    – ljr95
    Apr 6, 2023 at 12:36
0

This is not a full solution. This is the way I would try it... If the theme is the only or the biggest issue, dump it and start with approach A. Upgrading the core. You may need to do a cleanup of zombie data later.
As a personal opinion, you should drip claue anyway. I did the mistake of purchasing it because the demo looked nice, but it turned out to be a coding standard nightmare and a performance killer because of all the modules it comes with that cannot be disabled or removed (most of them).
Also you might have other third party modules that are not compatible anymore with the new version. There is no silver bullet solution for this. Either remove it or get dirty and fix them. Take a deep breath and take them one by one.

If this approach hits a dead end, you can start from scratch by adding module by module. and to solve the migration problem, just do an install of a fresh magento over the existing database. in most cases it works with minor issues. (I may be terribly wrong on this one... I've seen some databases in the past....).

3
  • I find cleaning up zombie data can get frustrating very quickly because it's time consuming and not perfect. Of course, it also depends on the client's budget. I have never installed the claue theme but it is true that I find it relatively heavy in terms of integration, I think the Luma theme as a starting point is sufficient for a simple site instead of using a theme. I don't quite understand "just do an install of a fresh magento over the existing database", how do you achieve the transfer of essential data? thanks a lot for your help
    – ljr95
    Apr 6, 2023 at 12:55
  • if you provide to a clean magento install the env.php file where the db credentials are pointing to an existing database, magento will install over that database without removing data. It will basically just add what it needs to add and your data will still remain there. Of course there are a lot of things that can go wrong. but it's worth a try at least on a dev env.
    – Marius
    Apr 7, 2023 at 8:37
  • I understand, however, installing the db over an already existing magento db will not clean it. This solution is the same as approach A. That being said it might be a solution if Magento updates created problems with the database. I am looking for a solution to transfer only the essential data.
    – ljr95
    Apr 13, 2023 at 8:06
0

There is no one-size-fits-all type of approach. There are multiple angles to consider from the db being altered by N extensions (maybe not all following best practices) to the theme that is incompatible.

The steps to decide which way to go would be:

  • identify the list of extensions used and see if the client really needs all of them and would like to keep them
  • identify the customizations (rough number) done via the theme
  • guesstimate the effort to keep the existing theme with the new Magento version

There are many cases when things may look simple and you go down the rabbit hole due to the number of customizations done, references in CMS/content, stuff in the database that requires a certain verision of an extension and so on.

An easy check would be - use the db with a vanilla Magento and see what works and what does not. Then you can add on top of it the extensions and a fresh version of the theme.

The "clean" approach, you migrate the data and the extensions/features/theme step by step. This way you get control of the project in a proper way.

1
  • Hi thank you for your feedback, yes it is the "clean" approach that interests me. do you have a solution to transfer essential data? Thanks
    – ljr95
    Apr 13, 2023 at 8:11

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.