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.
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
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
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
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