0
Magento 1.9.4 --> Magento 2.4.2-p1

I successfully ran the settings and data migration using the Magento Migration tool. Now I read up on how to transfer the Media Files over (product images) and the guide I'm looking at says:

Expect to manually transfer a few aspects of your site, such as images.

To copy the data over to Magento 2, we simply copy the M1:media folder over to M2:pub/media:

cp -r /path/to/magento1/media /path/to/magento2/pub

After that, we have to reindex the Magento 2 store with the following command:

php bin/magento indexer:reindex

Then recompile it:

php bin/magento deploy:mode:set production

Now, our website should have all our M1 products, along with their images.

My question is - can I do this via FTP? The reason being is running commands via SSH ROOT seems to cause a problem for us as the files change ownership and it needs to be chmoded afterwards to assign the correct ownership?

If I download the media directory to a local folder and then re-upload it to the new site's Media folder, do I still have to run those commands to reindex the Magento 2 store and recompile it?

Also - am I to copy /public_html/media/catalog/product or should I copy everything in the Media folder?


As per a request from @Nilesh Dubey here is my config.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
        xs:noNamespaceSchemaLocation="urn:magento:module:Magento_DataMigrationTool:etc/config.xsd">
    <steps mode="settings">
        <step title="Settings Step">
            <integrity>Migration\Step\Settings\Integrity</integrity>
            <data>Migration\Step\Settings\Data</data>
        </step>
        <step title="Stores Step">
            <integrity>Migration\Step\Stores\Integrity</integrity>
            <data>Migration\Step\Stores\Data</data>
            <volume>Migration\Step\Stores\Volume</volume>
        </step>
    </steps>
    <steps mode="data">
        <step title="Data Integrity Step">
            <integrity>Migration\Step\DataIntegrity\Integrity</integrity>
        </step>
        <step title="EAV Step">
            <integrity>Migration\Step\Eav\Integrity</integrity>
            <data>Migration\Step\Eav\Data</data>
            <volume>Migration\Step\Eav\Volume</volume>
        </step>
        <step title="Customer Attributes Step">
            <integrity>Migration\Step\Customer\Integrity</integrity>
            <data>Migration\Step\Customer\Data</data>
            <volume>Migration\Step\Customer\Volume</volume>
        </step>
        <step title="Map Step">
            <integrity>Migration\Step\Map\Integrity</integrity>
            <data>Migration\Step\Map\Data</data>
            <volume>Migration\Step\Map\Volume</volume>
        </step>
        <step title="Url Rewrite Step">
            <integrity>Migration\Step\UrlRewrite\Version191to2000</integrity>
            <data>Migration\Step\UrlRewrite\Version191to2000</data>
            <volume>Migration\Step\UrlRewrite\Version191to2000</volume>
        </step>
        <step title="Log Step">
            <integrity>Migration\Step\Log\Integrity</integrity>
            <data>Migration\Step\Log\Data</data>
            <volume>Migration\Step\Log\Volume</volume>
        </step>
        <step title="Ratings Step">
            <integrity>Migration\Step\Ratings\Integrity</integrity>
            <data>Migration\Step\Ratings\Data</data>
            <volume>Migration\Step\Ratings\Volume</volume>
        </step>
        <step title="ConfigurablePrices step">
            <integrity>Migration\Step\ConfigurablePrices\Integrity</integrity>
            <data>Migration\Step\ConfigurablePrices\Data</data>
            <volume>Migration\Step\ConfigurablePrices\Volume</volume>
        </step>
 <!--       <step title="OrderGrids Step">                   -->
 <!--           <integrity>Migration\Step\OrderGrids\Integrity</integrity>       -->
 <!--           <data>Migration\Step\OrderGrids\Data</data>                      -->
  <!--          <volume>Migration\Step\OrderGrids\Volume</volume>                 -->
 <!--       </step>                                                              -->
        <step title="Tier Price Step">
            <integrity>Migration\Step\TierPrice\Integrity</integrity>
            <data>Migration\Step\TierPrice\Data</data>
            <volume>Migration\Step\TierPrice\Volume</volume>
        </step>
   <!--     <step title="SalesIncrement Step">                                         -->
   <!--         <integrity>Migration\Step\SalesIncrement\Integrity</integrity>           -->
   <!--         <data>Migration\Step\SalesIncrement\Data</data>                         -->
   <!--         <volume>Migration\Step\SalesIncrement\Volume</volume>                  -->
   <!--     </step>                                                                    -->
        <step title="Inventory Step">
            <integrity>Migration\Step\Inventory\Integrity</integrity>
            <data>Migration\Step\Inventory\Data</data>
            <volume>Migration\Step\Inventory\Volume</volume>
        </step>
        <step title="PostProcessing Step">
            <data>Migration\Step\PostProcessing\Data</data>
        </step>
    </steps>
    <steps mode="delta">
        <step title="Customer Attributes Step">
            <delta>Migration\Step\Customer\Delta</delta>
            <volume>Migration\Step\Customer\Volume</volume>
        </step>
        <step title="Map Step">
            <delta>Migration\Step\Map\Delta</delta>
            <volume>Migration\Step\Map\Volume</volume>
        </step>
        <step title="Log Step">
            <delta>Migration\Step\Log\Delta</delta>
            <volume>Migration\Step\Log\Volume</volume>
        </step>
        <step title="ConfigurablePrices step">
            <delta>Migration\Step\ConfigurablePrices\Delta</delta>
            <volume>Migration\Step\ConfigurablePrices\Volume</volume>
        </step>
        <step title="Tier Price Step">
            <delta>Migration\Step\TierPrice\Delta</delta>
            <volume>Migration\Step\TierPrice\Volume</volume>
        </step>
        <step title="Url Rewrite Step">
            <delta>Migration\Step\UrlRewrite\Version191to2000Delta</delta>
            <volume>Migration\Step\UrlRewrite\Version191to2000</volume>
        </step>
        <step title="OrderGrids Step">
            <delta>Migration\Step\OrderGrids\Delta</delta>
            <volume>Migration\Step\OrderGrids\Volume</volume>
        </step>
        <step title="SalesIncrement Step">
            <delta>Migration\Step\SalesIncrement\Delta</delta>
            <volume>Migration\Step\SalesIncrement\Volume</volume>
        </step>
        <step title="Inventory Step">
            <delta>Migration\Step\Inventory\Delta</delta>
            <volume>Migration\Step\Inventory\Volume</volume>
        </step>
    </steps>
    
    
     <source>
        <database host="localhost" name="name_of_database_Magento1" user="user_of_database_Magento1" password="password_of_database_Magento1"/>
    </source>
    <destination>
        <database host="localhost" name="name_of_database_Magento2" user="user_of_database_Magento2" password="password_of_database_Magento2"/>
    </destination>
    
    
    
    
    
    <options>
        <map_file>etc/opensource-to-opensource/1.9.4.0/map.xml.dist</map_file>
        <eav_map_file>etc/opensource-to-opensource/map-eav.xml.dist</eav_map_file>
        <eav_document_groups_file>etc/opensource-to-opensource/eav-document-groups.xml.dist</eav_document_groups_file>
        <eav_attribute_groups_file>etc/opensource-to-opensource/eav-attribute-groups.xml.dist</eav_attribute_groups_file>
        <log_map_file>etc/opensource-to-opensource/map-log.xml.dist</log_map_file>
        <log_document_groups_file>etc/opensource-to-opensource/log-document-groups.xml.dist</log_document_groups_file>
        <settings_map_file>etc/opensource-to-opensource/settings.xml.dist</settings_map_file>
        <customer_map_file>etc/opensource-to-opensource/map-customer.xml.dist</customer_map_file>
        <customer_document_groups_file>etc/opensource-to-opensource/customer-document-groups.xml.dist</customer_document_groups_file>
        <customer_attribute_groups_file>etc/opensource-to-opensource/customer-attribute-groups.xml.dist</customer_attribute_groups_file>
        <delta_document_groups_file>etc/opensource-to-opensource/deltalog.xml.dist</delta_document_groups_file>
        <order_grids_document_groups_file>etc/opensource-to-opensource/order-grids-document-groups.xml.dist</order_grids_document_groups_file>
        <map_document_groups>etc/opensource-to-opensource/map-document-groups.xml.dist</map_document_groups>
        <class_map>etc/opensource-to-opensource/class-map.xml.dist</class_map>
        <tier_price_map_file>etc/opensource-to-opensource/1.9.4.0/map-tier-price.xml.dist</tier_price_map_file>
        <stores_map_file>etc/opensource-to-opensource/map-stores.xml.dist</stores_map_file>
        <!--
        In case bulk_size=0 it will be auto-detected for every document.
        -->
        <bulk_size>0</bulk_size>
        <!--
        Set direct_document_copy = 1 for better performance.
        NOTE: 'source' and 'destination' databases MUST be placed on the same MySQL instance
        and 'destination' user MUST be granted with 'SELECT' permissions on 'source' database
         -->
        <direct_document_copy>0</direct_document_copy>
        
        
        
         <source_prefix>aa_</source_prefix>
         <dest_prefix>bbcc_</dest_prefix>
        
        
        
        <auto_resolve_urlrewrite_duplicates>0</auto_resolve_urlrewrite_duplicates>
        <log_file>migration.log</log_file>
        <progress_bar_format>%percent%% [%bar%] Remaining Time: %remaining%</progress_bar_format>
        <upgrade_customer_password_hash>1</upgrade_customer_password_hash>
        <edition_migrate>opensource-to-opensource</edition_migrate>
        <edition_number>1.9.4.0</edition_number>
        <init_statements_source>SET NAMES utf8;</init_statements_source>
        <init_statements_destination>SET NAMES utf8;</init_statements_destination>
       <crypt_key>akdfhaofsdjfjasdfsdu</crypt_key>
    </options>
