0

Proper way of changing the root folder name in Magento2?

I want to move the files from htdocs/Magento2x_1 to htdocs/Magento2x_2.

1 Answer 1

3

You can change or move the root folder path as well as you need to go to Mysql table core_config_data and replace the base url paths by modified name.

Change the path value

For example

  1. Path web/unsecure/base_url value http://127.0.0.1/Magento2x_2 ( replaced by Magento2x_1. )

  2. path web/secure/base_url value http://127.0.0.1/Magento2x_2 ( replaced by Magento2x_1. )

  3. Refresh the cache ( php bin/magento cache:clean; ) and load the application by new path.

Hope this helps.

2
  • And what about Store->General->Web secure and unsecure urls? and after moving, any composer update? Cause i tried the above before, i get Object not found error
    – Sushivam
    Aug 19, 2016 at 7:16
  • You can find or modify the information in core_config_data table "web/secure/use_in_frontend" for secure and un-secure. and run setup-upgrade command. Aug 19, 2016 at 7:23

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.