Skip to content

Commit 5637867

Browse files
committed
Added section to README.md about Environment reset
1 parent b5a4a60 commit 5637867

File tree

1 file changed

+33
-14
lines changed

1 file changed

+33
-14
lines changed

README.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@
1313
* [Troubleshooting](#troubleshooting)
1414
* [Day-to-day development scenarios](#day-to-day-development-scenarios)
1515
* [Reinstall Magento](#reinstall-magento)
16-
* [Clear magento cache](#clear-magento-cache)
17-
* [Update composer dependencies](#update-composer-dependencies)
16+
* [Clear Magento cache](#clear-magento-cache)
17+
* [Update Composer dependencies](#update-composer-dependencies)
1818
* [Switch between CE and EE](#switch-between-ce-and-ee)
1919
* [Use Magento CLI (bin/magento)](#use-magento-cli-binmagento)
2020
* [Debugging with XDebug](#debugging-with-xdebug)
2121
* [Connecting to MySQL DB](#connecting-to-mysql-db)
2222
* [Multiple Magento instances](#multiple-magento-instances)
23+
* [Reset environment](#reset-environment)
2324

2425
## What You get
2526

@@ -64,32 +65,32 @@ Software listed below should be available in [PATH](https://en.wikipedia.org/wik
6465
### Installation steps
6566

6667
:information_source: In case of any issues during installation, please read [troubleshooting section](#troubleshooting)
67-
68+
6869
1. Open terminal and change directory to the one which you want to contain Magento project. ![](docs/images/windows-icon.png) On Windows use Git Bash, which is available after Git installation
6970

7071
1. Download project with Vagrant configuration:
71-
72+
7273
```
7374
git clone git@github.com:paliarush/magento2-vagrant-for-developers.git vagrant-magento
7475
```
75-
76+
7677
1. Optionally, if you use private repositories on GitHub or download packages from Magento Marketplace
77-
78+
7879
- copy [etc/composer/auth.json.dist](etc/composer/auth.json.dist) to `etc/composer/auth.json`
7980
- specify your GitHub token by adding `"github.com": "your-github-token"` to `github-oauth` section for GitHub authorization
8081
- add Magento Marketplace keys for Marketplace authorization
8182

8283
1. Optionally, copy [etc/config.yaml.dist](etc/config.yaml.dist) as `etc/config.yaml` and make necessary customizations
83-
84+
8485
1. Initialize project (this will configure environment, install Magento, configure PHPStorm project):
85-
86+
8687
```
8788
cd vagrant-magento
8889
bash init_project.sh
8990
```
9091

9192
1. Use `vagrant-magento` directory as project root in PHP Storm (not `vagrant-magento/magento2ce`). This is important, because in this case PHP Storm will be configured automatically by [init_project.sh](init_project.sh). If NFS files sync is disabled in [config](etc/config.yaml.dist) and ![](docs/images/windows-icon.png) on Windows hosts [verify deployment configuration in PHP Storm](docs/phpstorm-configuration-windows-hosts.md)
92-
93+
9394
1. Configure remote PHP interpreter in PHP Storm. Go to `Settings => Languages & Frameworks => PHP`, add new remote interpreter and select "Deployment configuration" as a source for connection details.
9495

9596
### Default credentials and settings
@@ -133,7 +134,7 @@ Note, that semantic versioning is only used for `x.0` branches (not for `develop
133134
1. Please make sure that currently installed software, specified in [requirements section](#requirements), meets minimum version requirement
134135

135136
## Day-to-day development scenarios
136-
137+
137138
### Reinstall Magento
138139
To save some time and get clear Magento installation, you can skip installation of software like web server or php.
139140
The following command will clear Magento DB, Magento caches and reinstall Magento instance.
@@ -144,7 +145,7 @@ Go to 'vagrant-magento' created earlier and run in command line:
144145
bash m-reinstall
145146
```
146147

147-
### Clear magento cache
148+
### Clear Magento cache
148149

149150
Go to 'vagrant-magento' created earlier and run in command line:
150151

@@ -165,7 +166,7 @@ bash m-switch-to-ee
165166
```
166167
:information_source: On Windows hosts (or when NFS mode is disabled in [config.yaml](etc/config.yaml.dist) explicitly) you will be asked to wait until code is uploaded to guest machine by PhpStorm (PhpStorm must be lunched). To continue the process press any key.
167168

168-
### Update composer dependencies
169+
### Update Composer dependencies
169170

170171
Go to 'vagrant-magento' created earlier and run in command line:
171172

@@ -181,14 +182,14 @@ Go to 'vagrant-magento' created earlier and run in command line:
181182

182183
```
183184
bash m-bin-magento <command_name>
184-
e.g.
185+
e.g.
185186
bash m-bin-magento list
186187
```
187188

188189
### Debugging with XDebug
189190

190191
XDebug is already configured to connect to the host machine automatically. So just:
191-
192+
192193
1. Set XDEBUG_SESSION=1 cookie (e.g. using 'easy Xdebug' extension for Firefox). See [XDebug documentation](http://xdebug.org/docs/remote) for more details
193194
1. Start listening for PHP Debug connections in PhpStorm on default 9000 port. See how to [integrate XDebug with PhpStorm](https://www.jetbrains.com/phpstorm/help/configuring-xdebug.html#integrationWithProduct)
194195
1. Set beakpoint or set option in PhpStorm menu 'Run -> Break at first line in PHP scripts'
@@ -213,3 +214,21 @@ Answer can be found [here](https://github.com/paliarush/magento2-vagrant-for-dev
213214

214215
To install several Magento instances based on different code bases, just follow [Installation steps](#installation-steps) to initialize project in another directory on the host.
215216
Unique IP address, SSH port and domain name will be generated for each new instance if not specified manually in `etc/config.yaml`
217+
218+
### Reset environment
219+
220+
It is possible to reset project environment to default state, which you usually get just after project initialization. The following command will delete vagrant box, vagrant project settings and PhpStorm project settings. After that it will initialize project from scratch. Magento 2 code base (`magento2ce` directory) will stay untouched.
221+
222+
Go to 'vagrant-magento' created earlier and run in command line:
223+
224+
```
225+
bash init-project.sh -f
226+
```
227+
228+
You can reset project settings and Magento 2 code base at the same time. Magento 2 code base will be deleted and then cloned from the repositories specified in [etc/config.yaml](etc/config.yaml.dist)
229+
230+
Go to 'vagrant-magento' created earlier and run in command line:
231+
232+
```
233+
bash init-project.sh -fc
234+
```

0 commit comments

Comments
 (0)