</config>

UPDATED again on July 13th, 2021:

I am now using FTP to download all folders and subfolders in the Media directory on Magento 1 with the plan of re-uploading this to Media in Magento 2. Looking at the subdirectories of my Magento1/public_html/media directory:

captcha
catalog 
css 
css_
secure 
customer 
dailydeal 
dhl 
downloadable
email 
favicon 
import 
js 
magpleasure 
porto 
smartwave 
tmp 
wysiwyg
xmlconnect 
.htaccess

It seems that some of these folders have to do with the Porto theme which I will install and configure fresh for Magento 2 and also some extensions which again I will install specifically in their Magento 2 versions.

Would someone be able to advise which of these subcategories can be skipped when re-uploading the Media folder to the new Magento 2?


ANSWER on July 14th, 2021:

The following directories are Magento default folders which need to be copied:

 1. catalog
 2. customer
 3. dhl
 4. downloadable
 5. xmlconnect 

Do not copy the .htaccess!

2
  • Can you please share the config.xml file (remove the cred info). If possibel Jul 13, 2021 at 20:16
  • @Nilesh Dubey - I have now published my config.xml in my original post above.
    – Allysin
    Jul 13, 2021 at 21:18

1 Answer 1

1

Yes, you can use FTP.

As per your concern about the file ownership issue. Actually It depends on the server if you are using SiteGround then you won't face any issue. If you are using Cloudways, they provide an option in the App section to reset files ownership.

