{"id":2282,"date":"2019-01-02T10:58:34","date_gmt":"2019-01-02T10:58:34","guid":{"rendered":"http:\/\/www.softaculous.com\/blog\/docs\/cli\/install-script-from-cli\/"},"modified":"2025-01-31T12:10:19","modified_gmt":"2025-01-31T12:10:19","slug":"install-script-from-cli","status":"publish","type":"docs","link":"https:\/\/www.softaculous.com\/blog\/docs\/cli\/install-script-from-cli\/","title":{"rendered":"Install Script from CLI"},"content":{"rendered":"\n<p class=\"alert alert-info wp-block-paragraph\"><strong>Note&nbsp;<\/strong>: At the moment this is possible for cPanel, Directadmin and Webuzo only.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install a Script from Command Line (Only For cPanel, Directadmin and Webuzo)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><br><strong>Softaculous allows you to install a script from command line. Here is the guide:<\/strong>&nbsp;<br><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Use the following command to install the script&nbsp;:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted bash hljs\">php \/path\/to\/softaculous\/cli.php --install --panel_user=USER --panel_pass=PASS --soft=26 --softdirectory=test --admin_username=admin --admin_pass=pass <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">E.g. for cPanel&nbsp;:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted bash hljs\">\/usr\/local\/cpanel\/3rdparty\/bin\/php \/usr\/local\/cpanel\/whostmgr\/docroot\/cgi\/softaculous\/cli.php --install --panel_user=USER --panel_pass=PASS --soft=26 --softdirectory=test --admin_username=admin --admin_pass=pass <\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Thats it. You have installed WordPress on your server.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Variables<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>In the above command the first parameter should be\u00a0<strong>&#8211;install<\/strong>\u00a0as this parameter will initiate the install function.<\/li><li><strong>&#8211;panel_user=USER<\/strong>. Here <strong>panel_user<\/strong>\u00a0is the field name and\u00a0<strong>USER<\/strong>\u00a0is the value for that field.<\/li><li><strong>soft=26<\/strong>\u00a0&#8211; This is the script id. 26 is for WordPress, you can find the script id in \/path\/to\/softaculous\/enduser\/scripts.php<\/li><li><strong>panel_user=USER<\/strong> &#8211; This is the control panel username<\/li><li><strong>panel_pass=PASS<\/strong> &#8211; This is the control panel password<\/li><li><strong>panel_host=domain.com<\/strong>\u00a0&#8211;\u00a0<strong>OPTIONAL<\/strong> : This is the hostname\/IP of the server. By default Softaculous will consider the same server where the command is executed.<\/li><li><strong>softdirectory=directory<\/strong>\u00a0&#8211;\u00a0<strong>OPTIONAL<\/strong>\u00a0: This is the directory where you wish to install the script. By default it will be installed on the root domain.<\/li><li><strong>admin_username=admin<\/strong>\u00a0&#8211;\u00a0<strong>OPTIONAL<\/strong>\u00a0: This is the username for the script&#8217;s admin user<\/li><li><strong>admin_pass=pass<\/strong>\u00a0&#8211;\u00a0<strong>OPTIONAL<\/strong>\u00a0: This is the password for the script&#8217;s admin user<\/li><li><strong>site_name=Site_Name<\/strong>\u00a0&#8211;\u00a0<strong>OPTIONAL<\/strong>\u00a0: This can be the Site Name for the script<\/li><li><strong>emailto=test@test.com<\/strong>\u00a0&#8211;\u00a0<strong>OPTIONAL<\/strong>\u00a0: The installation details will be sent to the email provided here. Note\u00a0: The email will be sent to the user by default and additionally to the email specified here.<\/li><li><strong>sets_name=SET-NAME_admin  <\/strong>&#8211;\u00a0<strong>OPTIONAL<\/strong>\u00a0: This is the set name which you want to install for the wordpress script. Note\u00a0: Here, <strong>SET-NAME<\/strong> is the name of your set and <strong>_admin <\/strong>is appended when the set is created in the admin panel. You can install multiple sets by passing the sets_name parameter several times.<\/li><\/ul>\n\n\n\n<p class=\"alert alert-info wp-block-paragraph\"><strong>NOTE: <\/strong>Please enclose your panel_user, panel_pass, admin_username, admin_pass, sets_name in single quotes(&#8216;) while passing in the CLI command above.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Similarly you can use any fields and the field name can be found in the install.xml of the script<\/p>\n","protected":false},"featured_media":0,"parent":1686,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","docs_category":[],"class_list":["post-2282","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/2282","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=2282"}],"version-history":[{"count":10,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/2282\/revisions"}],"predecessor-version":[{"id":3965,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/2282\/revisions\/3965"}],"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=2282"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs_category?post=2282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}