Can I migrate categories and products SEO URLs from WooCommerce to Magento?

Yes, you can migrate SEO URLs from WooCommerce to Magento by picking “Migrate categories and products SEO URLs” additional option.

Q: How my URLs will look like after the migration?

Here’s a vivid example of how “Migrate categories and products SEO URLs” additional option works like in practice.

Let’s assume that one of the products you’re currently selling on WooCommerce store is named “Hair Spray”. It has the following URL:
http://woocommerce-store.com/product/pillow-spray/

The URL of its category is:
http://woocommerce-store.com/product-category/test-category/

Can I migrate categories and products SEO URLs from WooCommerce to Magento?

After migrating to Magento (with the “Migrate SEO URLs” option picked), the “Hair Spray” product URL will look like the following:
http://magento-store.com/index.php/pillow-spray.html

The URL of its category is:
http://magento-store.com/index.php/test-categoty.html

Can I migrate categories and products SEO URLs from WooCommerce to Magento?

Q: Can I get rid of .html suffix at the end of my product and category links on Magento?

By default, product and category URLs on Magento have .html suffix at the end. However, you can remove it manually via your Magento Admin Panel.

To do this, login your Magento Admin Panel and go to: System -> Configuration -> Catalog (from the menu on the left) -> Search Engine Optimizations.

Can I migrate categories and products SEO URLs from WooCommerce to Magento?

Here, delete the .html suffix from the “Product URL Suffix” and “Category URL Suffix” fields and leave them empty. Save the changes.

Can I migrate categories and products SEO URLs from WooCommerce to Magento?

Afterwards, it’s obligatory to clear your Cache and perform Reindex to apply the changes. Please, see detailed instructions on how to do that.

Q: Can I remove /index.php/ from my product and category links on Magento?

Again, by default, all Magento product and category URLs have /index.php/ within their structure. To remove /index.php/ from the URLs, you need to modify your .htaccess file.

Go to your Magento root folder via FTP manager, find .htaccess file and open it as a text file. Then, look up if there’s <IfModule mod_rewrite.c> block. If so, paste the following code right after the line that contains RewriteBase:

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

If you couldn’t spot the <IfModule mod_rewrite.c> block, then simply paste the following piece of code to the bottom of the .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Afterwards, it’s recommended to clear your Cache and perform Reindex. Please, see detailed instructions on how to do that.

Q: My products on WooCommerce had /product/ within their URLs, but there’s no /product/ part on Magento. What should I do?

WooCommerce and Magento have different URL structures, so all your new products created on Magento won’t have the /product/ part in their links.

However, for SEO purposes, you may set mass redirect, from, for example, http://woocommerce-store.com/product/pillow-spray/ to http://magento-store.com/pillow-spray and all the other products migrated to from WooCommerce to Magento. To do so, you’ll need to modify your .htaccess file once again.

Go to your Magento root folder via FTP manager, find .htaccess file and open it as a text file. Then, look up if there’s RewriteEngine on line. If so, paste the following code right after this line:

RewriteCond %{REQUEST_URI} ^/product/[\w-\?\.=]+
RewriteRule .product/(.) http://magento-store.com/$1 [R=permanent,L]

If there’s no writeEngine on line, then simply paste the following piece of code to the bottom of the .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine on

RewriteCond %{REQUEST_URI} ^/product/[\w-\?\.=]+
RewriteRule .product/(.) http://magento-store.com/$1 [R=permanent,L]
</IfModule>

In both cases, there’s should be your Magento store’s URL instead of http://magento-store.com/. Please note that there should be “$1” in the end of the URL, as it’s given in the example above.

Afterwards, it’s recommended to clear your Cache and perform Reindex. Please, see detailed instructions on how to do that.

As the result, the manipulations described above will allow us to preserve search engine rankings and avoid losing referral / direct traffic through old URLs. All customers trying to reach your products via old WooCommerce URLs (i.e. http://woocommerce-store.com/product/pillow-spray) will be redirected to new Magento URLs (i.e. http://magento-store.com/pillow-spray) without .html or /index.php/.

Posted in: Additional Options