How to Change Magento 2 Base URL

How to Change Magento 2 Base URL

Magento 2 store URL may not be paid much attention but it plays an important role in the SEO of the store.

Every Magento 2 store has a base URL. In this post, I’ll show the methods to change Magento 2 base URL

  1. Using CLI Command
  2. Using Table

You can use this method when you want to change the domain URL. With the below method, the base URL can be changed easily and all the sub-URLs will be redirected with the new base URL.

You can use this method when:

  1. You want to develop a staging site
  2. You want to change the server setup
  3. You want a development site
  4. You want to have a subdomain site
  5. Simply want to change the domain

In all these cases, follow the below method to change the base URL in Magento 2.

Methods to change Magento 2 Base URL:

Change domain to using any of the below methods:

  1. Using CLI command:

  2. Using Table:

That’s it.

Any doubts in the above method can be mentioned in the Comments section below. I’d be happy to help you out.

Also, do not forget to share the post with the Magento community via social media.

Thank you.

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

(based on 9 Reviews)

He is a senior Magento Developer at Meetanshi with an aim to serve the best to the store owners. In his free time, he loves to consume digital content with the family.

Leave a reply:

Your email address will not be published.