{"id":2169,"date":"2019-01-02T07:56:58","date_gmt":"2019-01-02T07:56:58","guid":{"rendered":"http:\/\/www.softaculous.com\/blog\/docs\/cli\/restore-installation-from-cli\/"},"modified":"2025-01-31T12:10:19","modified_gmt":"2025-01-31T12:10:19","slug":"restore-installation-from-cli","status":"publish","type":"docs","link":"https:\/\/www.softaculous.com\/blog\/docs\/cli\/restore-installation-from-cli\/","title":{"rendered":"Restore Installation 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 only.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Restore a Script from Command Line (Only For cPanel)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Softaculous allows you to restore 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 restore the script&nbsp;:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted bash hljs\">php \/path\/to\/softaculous\/cli.php --restore --file=FILENAME --restore_dir=1 --restore_db=1 --restore_datadir=1 --restore_wwwdir=1 <\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Thats it. You have restored your backup 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&nbsp;<strong>&#8211;restore<\/strong>&nbsp;as this parameter will initiate the restore function.<\/li><li><strong>&#8211;file=FILENAME<\/strong>&nbsp;&#8211; Here&nbsp;<strong>FILENAME<\/strong>&nbsp;is the name of the backup file (.tar.gz) to be restored. For eg.: wp.26_45368.2015-11-17_05-26-39.tar.gz<\/li><li><strong>&#8211;restore_dir=1<\/strong>&nbsp;&#8211; If set to 1, it will restore the installation directory.<\/li><li><strong>&#8211;restore_db=1<\/strong>&nbsp;&#8211; If set to 1, it will restore the database.<\/li><li><strong>&#8211;restore_datadir=1<\/strong>&nbsp;&#8211; If set to 1, it will restore the installation&#8217;s data directory. This parameter is used only if the script contains the Data Directory<\/li><li><strong>&#8211;restore_wwwdir=1<\/strong>&nbsp;&#8211; If set to 1, it will restore the installation&#8217;s www directory. This parameter is used only if the script contains www directory.<\/li><\/ul>\n","protected":false},"featured_media":0,"parent":1686,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","docs_category":[],"class_list":["post-2169","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/2169","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=2169"}],"version-history":[{"count":5,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/2169\/revisions"}],"predecessor-version":[{"id":5266,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/2169\/revisions\/5266"}],"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=2169"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs_category?post=2169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}