Skip to content
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
4 changes: 1 addition & 3 deletions commands/Pressable_Site_Clone.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function ( $stream ) use ( &$safety_net_installed, $output ) {
);

if ( ! $safety_net_installed ) {
run_pressable_site_wp_cli_command( $site_clone->id, 'plugin install https://github.com/a8cteam51/safety-net/releases/latest/download/safety-net.zip' );
run_pressable_site_wp_cli_command( $site_clone->id, 'plugin install https://github.com/a8cteam51/safety-net/releases/latest/download/safety-net.zip --skip-plugins --skip-themes' );
$ssh_connection->exec( 'mv -f htdocs/wp-content/plugins/safety-net htdocs/wp-content/mu-plugins/safety-net' );
$ssh_connection->exec(
'ls htdocs/wp-content/mu-plugins',
Expand Down Expand Up @@ -280,8 +280,6 @@ function ( $stream ) use ( $site_clone, $output ) {
);
}

// Done last because it seems to cause issues sometimes with the connection breaking off.
run_pressable_site_wp_cli_command( $site_clone->id, "search-replace {$this->site->url} $site_clone->url" );
run_pressable_site_wp_cli_command( $site_clone->id, 'cache flush' );

return Command::SUCCESS;
Expand Down
3 changes: 1 addition & 2 deletions commands/WPCOM_Site_Clone.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ protected function execute( InputInterface $input, OutputInterface $output ): in
);

run_wpcom_site_wp_cli_command( $staging_site->id, 'config set WP_ENVIRONMENT_TYPE development --type=constant' );
run_wpcom_site_wp_cli_command( $staging_site->id, "search-replace {$this->site->URL} $staging_site_https_url" );
run_wpcom_site_wp_cli_command( $staging_site->id, 'cache flush' );

if ( $this->skip_safety_net ) {
Expand All @@ -201,7 +200,7 @@ function ( $stream ) use ( &$safety_net_installed, $output ) {
);

if ( ! $safety_net_installed ) {
run_wpcom_site_wp_cli_command( $transfer->blog_id, 'plugin install https://github.com/a8cteam51/safety-net/releases/latest/download/safety-net.zip' );
run_wpcom_site_wp_cli_command( $transfer->blog_id, 'plugin install https://github.com/a8cteam51/safety-net/releases/latest/download/safety-net.zip --skip-plugins --skip-themes' );
$ssh_connection->exec( 'mv -f htdocs/wp-content/plugins/safety-net htdocs/wp-content/mu-plugins/safety-net' );
$ssh_connection->exec(
'ls htdocs/wp-content/mu-plugins',
Expand Down