How to change base url in Magento 2 Database

How to change base url in Magento 2 Database

1. Once you login in Mysql then run following query

2. Check it Existing Base URL

SELECT value FROM core_config_data WHERE path LIKE ‘web/unsecure/base%’;

SELECT value FROM core_config_data WHERE path LIKE ‘web/secure/base%’;
3. Update New Base URL
UPDATE core_config_data SET value = ‘http://www.test.com/’ WHERE path LIKE ‘web/unsecure/base_url’;

UPDATE core_config_data SET value = ‘https://www.test.com/’ WHERE path LIKE ‘web/secure/base_url’;

4. After udpate the base url , suggested to clear the var/cache , var/session folders.

Basically config values will be stored in cache.To reflect the updated values better clear the

cache & check.

“Save Rain Water, be Healthy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s