Magento is a powerful e-commerce platform used by countless businesses to establish their online presence. Whether you’re launching a new store or looking to rebrand an existing one, there may come a time when you need to change the URLs of your Magento installation. This could be due to a variety of reasons, such as updating your domain name, restructuring your site, or optimizing for better SEO practices. Whatever the case, it’s essential to handle URL changes correctly to ensure a seamless transition for both your customers and search engines. In this guide, we’ll walk you through the process of changing URLs in a Magento installation step by step.
- Backup Your Website: Before making any changes to your Magento installation, it’s crucial to create a backup of your website. This ensures that you have a copy of your site in case anything goes wrong during the URL change process. You can backup your Magento files and database using tools like phpMyAdmin or through your hosting provider’s control panel.
- Login to mysql, e.g. mysql-u-userpp db
- Execute SQL query: select path, value from core_config_data where value like ‘http%’;
- Copy Magento site URL from SQL query results.
- Execute SQL query: update core_config_data set value=’your new URL’where value like ‘https://www.livemagentosite.com/’;
- Exit from mysql terminal: exit
- In your magento folder execute command: ./bin/magento cache:flush
By following these steps, you can successfully change URLs in your Magento installation without negatively impacting your website’s performance or SEO rankings. Remember to proceed with caution, make backups, and test thoroughly to ensure a smooth transition for your users and search engines alike.