0

I have experience with composer, PHP, Homestead and ScotchBox. This is my first Magento setup so I'm totally experimenting. I have a Magento 2 store file that i worked on for a while and I want to mitigate from using MAMP to vagrant box. I have built a box using https://github.com/paliarush/magento2-vagrant-for-developers

I replaced folder of default magento2ce installation with my store files but it is not working . what exact environment variables that I'm missing for my store to work properly?

  • you means to say, you need to configured your magento there? – Dhiren Vasoya Feb 17 '17 at 13:13
  • yeah i want to replace the default installation with my magento store files with the theme and all config extensions – SS2015 Feb 17 '17 at 15:18
  • I post answer, check. – Dhiren Vasoya Feb 18 '17 at 3:13
1

If you want to setup your magento instaltion then after uploading file, you need to change database configuration here.

app\etc\env.php

array (
    'table_prefix' => '',
    'connection' => 
    array (
      'default' => 
      array (
        'host' => 'localhost',
        'dbname' => 'YOUR_DATABASENAME',
        'username' => 'YOUR_DATABASE_USER_NAME',
        'password' => 'YOUR_DATABASE_USER_PASSWORD',
        'active' => '1',
      ),
    ),
  ),

You need to replace this into in this file and then run following command from command line :

php bin/magento cache:clean
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
  • thanks, but i could not run the command it keeps giving me [Zend_Db_Adapter_Exception]SQLSTATE[HY000] [2002] No such file or directory , which is a problem with loaded configuration file used by the php cli. I have no idea how to fix the issue i would appreciate the help my web server uses /etc/php/7.0/apache2/php.ini my php cli uses /usr/local/php5/lib/php.ini my php cli version PHP 7.0.15 (cli) – SS2015 Feb 19 '17 at 6:31
0

This is supported scenario. After replacing codebase in magento2ce just run ./init_project.sh -fp, this will recreate box using your settings and reconfigure PhpStorm. Make sure that project is not opened in PhpStorm while doing that. If it does not help feel free to report an issue at https://github.com/paliarush/magento2-vagrant-for-developers/issues

0

just use puphpet.com to setup a vagrant box and install magento from within there.

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.