{"id":4717,"date":"2018-10-17T18:55:44","date_gmt":"2018-10-17T18:55:44","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2018\/10\/17\/manage-wordpress-plugins-wp-cli\/"},"modified":"2022-04-04T16:18:42","modified_gmt":"2022-04-04T20:18:42","slug":"manage-wordpress-plugins-wp-cli","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/","title":{"rendered":"Manage WordPress Plugins with WP-CLI"},"content":{"rendered":"<p>InMotion Hosting servers have WordPress Command Line Interface (WP-CLI) installed. Therefore, you can <a href=\"\/support\/edu\/wordpress\/wp-cli\/install-a-plugin-using-wp-cli\/\" rel=\"noopener noreferrer\" target=\"_blank\">install and toggle <\/a> a WordPress plugin using SSH in lieu of the <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wordpress-plugins-widgets\/searching-for-a-installing-plugins\">WordPress dashboard<\/a>. You may want to activate a newly uploaded plugin. Maybe a recently updated plugin prevents you from <a href=\"\/support\/edu\/wordpress\/logging-into-wordpress-dashboard\/\" rel=\"noopener noreferrer\" target=\"_blank\">logging into your WordPress site<\/a>. Or <a href=\"\/support\/edu\/virtuemart-3\/installation\/\" rel=\"noopener noreferrer\" target=\"_blank\">WordFence Security<\/a> notified you that a plugin hasn&#8217;t been updated in over a year and you want to uninstall it for security purposes. Regardless of the reason, below we cover how to <strong>deactivate, remove, and update a WordPress plugin via WP-CLI<\/strong>.<\/p>\n<p><a class=\"btn btn-primary\" href=\"#deactivate\" type=\"button\">Deactivate<\/a> <a class=\"btn btn-primary\" href=\"#remove\" type=\"button\">Remove<\/a> <a class=\"btn btn-primary\" href=\"#update\" type=\"button\">Update<\/a> <a name=\"deactivate\"><\/a><\/p>\n<h2>Activate and Deactivate Plugins<\/h2>\n<ol class=\"article_list\">\n<li><strong><a href=\"\/support\/server\/ssh\/do-you-provide-ssh-access\/\" rel=\"noopener noreferrer\" target=\"_blank\">SSH into the cPanel account<\/a><\/strong> which owns the website.<\/li>\n<li>Use the <span class=\"code_block\">cd<\/span> command to <strong>enter the <a href=\"\/support\/server\/ssh\/how-to-login-ssh\/\" rel=\"noopener noreferrer\" target=\"_blank\">domain&#8217;s document root<\/a><\/strong>, e.g. <code>cd public_html<\/code>.<\/li>\n<li><strong>Ensure you&#8217;re in the correct directory<\/strong> with the following command:\n<pre class=\"cli\">wp option get home &amp;&amp; wp option get siteurl    \n\n   https:\/\/example.com   \n   https:\/\/example.com<\/pre>\n<\/li>\n<li><strong>View the installed plugins<\/strong> for the WordPress website:\n<pre class=\"cli\">wp plugin list   \n\n+--------------------+----------+--------+---------+  \n| name               | status   | update | version |  \n+--------------------+----------+--------+---------+  \n| akismet            | active   | none   | 4.0.8   |  \n| redirection        | inactive | none   | 3.5     |  \n| wp-piwik           | active   | none   | 1.0.19  |  \n| wp-super-cache     | active   | none   | 1.6.4   |  \n| advanced-cache.php | dropin   | none   |         |  \n+--------------------+----------+--------+---------+<\/pre>\n<\/li>\n<li>Type the following to <strong>activate the plugin<\/strong>, replacing <em>plugin<\/em> with the plugin name from the wp plugin list:\n<pre class=\"cli\">wp plugin activate <em>plugin<\/em>    \n\n   Plugin '<em>plugin<\/em>' activated.   \n   Success: Toggled 1 of 1 plugins.<\/pre>\n<\/li>\n<li>Type the following to <strong>deactivate the plugin<\/strong> but leave it installed:\n<pre class=\"cli\">wp plugin deactivate <em>plugin<\/em>    \n\n   Plugin '<em>plugin<\/em>' deactivated.   \n   Success: Deactivated 1 of 1 plugins.<\/pre>\n<\/li>\n<li>Type the following to <strong>activate or deactivate the plugin<\/strong> depending on its former state with a single command:\n<pre class=\"cli\">wp plugin toggle <em>plugin<\/em>    \n\n   Plugin '<em>plugin<\/em>' deactivated.   \n   Success: Toggled 1 of 1 plugins.<\/pre>\n<\/li>\n<\/ol>\n<p><a name=\"remove\"><\/a><\/p>\n<h2>Remove Plugins<\/h2>\n<h3>Uninstall Plugins<\/h3>\n<ol class=\"article_list\"> Type the following to <strong>uninstall a plugin<\/strong>:<\/p>\n<pre class=\"cli\">wp plugin uninstall <em>plugin<\/em>   \n\n  Uninstalled and deleted '<em>plugin<\/em>' plugin.  \n  Success: Uninstalled 1 of 1 plugins.<\/pre>\n<\/ol>\n<h3>Delete Plugins<\/h3>\n<ol class=\"article_list\"> Type the following to <strong>delete a plugin<\/strong> without deactivating or uninstalling it first:<\/p>\n<pre class=\"cli\">wp plugin delete <em>plugin<\/em>   \n\n  Deleted '<em>plugin<\/em>' plugin.  \n  Success: Deleted 1 of 1 plugins<\/pre>\n<p class=\"alert-info\"><strong>Note:<\/strong> Whether this fixes an issue better than uninstalling it varies per plugin.<\/p>\n<\/ol>\n<p><a name=\"update\"><\/a><\/p>\n<h2>Update Plugins<\/h2>\n<ol class=\"article_list\">\n<li>Type the following to <strong>update a plugin<\/strong>:\n<pre class=\"cli\">wp plugin update <em>plugin<\/em>   \n\n  Plugin updated successfully.  \n  Success: Updated 1 of 1 plugins.<\/pre>\n<\/li>\n<\/ol>\n<p>You can read more about using WP-CLI in our <a href=\"\/support\/edu\/wordpress\/wp-cli\/\" rel=\"noopener noreferrer\" target=\"_blank\">WP-CLI Education Channel<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>InMotion Hosting servers have WordPress Command Line Interface (WP-CLI) installed. Therefore, you can install and toggle a WordPress plugin using SSH in lieu of the WordPress dashboard. You may want to activate a newly uploaded plugin. Maybe a recently updated plugin prevents you from logging into your WordPress site. Or WordFence Security notified you that<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-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-4717","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 Plugins with WP-CLI | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Learn how to activate and deactivate WordPress plugins with WP-CLI\" \/>\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-plugins-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 Plugins with WP-CLI | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Learn how to activate and deactivate WordPress plugins with WP-CLI\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-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=\"2018-10-17T18:55:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-04T20:18:42+00:00\" \/>\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=\"2 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-plugins-wp-cli\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"Manage WordPress Plugins with WP-CLI\",\"datePublished\":\"2018-10-17T18:55:44+00:00\",\"dateModified\":\"2022-04-04T20:18:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/\"},\"wordCount\":252,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"WP-CLI\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/\",\"name\":\"Manage WordPress Plugins with WP-CLI | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2018-10-17T18:55:44+00:00\",\"dateModified\":\"2022-04-04T20:18:42+00:00\",\"description\":\"Learn how to activate and deactivate WordPress plugins with WP-CLI\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Manage WordPress Plugins with 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 Plugins with WP-CLI | InMotion Hosting","description":"Learn how to activate and deactivate WordPress plugins with WP-CLI","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-plugins-wp-cli\/","og_locale":"en_US","og_type":"article","og_title":"Manage WordPress Plugins with WP-CLI | InMotion Hosting","og_description":"Learn how to activate and deactivate WordPress plugins with WP-CLI","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2018-10-17T18:55:44+00:00","article_modified_time":"2022-04-04T20:18:42+00:00","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":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"Manage WordPress Plugins with WP-CLI","datePublished":"2018-10-17T18:55:44+00:00","dateModified":"2022-04-04T20:18:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/"},"wordCount":252,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["WP-CLI"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/","name":"Manage WordPress Plugins with WP-CLI | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2018-10-17T18:55:44+00:00","dateModified":"2022-04-04T20:18:42+00:00","description":"Learn how to activate and deactivate WordPress plugins with WP-CLI","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/manage-wordpress-plugins-wp-cli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Manage WordPress Plugins with 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\/4717","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=4717"}],"version-history":[{"count":4,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4717\/revisions"}],"predecessor-version":[{"id":95628,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4717\/revisions\/95628"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=4717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=4717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=4717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}