1. cliveportman
  2. /code
  3. /installing-craft-3-locally-on-wamp

Installing Craft 3 locally on Wamp


Assuming Composer is setup, nnavigate to the repos directory and run:

composer create-project craftcms/craft projectfolder --ignore-platform-reqs

################ EDIT ###############

The --ignore-platform-reqs above was used to get around the PHP 7 notice. While WAMP was using PHP 7, the CLI wasn't. To fix that, I've since removed PHP 5.6 by right-clicking on the WAMPserver icon > Tools > Delete unused version > PHP 5.6

Running php -v within the CLI then results in 'the term PHP is not recognised'. This is easily fixed by entering the path to you php.exe within Window's paths (inside environment variables). In my case it was 'C:\wamp\bin\php\php7.2.4'. Then restart the CLI and you should be sorted and no longer need to ignore the platform requirements.

#####################


Create the database within PhpMyAdmin.

Make sure you're running PHP 7.x.

Setup the virtual host within WAMP:

<virtualhost *:80="">
 ServerName site.localhost
 DocumentRoot "C:/Users/clive/Desktop/repos/projectfolder/public_html"
 <directory "C:/Users/clive/Desktop/repos/projectfolder/">
 Options +Indexes +Includes +FollowSymLinks +MultiViews
 AllowOverride All
 Require local
 Require ip 192.168.1
 </directory>
</virtualhost>

Setup the virtual host within the hosts file:

127.0.0.1 site.localhost

Restart WAMP.

Open up the project folder and find the .env file, then add a security key (can use https://randomkeygen.com/).

Navigate to site.localhost/admin. Go.