0

I am trying to transfer my live site to a local host on my PC, I did the following:

All the website's files are in C:\xampp\htdocs\html. I also imported the database and changed env.php and web/secure/url and web/unsecure/url (to 127.0.0.1/html). The problem is that there are errors in the code where $_SERVER['DOCUMENT_ROOT'] is being used.

I tried changing inside httpd.conf the document root from

DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">

to

DocumentRoot "C:/xampp/htdocs/html"
<Directory "C:/xampp/htdocs/html">

And the result was that my site was showing, but all pages are 404.

Am I missing something? maybe some DB configuration or Magento's file for local environment?

thanks.

  • Make sure mod_rewrite module is installed in your local server. You can check using phpinfo() fucntion. – Irfan Momin Oct 16 '17 at 5:30
  • @Hezided Did you tried to install Magento on your local server is it compatible with your local configuration? – ABHISHEK TRIPATHI Oct 16 '17 at 5:32
  • @IrfanMomin yes it's uncommented in httpd.conf.@ABHISHEK TRIPATHI not sure I understand your question... – hezided Oct 16 '17 at 16:08
0

If you have changed your DocumentRoot to "C:/xampp/htdocs/html", then your web/unsecure/url entry will be "http://127.0.0.1/" .

Change this entry in database and clear the cache. It should work for you.

0

eventually what worked for me was to move all the files to separate folder (C:/myFolder), and change the DocumentRoot to there... also values of:

web/unsecure/base_url
web/secure/base_url
web/unsecure/base_link_url
web/secure/base_link_url

is http://127.0.0.1:8080/

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.