1

Hi I have installed the developed the magento 2 in the path domain.com/new folder and developed in that path. Now I want push the installed file to the public_html file without affecting the code.

  • You want to push your complete code to ur domain.com instead of domain.com/new folder right – Ajithkumar Dec 12 '18 at 12:50
  • yes. without affecting the code – Chethan Sreenivasa Murthy Dec 12 '18 at 12:52
1

Using Files

Navigate to app/etc and rename di.xml and config.php file.

Now you are hit your domain url it will redirect to installation page and then enter all credential and current database name

Using Database

Step 1 : Copy and paste all your magento file in your public_html path

Step 2 : Go to database and find "core_config_data" table

enter image description here

Step 3 : Replace your domain url in "web/unsecure/base_url" and "web/secure/base_url" or admin panel have option change secure&unsecure base url enter image description here

Step 4 : Run below command

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
php bin/magento cache:flush
1

You need to copy all content/files(new folder in case of you) to public_html folder. You just need to change/set the Base url and base url secure

  • From backend store->configurations->web Base URLs (http://domain.com)
  • open up database table core_config_data and find under path web/unsecure/base_url change its value to your domain name (domain.com) and path web/secure/base_url value to (https://domain.com)
  • clean cache

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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