Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README for Commands #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ information, see the [Related repos](#related-repos) section.
* [Installing `pmc-vvv`](./docs/installing.md)
* [FAQ](./docs/faq.md)
* [Unit testing in individual sites](./docs/unit-tests.md)
* [Commands](./docs/commands.md)
* [Miscellaneous issues](./docs/misc-issues.md)

## Default WordPress Login
Expand Down
59 changes: 59 additions & 0 deletions docs/commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Commands
Before running the commands below, make sure you add the `vvv-local/provision/utilities/pmc/bin` directory to the `$PATH` and a variable called `VVV_INSTANCE_DIR` which contains the path to `vvv-local`
You can set it up as follows:
Edit the bashrc file. You can use any editor you want. The example uses *nano*
```
nano ~/.bashrc
```

At the end of this file, put your new directory that you wish to permanently add to $PATH and also add the new Variable.
To find the path to the bin directory, run `pwd` inside that directory and copy the path.

VVV_INSTANCE_DIR="PATH_TO_THE_UTILITIES_PMC_BIN_DIRECTORY"
export PATH="$PATH:$VVV_INSTANCE_DIR/provision/utilities/pmc/bin"
Save your changes and exit the file. Afterwards, execute the following command to make the changes take effect in your current session. Alternative, you can log out or reboot the system.

```
source ~/.bashrc
```
That is all that has to be done.
You can check $PATH to see if the path you set has been added correctly.
You can also check VVV_INSTANCE_DIR variable

```
echo $PATH
echo $VVV_INSTANCE_DIR
```

## List of Commands

## `update-repos`

To run this command, you must be in the wp-content directory of the site. This command will update the following directories:
- mu-plugins
- plugins
- pmc-plugins
- pmc-core-v2
- pmc-themename-year

Each directory will only be updated if the branch is master and there are no changes in any files otherwise it will not update the directory. So make sure to checkout to master and have no changes in the file.

## `vcd`

This command will ssh into the VVV Shell to the folder from where you have run this command. This command requires the VVV to be running.

## `wp`

This command is to run the wp-cli commands in the shell right from the theme directory. This command requires the VVV to be running.
Example:
```
wp cron event list
```
## `xdebug`

This command is to turn xdebug on or off. This command requires the VVV to be running.
Example:
```
xdebug on
xdebug off
```