{"id":5915,"date":"2024-07-03T05:39:33","date_gmt":"2024-07-03T05:39:33","guid":{"rendered":"https:\/\/www.softaculous.com\/blog\/docs\/cli\/wordpress-cli-wp-cli\/"},"modified":"2025-01-31T12:10:19","modified_gmt":"2025-01-31T12:10:19","slug":"wp-cli","status":"publish","type":"docs","link":"https:\/\/www.softaculous.com\/blog\/docs\/cli\/wp-cli\/","title":{"rendered":"WordPress CLI (wp-cli)"},"content":{"rendered":"\n<p><strong>Softaculous ships the wp-cli with the WordPress package for all the panels<\/strong><\/p>\n\n\n\n<p>Use the following command to invoke wp-cli :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted bash hljs\">\/var\/softaculous\/wp\/wp-cli --path=\/path\/to\/wordpress\/installation <\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Get WordPress Info<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted bash hljs\">\/var\/softaculous\/wp\/wp-cli --info --path=\/home\/user\/public_html <\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install a Plugin<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted bash hljs\">\/var\/softaculous\/wp\/wp-cli plugin install loginizer --activate --path=\/home\/user\/public_html <\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">More Commands<\/h3>\n\n\n\n<p>You can use any wp-cli command as <a href=\"https:\/\/developer.wordpress.org\/cli\/commands\/\" target=\"_blank\" rel=\"noreferrer noopener\">documented here<\/a>.<\/p>\n\n\n\n<p><strong>Notes :<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always run the CLI as a user. Do not run as root<\/li>\n\n\n\n<li>&#8211;path parameter is important as it defines which WordPress installation to make the changes to. If you do not want to pass the <strong>&#8211;path<\/strong> parameter you can <strong>cd <\/strong>to the WordPress installation folder and then execute the commands. <\/li>\n\n\n\n<li>WordPress script should be enabled from Softaculous admin panel to be able to use wp-cli<\/li>\n<\/ul>\n","protected":false},"featured_media":0,"parent":1686,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","docs_category":[],"class_list":["post-5915","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/5915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/comments?post=5915"}],"version-history":[{"count":4,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/5915\/revisions"}],"predecessor-version":[{"id":5921,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/5915\/revisions\/5921"}],"up":[{"embeddable":true,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/1686"}],"wp:attachment":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/media?parent=5915"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs_category?post=5915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}