-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInitial-Magento-Setup.txt
More file actions
35 lines (29 loc) · 2.12 KB
/
Initial-Magento-Setup.txt
File metadata and controls
35 lines (29 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Magento 2 setup on localhost machine from a repository:
- Install wamp / xampp latest
- Install git bash (for commands)
- Install any sql ide for database (MySql Workbench or SQL-yog preferable)
- Any text editor (notepad++ or sublime text are preferable becuase of light weight)
- Download (clone) Magento 2 latest repository in any folder
- create alias for project folder or place the downloaded repo in (wamp > www directory or xampp > htdocs)
- try to access the url it would through error but just to confirm that url is working
'localhost/ <alias-name> ' or 'localhost/ <folder-name-under-www-directory>'
- import the sql file if present
- change 'web/unsecure/base_url' in table 'core_config_data' to your local project url
- change the db name to your db-name in app/etc/env.php
If db-file imported successfully then no need for further steps else follow below:
- run the following command to setup Magento 2:
php -dmemory_limit=4G bin/magento setup:install --base-url=http://127.0.0.1/tts-uk/ --db-host=localhost --db-name=tts-uk --db-user=root --db-password='' --admin-firstname=test --admin-lastname=admin --admin-email=test@gmail.com --admin-user=test --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1
Above command parameters:
=> set the base-url (just change the last part)
=> let db-host be localhost for local machines
=> set db-name = database name (first create an empty database)
=> set db-user = root
=> set db-password = ""
=> set admin-firstname, admin-lastname, admin-email, admin-user, admin-password to required ones
=> language, currency, timezone, use-rewrites are same for initial setup
- Hit the project url
- Admin and urls other than homepage won't work till this step if setup is done on local machine. So follow the below step:
=> goto folder, open htaccess file and search for "RewriteBase" and set to the project url-name (alias or www-directory-folder-name)
- The layout would be disturbed that's becuase the pub folder isn't created yet so last part is to run below commands in project folder:
=> php bin/magento setup:upgrade
=> php bin/magento setup:static-content:deploy -f