how to bring live magento site to localhost without effecting live site

前端 未结 4 1852
长发绾君心
长发绾君心 2020-12-29 08:54

i want a live site to be on local host and without effecting any functionality of live magento site. i have tried many way of doing that but have not get any result from it.

4条回答
  •  囚心锁ツ
    2020-12-29 09:36

    Steps:

    1. Download the files to the local project folder.
    2. Create a new local DB and import the live database backup/dump.
    3. Update app/etc/local.xml file with local DB parameters(Host name, DB name, DB username, DB password)
    4. Magento have the project URL saved in 2 places(secure URL and unsecure URL) in the table core_config_data. We need to update that in imported local DB to the local URL(9th and 10th record in the table).
    5. Delete the cache: Delete the contents in var folder(That folder contains reports and logs too. I assume that you won't need it as this is a separate installation)

    The local copy will most probably work by now but there are possibilities that it would not. Things to do in this case:

    1. If you are getting redirected to the live site, check the .htaccess file for redirects(For various reasons there may be a redirect defined in the file)
    2. If you are getting forbidden error, this will come in handy(Usually occurs in linux systems)

    There may still be some problems probably theme or module specific. In this case you will need to debug the project and find out what the problem is. Xdebug will come in handy in this situation for boosting the debug process :)

    Subrata's solution will conflict with some of the Magento Modules installed and will not allow you to re-install Magento in local. I follow these steps and everything works fine.

提交回复
热议问题