🇺🇦 Proudly Ukrainian — every project with us helps support Ukraine's defense and lasting peace in Europe.

Meet the team →
← All articles

February 14, 2024

How to change URLs in magento installation

When you need create a copy of Magento live site on your local, dev or staging servers you will need change URLs in Magento to make it working.

How to change URLs in magento installation

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.

  1. 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.
  2. Login to mysql, e.g. mysql-u-userpp db
  3. Execute SQL query: select path, value from core_config_data where value like ‘http%’;
  4. Copy Magento site URL from SQL query results.
  5. Execute SQL query: update core_config_data set value=’your new URL’where value like ‘https://www.livemagentosite.com/’;
  6. Exit from mysql terminal: exit
  7. 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.

You can witness the practical application of this method by clicking on the link https://www.youtube.com/watch?v=oOqfHW22HvA&t=86s

Related articles

Tell us what you're building

03
Oleksii, mobile app developer at Skynix

"I'm Oleksii. I work hands-on with our team here at Skynix, turning ideas into real, working products. Tell me what you're building — I read every request myself and reply within one business day."

Oleksii Prozhoha — Skynix, working hands-on with the team
What do you need?
Attach a wireframe or screenshot — PNG or JPG up to 5 MB.

Read by Oleksii · reply within one business day.

bracket icon
bracket icon
bracket icon
bracket icon
bracket icon
bracket icon
slash icon
slash icon
slash icon
slash icon
slash icon
slash icon
bracket icon
bracket icon
bracket icon
bracket icon
bracket icon
bracket icon