File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66
77## [ Unreleased]
88
9+ ### Added
10+ - Add task to run the WordPress database update procedure on deployment.
11+
912### Changed
1013- Set ` keep_releases ` option ` 3 ` by default.
1114
Original file line number Diff line number Diff line change @@ -79,6 +79,20 @@ function () {
7979 }
8080);
8181
82+ desc ( 'Runs the WordPress database update procedure ' );
83+ task (
84+ 'wp:upgrade_db ' ,
85+ function () {
86+ within (
87+ '{{release_path}} ' ,
88+ function () {
89+ $ is_multisite = test ( 'wp core is-installed --network ' );
90+ run ( 'wp core update-db ' . ( $ is_multisite ? ' --network ' : '' ) );
91+ }
92+ );
93+ }
94+ );
95+
8296desc ( 'Deploy your project ' );
8397task (
8498 'deploy ' ,
@@ -95,6 +109,7 @@ function () {
95109 'deploy:clear_paths ' ,
96110 'deploy:symlink ' ,
97111 'wp:opcache_clear ' ,
112+ 'wp:upgrade_db ' ,
98113 'deploy:unlock ' ,
99114 'cleanup ' ,
100115 'success ' ,
You can’t perform that action at this time.
0 commit comments