You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -29,6 +30,7 @@ A collection of [Deployer](https://deployer.org) Tasks/Recipes to deploy WordPre
29
30
-[Custom Theme](#custom-theme-1)
30
31
-[Custom MU-Plugin](#custom-mu-plugin-1)
31
32
-[Contributing](#contributing)
33
+
-[Built by](#built-by)
32
34
33
35
## Installation
34
36
@@ -108,7 +110,7 @@ This prevents any development files/development tools from syncing. I strongly r
108
110
All tasks reside in the `src/tasks` directory and are documented well. Here's a summary of all tasks - for details (eg required variables/config) see their source.
109
111
You can also run `dep --list` to see all available tasks and their description.
110
112
111
-
####Database Tasks (`tasks/database.php`)
113
+
### Database Tasks (`tasks/database.php`)
112
114
113
115
-`db:remote:backup`: Backup remote database and download to localhost
114
116
-`db:local:backup`: Backup local database and upload to remote host
@@ -117,12 +119,12 @@ You can also run `dep --list` to see all available tasks and their description.
117
119
-`db:push`: Pushes local database to remote host (combines `db:local:backup` and `db:remote:import`)
118
120
-`db:pull`: Pulls remote database to localhost (combines `db:remote:backup` and `db:local:import`)
119
121
120
-
####File Tasks (`tasks/files.php`)
122
+
### File Tasks (`tasks/files.php`)
121
123
122
124
-`files:push`: Pushes all files from local to remote host (combines `wp:push`, `uploads:push`, `plugins:push`, `mu-plugins:push`, `themes:push`)
123
125
-`files:pull`: Pulls all files from remote to local host (combines `wp:pull`, `uploads:pull`, `plugins:pull`, `mu-plugins:pull`, `themes:pull`)
124
126
125
-
####Theme Tasks (`tasks/theme.php`)
127
+
### Theme Tasks (`tasks/theme.php`)
126
128
127
129
-`theme:assets:vendors`: Install theme assets vendors/dependencies (npm), can be run locally or remote
128
130
-`theme:assets:build`: Run theme assets (npm) build script, can be run locally or remote
@@ -135,23 +137,23 @@ You can also run `dep --list` to see all available tasks and their description.
135
137
-`themes:backup:remote`: Backup themes on remote host and download zip
136
138
-`themes:backup:local`: Backup themes on localhost
137
139
138
-
####Uploads Tasks (`tasks/uploads.php`)
140
+
### Uploads Tasks (`tasks/uploads.php`)
139
141
140
142
-`uploads:push`: Push uploads from local to remote
141
143
-`uploads:pull`: Pull uploads from remote to local
142
144
-`uploads:sync`: Syncs uploads between remote and local
143
145
-`uploads:backup:remote`: Backup uploads on remote host and download zip
144
146
-`uploads:backup:local`: Backup uploads on localhost
145
147
146
-
####Plugin Tasks (`tasks/plugins.php`)
148
+
### Plugin Tasks (`tasks/plugins.php`)
147
149
148
150
-`plugins:push`: Push plugins from local to remote
149
151
-`plugins:pull`: Pull plugins from remote to local
150
152
-`plugins:sync`: Syncs plugins between remote and local
151
153
-`plugins:backup:remote`: Backup plugins on remote host and download zip
152
154
-`plugins:backup:local`: Backup plugins on localhost
153
155
154
-
####MU Plugin Tasks (`tasks/mu-plugins.php`)
156
+
### MU Plugin Tasks (`tasks/mu-plugins.php`)
155
157
156
158
-`mu-plugin:vendors`: Install mu-plugin vendors (composer), can be run locally or remote
157
159
-`mu-plugin`: A combined tasks - at the moment only runs mu-plugin:vendors task
@@ -161,14 +163,39 @@ You can also run `dep --list` to see all available tasks and their description.
161
163
-`mu-plugins:backup:remote`: Backup mu-plugins on remote host and download zip
162
164
-`mu-plugins:backup:local`: Backup mu-plugins on localhost
163
165
164
-
####WordPress Tasks (`tasks/wp.php`)
166
+
### WordPress Tasks (`tasks/wp.php`)
165
167
166
-
-`wp:install`: Installs WordPress core via WP CLI
168
+
-`wp:download-core`: Installs WordPress core via WP CLI
167
169
-`wp:push`: Pushes WordPress core files via rsync
168
170
-`wp:pull`: Pulls WordPress core files via rsync
169
171
-`wp:info`: Runs the --info command via WP CLI - just a helper/test task
170
172
171
-
#### Simple Tasks (`tasks/simple.php`)
173
+
#### WP-CLI
174
+
175
+
Handling and installing the WP-CLI binary can be done in one of multiple ways:
176
+
177
+
1. The default `bin/wp` in `set.php` checks for a usable WP-CLI binary and if none is found it downloads and installs it to `{{deploy_path}}/.dep/wp-cli.phar` (this path is checked in the future as well).
178
+
2. If you want this behaviour (check if installed, else install) but in another path, overwrite the `bin/wp` variable with a function:
This would install the WP-CLI binary into `/usr/local/bin` with sudo, since this path is probably in $PATH it's found via `getWPCLIBinary` the next time.
188
+
189
+
3. Set the `bin/wp` variable path on the host configuration, if WP-CLI is already installed.
190
+
4. Install the WP-CLI binary manually with the `wp:install-wpcli` task and set the path as `/bin/wp` afterwards.
191
+
You can pass the installPath, binaryFile and sudo usage via CLI:
192
+
`dep wp:install-wpcli production -o installPath='{{deploy_path}}/.bin -o binaryFile=wp -o sudo=true`
193
+
194
+
See [original PR](https://github.com/gaambo/deployer-wordpress/pull/5) for more information.
195
+
196
+
There's a task for downloading core and `--info`. You can generate your own tasks to handle other WP-CLI commands, there's a util function `Gaambo\DeployerWordpress\Utils\WPCLI\runCommand` (`src/utils/wp-cli.php`);
197
+
198
+
### Simple Tasks (`tasks/simple.php`)
172
199
173
200
- Contains some overwrites of Deployer default `deploy:*` tasks to be used in a "simple" recipe without release paths. See [Simple Recipe](#simple)
174
201
@@ -223,4 +250,8 @@ Installing PHP/composer vendors/dependencies is done on the server. The `mu-plug
223
250
## Contributing
224
251
225
252
If you have feature requests, find bugs or need help just open an issue on [GitHub](https://github.com/gaambo/deployer-wordpress).
226
-
Pull requests are always welcome. PSR2 coding standard are used I try to adhere to Deployer best-practices.
253
+
Pull requests are always welcome. PSR2 coding standard are used and I try to adhere to Deployer best-practices.
254
+
255
+
## Built by
256
+
257
+
[Gaambo](https://github.com/gaambo) and [Contributors](https://github.com/gaambo/deployer-wordpress/graphs/contributors)
0 commit comments