0

While i install magento2.2.1 3rd Step I enable use https for magento storefront and use https for magento admin

After Installation i cant view page bcoz https not support in my local machine (WAMP) So I moved to phpmyadmin and select my database and selct "core_config_data" table... Here i change config path url from https to http. Now i can view my website..

The problem is i cant access admin url when i typed localhost/magento/admin it was changed to https://localhost/magento/admin/

How can i change this configuration via database or php code.

2
  • Is it a clean install or do you have custom data in database? Commented Feb 15, 2018 at 12:27
  • clean install @Vulpea
    – shri ram
    Commented Feb 15, 2018 at 12:28

1 Answer 1

1

If it is a clean install:

  • make backup of database(just in case)
  • drop database
  • create empty database with your name and permissions so magento can access it
  • run install command from console e.g

    php bin/magento setup:install --base-url="http://example.co.uk/" --db-host="localhost" --db-name="databasename" --db-user="databaseuser" --db-password="databasepass" --admin-firstname="Yourname" --admin-lastname="Yourname" --admin-email="[email protected]" --admin-user="admin" --admin-password="setpasswordhere" --language="en_GB" --currency="GBP" --timezone="Europe/London" --use-rewrites="1" --backend-frontname="admin"

More information about install command and it's arguments can be found here http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-install.html

This will reinstall your database schema with populating it with given parameters.

DO NOT USE THIS UNDER ANY CIRCUMSTANCES IF YOU HAVE CUSTOM DATA IN YOUR DATABASE AS THIS WILL RESULT IN LOSING ABOVE MENTIONED DATA

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.