{"id":4264,"date":"2017-12-20T02:20:41","date_gmt":"2017-12-20T02:20:41","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2017\/12\/20\/manage-wordpress-comments-using-wp-cli\/"},"modified":"2024-03-11T16:41:14","modified_gmt":"2024-03-11T20:41:14","slug":"manage-wordpress-comments-using-wp-cli","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/","title":{"rendered":"Manage WordPress Comments Using WP-CLI"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI-1024x538.png\" alt=\"\" class=\"wp-image-105540\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI-1024x538.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI-300x158.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI-768x403.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI.png 1200w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>The ability to work with your WordPress website(s) from the Command Line Interface (<em>CLI<\/em>), is one of the many great features available with <a href=\"https:\/\/inmotionhosting.com\/wordpress-hosting\">WordPress Hosting<\/a> by InMotion Hosting.<\/p>\n\n\n\n<p>For instance, using the <strong>WordPress Command Line Interface<\/strong> (<em>WP-CLI<\/em>) command: <em>wp comment<\/em>, you can manage comments that visitors have left on your blog posts and pages, directly from the command line. In this guide, you will learn how to view, moderate, edit, and delete WordPress comments using <strong>WP-CLI<\/strong>.<\/p>\n\n\n\n<p><!-- View Comments --> <a name=\"view-comments\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">View Comments<\/h2>\n\n\n\n<p>One of the most important tasks involved in managing your WordPress blog, is viewing the comments that visitors\/users write. WP-CLI commands make this process simple while working from the command line. Follow the steps below to learn how to <strong>view comments<\/strong>, using the <em>wp comment<\/em> command.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a title=\"Click here to navigate to our guide and learn how to SSH into your server.\" href=\"\/support\/server\/ssh\/shared-reseller-ssh\/\" target=\"_blank\" rel=\"noopener\">SSH into your server<\/a> as the cPanel user that owns the website you want to view WordPress comments on.<\/li>\n\n\n\n<li>Use the <span class=\"cli\">cd<\/span> command to switch to the <a title=\"Click here to navigate to our guide and learn how to find the document root directory of your website.\" href=\"\/support\/website\/where-to-upload-files\/\" target=\"_blank\" rel=\"noopener\">document root directory of your website<\/a>.\n<p>Example: <span class=\"cli\">cd <b>public_html\/my_website<\/b><\/span><\/p>\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <span class=\"cli\"><b>public_html\/my_website<\/b><\/span> with the actual path to the document root directory of your website.<\/div>\n<\/li>\n\n\n\n<li>Run the following command:\n<p><span class=\"cli\">wp comment list<\/span><\/p>\n<p>The output of this command by default, will display a table of the WordPress comments for your website, as shown in the example output below:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2017\/12\/edu_wp-cli_moderate-comments_wp-comment-list-example-cli-output.png\" alt=\"wp comment list command example output\" align=\"center\"><\/figure><p><\/p>\n<div style=\"clear: both;\">\u00a0<\/div>\n<\/li>\n\n\n\n<li>Using the <em>wp comment list<\/em> command these fields will be displayed by default for each comment:\n<p><span class=\"code_block\">comment_ID<\/span><br><span class=\"code_block\">comment_post_ID<\/span><br><span class=\"code_block\">comment_date<\/span><br><span class=\"code_block\">comment_approved<\/span><br><span class=\"code_block\">comment_author<\/span><br><span class=\"code_block\">comment_author_email<\/span><\/p>\n<p>Although this information is useful, it does not provide the actual content of the comment. However, it does provide the <em>comment_ID<\/em>, which is needed to view the additional details of each comment. Using the <em>comment_ID<\/em> with the <em>wp comment<\/em> command, you can view the content of the comment. This is accomplished by specifying <em>comment_content<\/em> as the field in your command. The following format is an example of how to do this:<\/p>\n<p><span class=\"cli\">wp comment get <b>$comment_ID<\/b> \u2013field=<b>$field<\/b><\/span><\/p>\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <b>$comment_ID<\/b> with the <em>comment_ID<\/em> value (found in the previous step) of the comment you want to view details for. To see the content of the comment, replace <b>$field<\/b> with the option: <b>comment_content<\/b>.<\/div>\n<pre class=\"cli\">exampl3@example.com [~\/public_html]# wp comment get <b>1<\/b> --field=<b>comment_content<\/b> Hi, this is a comment. To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard. Commenter avatars come from &lt;a href=\"https:\/\/gravatar.com\"&gt;Gravatar&lt;\/a&gt;.<\/pre>\n<\/li>\n<\/ol>\n\n\n\n<p>Now that you have reviewed the content of the comment you can moderate it. The next section will continue to use this comment as the example in the instructions to <strong>moderate a comment<\/strong>.<\/p>\n\n\n\n<p><!-- Moderate Comments --> <a name=\"moderate-comments\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Moderate Comments<\/h2>\n\n\n\n<p>Moderating comments is important if you have <em>Comment must be manually approved<\/em> set in WordPress\u2019s Discussion Settings. When enabled, a comment must be approved before it appears on your website. This is a good precaution to take, to avoid allowing visitors to post unwanted\/unfiltered content in your comments unknowingly. In this case, you will need to approve the comment prior to it appearing on your website. Simply follow the instructions below to learn how to moderate the comment we viewed in the previous section\u2019s example.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Approve<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a title=\"Click here to navigate to our guide and learn how to SSH into your server.\" href=\"\/support\/server\/ssh\/shared-reseller-ssh\/\" target=\"_blank\" rel=\"noopener\">SSH into your server<\/a> as the cPanel user that owns the website you would like to moderate WordPress comments on.<\/li>\n\n\n\n<li>Use the <span class=\"cli\">cd<\/span> command to switch to the <a title=\"Click here to navigate to our guide and learn how to find the document root directory of your website.\" href=\"\/support\/website\/where-to-upload-files\/\" target=\"_blank\" rel=\"noopener\">document root directory of your website<\/a>.\n<p>Example: <span class=\"cli\">cd <b>public_html\/my_website<\/b><\/span><\/p>\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <span class=\"cli\"><b>public_html\/my_website<\/b><\/span> with the actual path to the document root directory of your website.<\/div>\n<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;li&gt;Locate the &lt;em&gt;comment_ID&lt;\/em&gt; as instructed by the directions in the &lt;a href=\"#view-comments\" target=\"_blank\" title=\"Click here to review the previous section's instructions to locate the value of comment_ID.\" rel=\"noopener\"&gt;\"View Comments\" section&lt;\/a&gt;.&lt;\/li&gt;\n&lt;li&gt;Run the following command:\n<\/code><\/pre>\n\n\n\n<p><span class=\"cli\">wp comment approve <b>$comment_ID<\/b><\/span><\/p>\n\n\n\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <b>$comment_ID<\/b> with the <em>comment_ID<\/em> value (found in the previous step) of the comment you want to approve.<\/div>\n\n\n\n<pre class=\"wp-block-preformatted\">exampl3@example.com [~\/public_html]# wp comment approve 1\n<span style=\"color: lime;\">Success: <\/span>Approved comment 1.<\/pre>\n\n\n\n<p>Since the comment has been <strong>moderated<\/strong> and <strong>approved<\/strong>, it will now appear on your website. However, if you moderate a comment that is clearly Spam, you could <strong>mark a comment as Spam<\/strong>, using WP-CLI, by following the steps below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mark as Spam<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a title=\"Click here to navigate to our guide and learn how to SSH into your server.\" href=\"\/support\/server\/ssh\/shared-reseller-ssh\/\" target=\"_blank\" rel=\"noopener\">SSH into your server<\/a> as the cPanel user that owns the website you would like to moderate WordPress comments on.<\/li>\n\n\n\n<li>Use the <span class=\"cli\">cd<\/span> command to switch to the <a title=\"Click here to navigate to our guide and learn how to find the document root directory of your website.\" href=\"\/support\/website\/where-to-upload-files\/\" target=\"_blank\" rel=\"noopener\">document root directory of your website<\/a>.\n<p>Example: <span class=\"cli\">cd <b>public_html\/my_website<\/b><\/span><\/p>\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <span class=\"cli\"><b>public_html\/my_website<\/b><\/span> with the actual path to the document root directory of your website.<\/div>\n<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;li&gt;Locate the &lt;em&gt;comment_ID&lt;\/em&gt; as instructed by the directions in the &lt;a href=\"#view-comments\" target=\"_blank\" title=\"Click here to review the previous section's instructions to locate the value of comment_ID.\" rel=\"noopener\"&gt;\"View Comments\" section&lt;\/a&gt;.&lt;\/li&gt;\n&lt;li&gt;Run the following command:\n<\/code><\/pre>\n\n\n\n<p><span class=\"cli\">wp comment spam <b>$comment_ID<\/b><\/span><\/p>\n\n\n\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <b>$comment_ID<\/b> with the <em>comment_ID<\/em> value (found in the previous step) of the comment you want to mark as spam.<\/div>\n\n\n\n<pre class=\"wp-block-preformatted\">exampl3@example.com [~\/public_html]# wp comment spam 2\n<span style=\"color: lime;\">Success: <\/span>Marked as spam comment 2.<\/pre>\n\n\n\n<p>Now that you have moderated your comment to mark it as Spam, it will not display in your website. Marking comments as Spam, helps to identify which comments can be deleted, without disrupting the desired comments. However, if you accidentally mark a comment as Spam, you can unmark it. Simply follow the instructions below to learn how to <strong>unmark a comment as Spam<\/strong>. <!-- Moderate -UnSpam- Comments --><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Unmark Spam<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a title=\"Click here to navigate to our guide and learn how to SSH into your server.\" href=\"\/support\/server\/ssh\/shared-reseller-ssh\/\" target=\"_blank\" rel=\"noopener\">SSH into your server<\/a> as the cPanel user that owns the website you are moderating WordPress comments on.<\/li>\n\n\n\n<li>Use the <span class=\"cli\">cd<\/span> command to switch to the <a title=\"Click here to navigate to our guide and learn how to find the document root directory of your website.\" href=\"\/support\/website\/where-to-upload-files\/\" target=\"_blank\" rel=\"noopener\">document root directory of your website<\/a>.\n<p>Example: <span class=\"cli\">cd <b>public_html\/my_website<\/b><\/span><\/p>\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <span class=\"cli\"><b>public_html\/my_website<\/b><\/span> with the actual path to the document root directory of your website.<\/div>\n<\/li>\n\n\n\n<li>Locate the <em>comment_ID<\/em> as instructed by the directions in the <a title=\"Click here to review the previous section's instructions to locate the value of comment_ID.\" href=\"#view-comments\" target=\"_blank\" rel=\"noopener\">\u201cView Comments\u201d section<\/a>.<\/li>\n\n\n\n<li>Run the following command:\n<p><span class=\"cli\">wp comment unspam <b>$comment_ID<\/b><\/span><\/p>\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <b>$comment_ID<\/b> with the <em>comment_ID<\/em> value (found in the previous step) of the comment you want to unmark as spam.<\/div>\n<pre class=\"cli\">exampl3@example.com [~\/public_html]# wp comment unspam 2\n<span style=\"color: lime;\">Success: <\/span>Unspammed comment 2.<\/pre>\n<\/li>\n<\/ol>\n\n\n\n<p><!-- Edit Comments --> <a name=\"edit-comments\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Edit<\/h2>\n\n\n\n<p>Using the <em>wp comment<\/em> command, you can edit various fields to update comment details. The steps below will guide you through how to <strong>edit a comment<\/strong>.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a title=\"Click here to navigate to our guide and learn how to SSH into your server.\" href=\"\/support\/server\/ssh\/shared-reseller-ssh\/\" target=\"_blank\" rel=\"noopener\">SSH into your server<\/a> as the cPanel user that owns the website you want to edit WordPress comments on.<\/li>\n\n\n\n<li>Use the <span class=\"cli\">cd<\/span> command to switch to the <a title=\"Click here to navigate to our guide and learn how to find the document root directory of your website.\" href=\"\/support\/website\/where-to-upload-files\/\" target=\"_blank\" rel=\"noopener\">document root directory of your website<\/a>.\n<p>Example: <span class=\"cli\">cd <b>public_html\/my_website<\/b><\/span><\/p>\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <span class=\"cli\"><b>public_html\/my_website<\/b><\/span> with the actual path to the document root directory of your website.<\/div>\n<\/li>\n\n\n\n<li>Locate the <em>comment_ID<\/em> as instructed by the directions in the <a title=\"Click here to review the previous section's instructions to locate the value of comment_ID.\" href=\"#view-comments\" target=\"_blank\" rel=\"noopener\">\u201cView Comments\u201d section<\/a>.<\/li>\n\n\n\n<li>Run the following command:\n<p><span class=\"cli\">wp comment update <b>$comment_ID<\/b> \u2014<b>$field<\/b>=<b>$value<\/b><\/span><\/p>\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <b>$comment_ID<\/b> with the <em>comment_ID<\/em> value (found in the previous step) of the comment you want to edit. Also, refer to the table below for the optional <b>$field<\/b> you can update to the <b>$value<\/b> you want, using WP-CLI.<\/div>\n<pre class=\"cli\">exampl3@example.com [~\/public_html]# wp comment update 4 --comment_author=A WP Admin\n<span style=\"color: lime;\">Success: <\/span>Updated comment 4.<\/pre>\n<\/li>\n<\/ol>\n\n\n\n<p>Now that you are familiar with updating a comment, you can update any of the available fields using this same method. The available fields are:<br><span class=\"code_block\">comment_ID<\/span><br><span class=\"code_block\">comment_post_ID<\/span><br><span class=\"code_block\">comment_date<\/span><br><span class=\"code_block\">comment_approved<\/span><br><span class=\"code_block\">comment_author<\/span><br><span class=\"code_block\">comment_author_email<\/span><br><span class=\"code_block\">comment_author_url<\/span><br><span class=\"code_block\">comment_author_IP<\/span><br><span class=\"code_block\">comment_date_gmt<\/span><br><span class=\"code_block\">comment_content<\/span><br><span class=\"code_block\">comment_karma<\/span><br><span class=\"code_block\">comment_agent<\/span><br><span class=\"code_block\">comment_type<\/span><br><span class=\"code_block\">comment_parent<\/span><br><span class=\"code_block\">user_id<\/span><\/p>\n\n\n\n<p><!-- Delete Comments --> <a name=\"delete-comments\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Delete<\/h2>\n\n\n\n<p>Deleting comments is as simple as editing or listing them. Follow the steps below to learn how to <strong>delete a comment<\/strong> using WP-CLI.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a title=\"Click here to navigate to our guide and learn how to SSH into your server.\" href=\"\/support\/server\/ssh\/shared-reseller-ssh\/\" target=\"_blank\" rel=\"noopener\">SSH into your server<\/a> as the cPanel user that owns the website you want to delete WordPress comments on.<\/li>\n\n\n\n<li>Use the <span class=\"cli\">cd<\/span> command to switch to the <a title=\"Click here to navigate to our guide and learn how to find the document root directory of your website.\" href=\"\/support\/website\/where-to-upload-files\/\" target=\"_blank\" rel=\"noopener\">document root directory of your website<\/a>.\n<p>Example: <span class=\"cli\">cd <b>public_html\/my_website<\/b><\/span><\/p>\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <span class=\"cli\"><b>public_html\/my_website<\/b><\/span> with the actual path to the document root directory of your website.<\/div>\n<\/li>\n\n\n\n<li>Locate the <em>comment_ID<\/em> as instructed by the directions in the <a title=\"Click here to review the previous section's instructions to locate the value of comment_ID.\" href=\"#view-comments\" target=\"_blank\" rel=\"noopener\">\u201cView Comments\u201d section<\/a>.<\/li>\n\n\n\n<li>Run the following command:\n<p><span class=\"cli\">wp comment delete <b>$comment_ID<\/b><\/span><\/p>\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <b>$comment_ID<\/b> with the <em>comment_ID<\/em> value (found in the previous step) of the comment you want to delete.<\/div>\n<pre class=\"cli\">exampl3@example.com [~\/public_html]# wp comment delete 2 \n<span style=\"color: lime;\">Success: <\/span>Trashed comment 2.<\/pre>\n<\/li>\n<\/ol>\n\n\n\n<p>Congratulations! You are now familiar with how to moderate comments from the command line, using the <em>wp comment<\/em> command. To learn more about using <strong>WP-CLI<\/strong>, be sure to check out our <a title=\"Click here to navigate to our Education Channel and learn more ways you can use WP-CLI to manage your WordPress website(s).\" href=\"\/support\/edu\/wordpress\/wp-cli\/\" target=\"_blank\" rel=\"noopener\">Education Channel<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The ability to work with your WordPress website(s) from the Command Line Interface (CLI), is one of the many great features available with WordPress Hosting by InMotion Hosting. For instance, using the WordPress Command Line Interface (WP-CLI) command: wp comment, you can manage comments that visitors have left on your blog posts and pages, directly<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57014,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4374],"tags":[],"class_list":["post-4264","post","type-post","status-publish","format-standard","hentry","category-wp-cli"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Manage WordPress Comments Using WP-CLI | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"In this guide, you will learn how to view, moderate, edit, and delete WordPress comments using the WP-CLI command wp comment.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Manage WordPress Comments Using WP-CLI | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"In this guide, you will learn how to view, moderate, edit, and delete WordPress comments using the WP-CLI command wp comment.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-20T02:20:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-11T20:41:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI-1024x538.png\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"Manage WordPress Comments Using WP-CLI\",\"datePublished\":\"2017-12-20T02:20:41+00:00\",\"dateModified\":\"2024-03-11T20:41:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/\"},\"wordCount\":1277,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI-1024x538.png\",\"articleSection\":[\"WP-CLI\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/\",\"name\":\"Manage WordPress Comments Using WP-CLI | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI-1024x538.png\",\"datePublished\":\"2017-12-20T02:20:41+00:00\",\"dateModified\":\"2024-03-11T20:41:14+00:00\",\"description\":\"In this guide, you will learn how to view, moderate, edit, and delete WordPress comments using the WP-CLI command wp comment.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI.png\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI.png\",\"width\":1200,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Manage WordPress Comments Using WP-CLI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Manage WordPress Comments Using WP-CLI | InMotion Hosting","description":"In this guide, you will learn how to view, moderate, edit, and delete WordPress comments using the WP-CLI command wp comment.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/","og_locale":"en_US","og_type":"article","og_title":"Manage WordPress Comments Using WP-CLI | InMotion Hosting","og_description":"In this guide, you will learn how to view, moderate, edit, and delete WordPress comments using the WP-CLI command wp comment.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2017-12-20T02:20:41+00:00","article_modified_time":"2024-03-11T20:41:14+00:00","og_image":[{"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI-1024x538.png","type":"","width":"","height":""}],"author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"Manage WordPress Comments Using WP-CLI","datePublished":"2017-12-20T02:20:41+00:00","dateModified":"2024-03-11T20:41:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/"},"wordCount":1277,"commentCount":1,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI-1024x538.png","articleSection":["WP-CLI"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/","name":"Manage WordPress Comments Using WP-CLI | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI-1024x538.png","datePublished":"2017-12-20T02:20:41+00:00","dateModified":"2024-03-11T20:41:14+00:00","description":"In this guide, you will learn how to view, moderate, edit, and delete WordPress comments using the WP-CLI command wp comment.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/Manage-WordPress-Comments-using-WP-CLI.png","width":1200,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-comments-using-wp-cli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Manage WordPress Comments Using WP-CLI"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4374,"name":"WP-CLI","slug":"wp-cli","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57014"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=4264"}],"version-history":[{"count":7,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4264\/revisions"}],"predecessor-version":[{"id":109003,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4264\/revisions\/109003"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=4264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=4264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=4264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}