ROOTPLOIT
Server: LiteSpeed
System: Linux in-mum-web1878.main-hosting.eu 5.14.0-570.21.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 11 07:22:35 EDT 2025 x86_64
User: u435929562 (435929562)
PHP: 7.4.33
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/.wp-cli/packages/vendor/wp-cli/entity-command/features/comment-recount.feature
Feature: Recount comments on a post

  Scenario: Recount comments on a post
    Given a WP install

    When I run `wp comment create --comment_post_ID=1 --comment_approved=1 --porcelain`
    And I run `wp comment create --comment_post_ID=1 --comment_approved=1 --porcelain`
    And I run `wp post get 1 --field=comment_count`
    Then STDOUT should be:
      """
      3
      """

    When I run `wp eval 'global $wpdb; $wpdb->update( $wpdb->posts, array( "comment_count" => 1 ), array( "ID" => 1 ) );'`
    And I run `wp post get 1 --field=comment_count`
    Then STDOUT should be:
      """
      1
      """

    When I run `wp comment recount 1`
    Then STDOUT should be:
      """
      Updated post 1 comment count to 3.
      """

    When I try `wp comment recount 99999999`
    Then STDERR should be:
      """
      Warning: Post 99999999 doesn't exist.
      """