Jump to content

Local Installation, for various reasons


Recommended Posts

...like debugging script, and various compatibilities (upgrades, modules, themes, etc)

I searched forum and google and didn't find anything quite like this, so I thought I'd put it out there for others to use.

Download and install WAMP


first lets create our local shop database
the first step for that will be to create a password for the 'root' user (for completeness on prestashop's side)
start up WAMP, if it's not running already
left click on the notification icon and select phpMyAdmin
select 'Privileges' from the tabs at the top of the screen
next to the row that has user = root, host = localhost, select 'edit privileges' (little icon at the end of the row)
in the box labeled 'Change Password', type and re-type your password (the generate password function is really unnecessary for local stuff)
the submit button is the little button labeled 'Go' in the bottom right of the box
now your phpMyAdmin application will kick you out if you try to do anything else, because you did not supply a password, lets fix that :)
open [path to WAMP]/apps/phpMyAdmin[version]/config.inc.php
find

$cfg['Servers'][$i]['password'] = '';


and add your password inbetween the '' after the =
save the file
now re-open phpMyAdmin
from here create your database per instructions that can be found elsewhere (no need for me to re-explain this)


Extract shop files locally (you can choose any folder/directory, explaination to follow)


create a new virtual host for your shop \/\/\/

open [path to WAMP]/bin/apache/apache/conf/httpd.conf
scroll down to the end of the file (line 467) and find

#Include conf/extra/httpd-vhosts.conf


and remove the # sign at the start of the line, this un-comments the line, so apache will include the httpd-vhosts.conf file when starting up
save and close

open c:/windows/system32/drivers/ect/hosts
this file is hidden, if you can not see hidden files, (if your menu bar isn't shown press the alt key) tools > folder options > show hidden files, folders, and drives
choose to open with notepad
if the line below has a # at the front of it, then remove it

127.0.0.1    localhost



at the end of the file, on a new line insert

127.0.0.1    


the 'shopname' can be anything that would normally be accepted in a broswers address bar
for example local.realdomainname.com, or just localshop, or just shop, or store
any of these will work, the reason is because windows checks this file before checking your first DNS server for name resolution
if what you type into any browsers address bar matches a name in this file, it stops looking and goes to the IP that is specified (127.0.0.1 in this case)
if you really want to mess with someone in the office you could edit this file and put something like

209.191.93.52    www.google.com


this will redirect them to yahoo everytime they wanted google....it's a riot...anyway, back to the tutorial

open [path to WAMP]/bin/apache/apache/conf/extra/httpd-vhosts.conf
delete the two sample virtual hosts that are currently in there ( ..... )
and insert these

   DocumentRoot "C:\\www"
   ServerName localhost
   DirectoryIndex index.php
\www">
       AllowOverride All
       Allow from All



   DocumentRoot "C:\"
   ServerName 
   DirectoryIndex index.php
">
       AllowOverride All
       Allow from All



of course if your [path to shop] is not on the C: drive, then substitute the correct drive letter here

open [path to WAMP]/bin/apache/Apache[version]/bin/php.ini
change line 514 from

error_reporting = E_ALL


to

error_reporting = E_ALL & ~E_NOTICE



next, if WAMP is already running, rightclick on the icon and tell it to restart all services
if not, start it up
the notification icon should eventually be all white, if you see red or yellow in the icon something is wrong, double check your files
if you see all white, then open browser, or new tab, and type in your shopname into the address bar
it should by default, if a fresh prestashop install, take you to the first prestashop install screen

BTW, when prestashop asks, your database server is localhost, and user is root
Also, you must have WAMP running for all of this to operate correctly, if it is not (or if there is a problem somewhere) your browser will throw an 'unable to connect' error

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...