Last active
January 8, 2020 21:56
-
-
Save jbd91/6f113ba6575cc9cb398d635a6cdd64aa to your computer and use it in GitHub Desktop.
Installing Craft 3 locally with MAMP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://docs.craftcms.com/v3/installation.html#step-1-download-craft | |
Make sure hidden files are visible | |
Download Craft zip file from link above or install with composer: composer create-project craftcms/craft <Path> | |
Open MAMP -- no need to start servers yet -- go to Preferences > Web Server and set the document root to be the "web" folder inside the Craft directory. | |
Set Permissions on directories within project: | |
.env | |
composer.json | |
composer.lock | |
config/license.key | |
storage/* | |
vendor/* | |
web/cpresources/* | |
Start MAMP servers. | |
Open up PHPmyAdmin and create a database for the project. There is no need to update db.php. A .env file will be created when running ./craft setup and db.php will reference the values there (attempting to edit db.php will likely cause install errors). | |
CD into project root and run 'chmod a+x craft' to make this file executable. This will allow use of the Craft CLI. | |
Security Key Config: | |
./craft setup/security-key | |
Run | |
./craft setup | |
Enter information prompted (DB creds, admin login, site name). This command will write information to the designated files (i.e. write DB creds to the .env file that db.php references.) | |
This can also be done in the browser: http://<Hostname>/index.php?p=admin/install | |
However, this was not working for a localhost install. Setup command above was required. | |
After setup completion was able to login to the dashboard. | |
Docs | |
https://docs.craftcms.com/v3/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment