Update tool for WordPress sites
-
If the connection information is not included in the
env.json
file, run the following command and then write the necessary information in the.env.json
file.task add
The necessary information are as follows.
- name: # unique name stg: host: # Host written in ~/.ssh/config pass: xxxxx # password for Host (if not password authentication, set any string) wp_dir: # WordPress document root wp_cmd: # wp command wp_log: # log file path prod: host: # Host written in ~/.ssh/config pass: xxxxx # password for Host (if not password authentication, set any string) wp_dir: # WordPress document root wp_cmd: # wp command wp_log: # log file path
-
To set the required information in
.env
, execute the following command.task init -- <name> <environment>
-
Next, execute the following command. This command will back up and version your plugins and themes, as well as activate WP's debug mode.
task prepare
-
If you have plugins or themes that you do not want to update, set
update
tonone
inplugin.json
ortheme.json
. -
To view the update information, execute the following command.
task show
-
The following command will actually perform the upgrade.
task update
-
After the upgrade is complete, execute the following command. This command reverts
wp-config.php
back to its original state and gets a backup of the log.task clean
-
To delete the log in server, execute the following command.
task rmlog