I have an existing project from my personal project repository. What I would like to do is clone this repository and setup the environment, and this is what I have done :
- Installing php 7.0 and all the require extension.
- Install mysql
- install apache2
- Set the sites-available for magento 2. and restart the apache2
now I have the project in my dir /var/www/html/myproject/
.
But I don't know where to go from this like, where is the setup for mysql credential ? and other setup to make the project up and running in my local environtment.
Right now when I got to my localhost
I got HTTP ERROR 500
? any help would be appreciated.
Best Answer
For some reason I'm able to do this on my own so here is the steps Note I'm using Ubuntu 16.04 for my local env :
sudo chown -R you-user:your-user .
Edit your app/etc/env.php and find these file :
Now make
bin/magento
executablesudo chmod +x bin/magento
This is IMPORTANT STEP : disable your additional module first, and there will only magento original module only to feed and setup the database. You can first move all your module first out of the
app/code
andapp/design
.run
bin/magento setup:install --admin-user="gujarat" --admin-password="wkwkwkw" --admin-email="gujarat@balala.com" --admin-firstname="gujarat" --admin-lastname="santana"
. This will take forever to install.bin/magento setup:upgrade
. If you have trouble in this step, this is more likely because of yourcustom module
move all your custom module first to another directory and run this command again.bin/magento setup:di:compile
Set appropriate permission files and folder.
You should see your sites now, but don't forget to move all your
custum module
to its respected directory. And run the upgrade and compile command from 7 & 8 step.