But using FTP if you have both Magento 1 and 2 on the same server will take more time. If you are planning to upload the zip and unzip by command then also you will face the same permission issue.

The best way will be to have chat with the server spoke person and get the best from your host

All media files (images for products, categories, the WYSIWYG editor, and so on) should be copied manually from your Magento 1 install media folder to your Magento 2 install pub/media folder.

Then just run reindex command ( even this also optional ).

3
  • Thank you for your answer. I am KISS (Keep It Simple Stupid) kind of a person so I am currently downloading all folders and files from Magento 2/public_html/media folder via FTP. I wonder if all the folders are necessary though? I have the following in my Media folder: captcha, catalog, css, css_secure; customer; dailydeal; dhl; downloadable; email; favicon; import; js; magpleasure; porto; smartwave; tmp; wysiwyg; xmlconnect; I have purchased all the extensions specific for M2 and will get them installed afterwards. Please let me know if I can skip any of these subdirectories. Thanks.
    – Allysin
    Jul 13, 2021 at 21:23
  • Regarding what you suggested to 'have a chat with the server spoke person and get the best from your host' - what exactly should I tell them/ask for? Thanks.
    – Allysin
    Jul 13, 2021 at 21:36
  • @Allysin- Ask them about the file permission and chown command, if you are facing a permission issue and about skipping comments then you do it step by step. set priority to product/catalog one than go for other, In this way, you will come to know what you need to skip and whatnot, and thanks for updating the config.xml file Jul 14, 2021 at 9:40

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.