{"id":17508,"date":"2019-06-05T18:30:27","date_gmt":"2019-06-05T22:30:27","guid":{"rendered":"https:\/\/www.boldgrid.com\/support\/?p=17508"},"modified":"2021-08-24T12:21:20","modified_gmt":"2021-08-24T16:21:20","slug":"disabling-a-plugin-with-wp-cli","status":"publish","type":"post","link":"https:\/\/www.boldgrid.com\/support\/wordpress-tutorials\/disabling-a-plugin-with-wp-cli\/","title":{"rendered":"Disabling a Plugin with WP-CLI"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<?xml encoding=\"utf-8\" ?><html><body><h1 id=\"disabling-a-plugin-with-wp-cli\">Disabling a Plugin with WP-CLI<\/h1>\n<p>If you are <a href=\"https:\/\/www.boldgrid.com\/support\/total-upkeep\/site-check-fails\/\">troubleshooting a WordPress Fatal Error<\/a> and you need to disable a Plugin without access to your WordPress dashboard, you can use these instructions to disable it using the WordPress Command Line Interface, or WP-CLI.<\/p>\n<ol>\n<li><strong>SSH<\/strong> into your <a href=\"\/wordpress-hosting\/\">WordPress&nbsp;hosting account<\/a>, using your Web Host&rsquo;s instructions for doing so.<\/li>\n<li><strong>Change directories<\/strong>&nbsp;to the root directory containing your WordPress installation. In these examples, the directory&nbsp;<strong>~\/public_html<\/strong>&nbsp;is used in place of the root directory for WordPress.\n<pre>user@wordpress [~]$ cd ~\/public_html\/<\/pre>\n<\/li>\n<li><strong>Get a list of your plugins<\/strong>&nbsp;with the command&nbsp;<strong>wp plugin list<\/strong>:\n<pre>user@wordpress [~\/public_html]$ wp plugin list\r\n+-------------------------------+----------+--------+----------+\r\n| name                          | status   | update | version  |\r\n+-------------------------------+----------+--------+----------+\r\n| akismet                       | active   | none   | 4.1.2    |\r\n| boldgrid-backup               | active   | none   | 1.9.3    |\r\n| boldgrid-backup-premium       | active   | none   | 1.1.2    |\r\n| hello                         | inactive | none   | 1.7.2    |\r\n| jetpack                       | inactive | none   | 7.4      |\r\n+-------------------------------+----------+--------+----------+<\/pre>\n<p>In this example, the plugins Akismet, Total Upkeep (<a href=\"https:\/\/www.boldgrid.com\/support\/total-upkeep\/what-is-total-upkeep\/\">previously known as BoldGrid Backup<\/a>), and Total Upkeep Premium are currently active, and the list of names, or <strong>slugs<\/strong>, shows the other inactive plugins you have installed..<\/p><\/li>\n<li><strong>Deactivate a plugin<\/strong> using the command&nbsp;<strong>wp plugin deactivate plugin-slug<\/strong> where &ldquo;plugin-slug&rdquo; is replaced with the name of the plugin you saw from the previous command:\n<pre>user@wordpress [~\/public_html]$ wp plugin deactivate akismet\r\nPlugin 'akismet' deactivated.\r\nSuccess: Deactivated 1 of 1 plugins.<\/pre>\n<\/li>\n<li>If you receive an error, you may need to add one of the following modifiers to your command: &mdash;<strong>skip-themes&nbsp;<\/strong>or<strong> &ndash;skip-plugins<\/strong>\n<pre>user@wordpress [~\/public_html]$ wp plugin deactivate akismet --skip-themes --skip-plugins\r\nPlugin 'akismet' deactivated.\r\nSuccess: Deactivated 1 of 1 plugins.<\/pre>\n<\/li>\n<li>Optionally, if you&rsquo;re running a <strong>WordPress Multisite Network<\/strong>, and you&rsquo;d like to disable the plugin for all of the sites on the network, add the modifier <strong>&ndash;network<\/strong> to your command, like so:\n<pre>user@wordpress [~\/public_html]$ wp plugin deactivate akismet --network<\/pre>\n<\/li>\n<\/ol>\n<p>Congratulations! You now know how to deactivate a plugin using WP-CLI.<\/p>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Disabling a Plugin with WP-CLI If you are troubleshooting a WordPress Fatal Error and you need to disable a Plugin without access to your WordPress dashboard, you can use these instructions to disable it using the WordPress Command Line Interface, or WP-CLI. SSH into your WordPress&nbsp;hosting account, using your Web Host&rsquo;s instructions for doing so. [&hellip;]<\/p>\n","protected":false},"author":1294,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[151],"tags":[661],"class_list":["post-17508","post","type-post","status-publish","format-standard","hentry","category-wordpress-tutorials","tag-wordpress-tutorial","experience-level-advanced"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/17508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/users\/1294"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/comments?post=17508"}],"version-history":[{"count":11,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/17508\/revisions"}],"predecessor-version":[{"id":42102,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/17508\/revisions\/42102"}],"wp:attachment":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/media?parent=17508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/categories?post=17508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/tags?post=17508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}