mirror of
https://ghproxy.net/https://github.com/jonbp/wp-cli-sync.git
synced 2025-08-17 19:01:27 +08:00
Optimisations → Path Tweaks
This commit is contained in:
parent
6a9720f911
commit
165376b6ee
3 changed files with 5 additions and 5 deletions
|
@ -17,5 +17,5 @@ $dev_deactivated_plugins = $_ENV['DEV_DEACTIVATED_PLUGINS'];
|
|||
chdir(ABSPATH.'../../');
|
||||
|
||||
// Activate Maintenance Mode
|
||||
$command = ABSPATH . '/../../vendor/bin/wp maintenance-mode activate';
|
||||
$command = 'vendor/bin/wp maintenance-mode activate';
|
||||
exec($command);
|
|
@ -14,7 +14,7 @@ if (`which pv`) {
|
|||
$pipe = '|';
|
||||
}
|
||||
|
||||
$command = 'ssh '.$ssh_username.'@'.$ssh_hostname.' "bash -c \"cd '.$rem_proj_loc.' && '.$rem_proj_loc.'/vendor/bin/wp db export --single-transaction -\"" '.$pipe. ' ' . ABSPATH . '/../../vendor/bin/wp db import -';
|
||||
$command = 'ssh '.$ssh_username.'@'.$ssh_hostname.' "bash -c \"cd '.$rem_proj_loc.' && '.$rem_proj_loc.'/vendor/bin/wp db export --single-transaction -\"" '.$pipe. ' vendor/bin/wp db import -';
|
||||
debug_message($command);
|
||||
system($command);
|
||||
|
||||
|
@ -22,7 +22,7 @@ system($command);
|
|||
* TASK: Post sync queries
|
||||
*/
|
||||
if ($queries = $_ENV['DEV_POST_SYNC_QUERIES']) {
|
||||
$command = ABSPATH . '/../../vendor/bin/wp db query "' . preg_replace('/(`|")/i', '\\\\${1}', $queries) . '"';
|
||||
$command = 'vendor/bin/wp db query "' . preg_replace('/(`|")/i', '\\\\${1}', $queries) . '"';
|
||||
debug_message($command);
|
||||
system($command);
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
if (!empty($dev_activated_plugins)) {
|
||||
task_message('Activate Plugins');
|
||||
$cleaned_arr_list = preg_replace('/[ ,]+/', ' ', trim($dev_activated_plugins));
|
||||
$command = ABSPATH . '/../../vendor/bin/wp plugin activate '.$cleaned_arr_list;
|
||||
$command = 'vendor/bin/wp plugin activate '.$cleaned_arr_list;
|
||||
debug_message($command);
|
||||
system($command);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ if (!empty($dev_activated_plugins)) {
|
|||
if (!empty($dev_deactivated_plugins)) {
|
||||
task_message('Deactivate Plugins');
|
||||
$cleaned_arr_list = preg_replace('/[ ,]+/', ' ', trim($dev_deactivated_plugins));
|
||||
$command = ABSPATH . '/../../vendor/bin/wp plugin deactivate '.$cleaned_arr_list;
|
||||
$command = 'vendor/bin/wp plugin deactivate '.$cleaned_arr_list;
|
||||
debug_message($command);
|
||||
system($command);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue