Skip to content

Commit

Permalink
add gzdeflated size
Browse files Browse the repository at this point in the history
  • Loading branch information
trepmal committed Dec 25, 2024
1 parent 6a64b20 commit ab0fdcd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wp-cli/alloptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function find( $args, $assoc_args ) {
WP_CLI\Utils\format_items( $assoc_args['format'], $options, array( 'name', 'size' ) );

WP_CLI::line( sprintf( 'Size of serialized alloptions for this blog: %s', size_format( strlen( serialize( $alloptions ) ) ) ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize
WP_CLI::line( sprintf( 'Size of serialized alloptions for this blog (gzdeflate): %s', size_format( strlen( gzdeflate( serialize( $alloptions ) ) ), 2 ) ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize
WP_CLI::line( "\tuse `wp option get <option_name>` to view a big option" );
WP_CLI::line( "\tuse `wp option delete <option_name>` to delete a big option" );
WP_CLI::line( "\tuse `wp option set-autoload <option_name> no` to disable autoload for option" );
Expand Down

0 comments on commit ab0fdcd

Please sign in to comment.