Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prestashop installation homestead guide

So I had trouble while installing Prestashop 1.7 correctly and thought I would post my own guide to install it with Homestead (vagrant, virtualbox):

There we go:

Download prestashop

Have vagrant and homestead installed

Cd into your homestead folder and run vagrant - vagrant up

Extract ONLY THE FIRST zip in "...code\prestashop" folder

Configure homestead.yaml file by adding:

sites:
    - map: prestashop.test
      to: /home/vagrant/code/prestashop
      php: "7.0"

databases:
    - prestashop

add 192.168.10.10 prestashop.test to your hosts file

run vagrant provision

Open "prestashop.test" (or whatever other name you put in the homestead.yaml file) in browser

Proceed with prestashop installation

Comment out (_install) or delete the install folder (otherwise you will get an error when trying to open prestashop in the browser)

vagrant ssh

In vagrant ssh cd /etc/nginx/sites-available and run ls to see if prestashop is present

sudo nano prestashop.test

Add this between root and index and change the admin name on BOTH lines to your generated unique one:

location /admin/ {
if (!-e $request_filename) {
rewrite ^/.*$ /admin/index.php last;
}
}

then sudo /etc/init.d/nginx reload

Open prestashop.test/admin() (in the brackets put your unique admin name (without the brackets) and voilà!

like image 745
Todor Inchovski Avatar asked Sep 07 '18 11:09

Todor Inchovski


1 Answers

Instead of having to edit Nginx config file you can simply use Apache, all that you have to do is to specified apache as a site type:

sites:
    - map: prestashop.test
      to: /home/vagrant/code/prestashop
      php: "7.0
      type: "apache"

It looks like there are some issues with Nginx that require to edit the config by hand just as @Todor did, more info here Does PrestaShop 1.7 work with Nginx? - General topics - PrestaShop Forums

like image 66
Robin Perdomo Avatar answered Oct 11 '22 13:10

Robin Perdomo