How to change base URL in magento 2

How to change base url in magento 2

Change base URL in Magento can accomplish in different ways. In this lesson we’ll see how we can change Magento Base URL.

Change Base URL via Database

Step 01: Go to your database and select the database.

Step 02: Find the core_config_data database table. If you’re unable to find out do search the table.

Step 03: Open the core_config_data table. Edit the following table rows and update with real values.

how to change base url in magento 2

Example
web/unsecure/base_url: https://nerodev.com/
web/secure/base_url: https://nerodev.com/

Change Base URL via Database

We can achieve the same via GIT BASH commands. You just need to use following code.

php bin/magento setup:store-config:set --base-url="https://nerodev.com/"

Hope you’ll enjoyed this tutorial regarding changing the Magento 2 base URL. That is all from this tutorial. Hope you enjoyed this tutorial. Happy learning ahead. Thanks for reading.

Recommended: Please follow our step by step guide how to create a WordPress Theme from scratch. You’ll be able to create your own theme at the end of these lessons.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *