{"id":33060,"date":"2019-02-04T18:47:07","date_gmt":"2019-02-04T16:47:07","guid":{"rendered":"https:\/\/tuthost.ua\/faq\/how-to-use-wp-cli-on-wordpress-hosting\/"},"modified":"2024-07-19T22:56:27","modified_gmt":"2024-07-19T19:56:27","slug":"kak-ispolzovat-wp-cli-na-wordpress-hostinge","status":"publish","type":"ht_kb","link":"https:\/\/tuthost.ua\/en\/faq\/kak-ispolzovat-wp-cli-na-wordpress-hostinge\/","title":{"rendered":"How to use WP-CLI on wordpress hosting"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A very handy utility for quick work with WordPress is available on the <a href=\"https:\/\/tuthost.ua\/en\/hosting\/wordpress\/\">hosting plans for<\/a> WordPress. Working with it takes place through the command line, and the SSH protocol is used to connect. If you do not have experience with the command line &#8211; we do not recommend you to use this utility, as wrong actions can damage the site.<\/p>\n\n<p class=\"wp-block-paragraph\">The WP-CLI tool is designed to allow you to quickly perform common WordPress operations that are usually done in the admin area through the command line. For example, installing\/updating plugins, adding users, etc. Developers of sites on WordPress will be able to appreciate how much it can speed up the work in the mass development of sites.<\/p>\n\n<p class=\"wp-block-paragraph\"><a rel=\"noopener noreferrer nofollow\" href=\"https:\/\/make.wordpress.org\/cli\/handbook\/quick-start\/\" target=\"_blank\">Brief WP-CLI Documentation<\/a><\/p>\n\n<p class=\"wp-block-paragraph\"><a rel=\"noopener noreferrer nofollow\" href=\"https:\/\/developer.wordpress.org\/cli\/commands\/\" target=\"_blank\">Complete list of WP-CLI commands<\/a><\/p>\n\n<p class=\"wp-block-paragraph\">To get access via SSH &#8211; fill out a simple request form in those. support &#8211; after which we will activate SSH access for you.<\/p>\n<script>\nvar gform;gform||(document.addEventListener(\"gform_main_scripts_loaded\",function(){gform.scriptsLoaded=!0}),document.addEventListener(\"gform\/theme\/scripts_loaded\",function(){gform.themeScriptsLoaded=!0}),window.addEventListener(\"DOMContentLoaded\",function(){gform.domLoaded=!0}),gform={domLoaded:!1,scriptsLoaded:!1,themeScriptsLoaded:!1,isFormEditor:()=>\"function\"==typeof InitializeEditor,callIfLoaded:function(o){return!(!gform.domLoaded||!gform.scriptsLoaded||!gform.themeScriptsLoaded&&!gform.isFormEditor()||(gform.isFormEditor()&&console.warn(\"The use of gform.initializeOnLoaded() is deprecated in the form editor context and will be removed in Gravity Forms 3.1.\"),o(),0))},initializeOnLoaded:function(o){gform.callIfLoaded(o)||(document.addEventListener(\"gform_main_scripts_loaded\",()=>{gform.scriptsLoaded=!0,gform.callIfLoaded(o)}),document.addEventListener(\"gform\/theme\/scripts_loaded\",()=>{gform.themeScriptsLoaded=!0,gform.callIfLoaded(o)}),window.addEventListener(\"DOMContentLoaded\",()=>{gform.domLoaded=!0,gform.callIfLoaded(o)}))},hooks:{action:{},filter:{}},addAction:function(o,r,e,t){gform.addHook(\"action\",o,r,e,t)},addFilter:function(o,r,e,t){gform.addHook(\"filter\",o,r,e,t)},doAction:function(o){gform.doHook(\"action\",o,arguments)},applyFilters:function(o){return gform.doHook(\"filter\",o,arguments)},removeAction:function(o,r){gform.removeHook(\"action\",o,r)},removeFilter:function(o,r,e){gform.removeHook(\"filter\",o,r,e)},addHook:function(o,r,e,t,n){null==gform.hooks[o][r]&&(gform.hooks[o][r]=[]);var d=gform.hooks[o][r];null==n&&(n=r+\"_\"+d.length),gform.hooks[o][r].push({tag:n,callable:e,priority:t=null==t?10:t})},doHook:function(r,o,e){var t;if(e=Array.prototype.slice.call(e,1),null!=gform.hooks[r][o]&&((o=gform.hooks[r][o]).sort(function(o,r){return o.priority-r.priority}),o.forEach(function(o){\"function\"!=typeof(t=o.callable)&&(t=window[t]),\"action\"==r?t.apply(null,e):e[0]=t.apply(null,e)})),\"filter\"==r)return e[0]},removeHook:function(o,r,t,n){var e;null!=gform.hooks[o][r]&&(e=(e=gform.hooks[o][r]).filter(function(o,r,e){return!!(null!=n&&n!=o.tag||null!=t&&t!=o.priority)}),gform.hooks[o][r]=e)}});\n<\/script>\n\n                <div class='gf_browser_gecko gform_wrapper gform_legacy_markup_wrapper gform-theme--no-framework' data-form-theme='legacy' data-form-index='0' id='gform_wrapper_3' ><div id='gf_3' class='gform_anchor' tabindex='-1'><\/div><form method='post' enctype='multipart\/form-data' target='gform_ajax_frame_3' id='gform_3'  action='\/en\/wp-json\/wp\/v2\/ht-kb\/33060#gf_3' data-formid='3' novalidate>\n                        <div class='gform-body gform_body'><ul id='gform_fields_3' class='gform_fields top_label form_sublabel_below description_below validation_below' data-column-layout='fill'><li id=\"field_3_1\" class=\"gfield gfield--type-email gfield_contains_required field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible\"><label id='gfield_label_3_1' class='gfield_label gform-field-label' for='input_3_1'><span class='gform-field-label__text'>Email<\/span><span class=\"gfield_required\"><span class=\"gfield_required gfield_required_asterisk\">*<\/span><\/span><\/label><div class='ginput_container ginput_container_email'>\n                            <input name='input_1' id='input_3_1' type='email' value='' class='medium'    aria-required=\"true\" aria-invalid=\"false\"  \/>\n                        <\/div><\/li><li id=\"field_3_2\" class=\"gfield gfield--type-text gfield_contains_required field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible\"><label id='gfield_label_3_2' class='gfield_label gform-field-label' for='input_3_2'><span class='gform-field-label__text'>Login to Directadmin<\/span><span class=\"gfield_required\"><span class=\"gfield_required gfield_required_asterisk\">*<\/span><\/span><\/label><div class='ginput_container ginput_container_text'><input name='input_2' id='input_3_2' type='text' value='' class='medium'     aria-required=\"true\" aria-invalid=\"false\"   \/><\/div><\/li><li id=\"field_3_3\" class=\"gfield gfield--type-text gfield_contains_required field_sublabel_below gfield--has-description field_description_below field_validation_below gfield_visibility_visible\"><label id='gfield_label_3_3' class='gfield_label gform-field-label' for='input_3_3'><span class='gform-field-label__text'>The IP address from which you will connect<\/span><span class=\"gfield_required\"><span class=\"gfield_required gfield_required_asterisk\">*<\/span><\/span><\/label><div class='ginput_container ginput_container_text'><input name='input_3' id='input_3_3' type='text' value='' class='medium'  aria-describedby=\"gfield_description_3_3\"   aria-required=\"true\" aria-invalid=\"false\"   \/><\/div><div class='gfield_description' id='gfield_description_3_3'>You can check your current IP address here: https:\/\/whatismyipaddress.com\/<\/div><\/li><\/ul><\/div>\n        <div class='gform-footer gform_footer top_label'> <button type='submit' id='gform_submit_button_3' class='gform_button button' onclick='gform.submission.handleButtonClick(this);' data-submission-type='submit' >Send request<\/button> <input type='hidden' name='gform_ajax' value='form_id=3&amp;title=&amp;description=&amp;tabindex=0&amp;theme=legacy&amp;styles=[]&amp;hash=444f5611dd841e20dc6eeea93f2e2129' \/>\n            <input type='hidden' class='gform_hidden' name='gform_submission_method' data-js='gform_submission_method_3' value='iframe' \/>\n            <input type='hidden' class='gform_hidden' name='gform_theme' data-js='gform_theme_3' id='gform_theme_3' value='legacy' \/>\n            <input type='hidden' class='gform_hidden' name='gform_style_settings' data-js='gform_style_settings_3' id='gform_style_settings_3' value='[]' \/>\n            <input type='hidden' class='gform_hidden' name='is_submit_3' value='1' \/>\n            <input type='hidden' class='gform_hidden' name='gform_submit' value='3' \/>\n            \n            <input type='hidden' class='gform_hidden' name='gform_currency' data-currency='USD' value='UuSKS\/9tiYtxAv+yO5ApPOr16cyn7zqQc7LsuupexDo3hyd5myhTmw0q26TdhzfTzsNn4Db2r59Vq6fFDNqFxtNreX\/0YszCh361p\/X6CPa5tMk=' \/>\n            <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' \/>\n            <input type='hidden' class='gform_hidden' name='state_3' value='WyJ7XCJnZm9ybV9zdWJtaXNzaW9uX21ldGhvZFwiOltcImQwNDQ5NDRjYmFmOTMzMDE5ZWRlZGZiZGMzOTE0MWZjXCIsXCI1ZDgyZjczNWQ2M2Q4NGQ5MmJlOTg2NzU3YmFjN2EyZlwiLFwiNTAwMjE5YTRlNzUwY2EzNzMyOGYzNDc3ZWI2OGJjN2JcIl0sXCJnZm9ybV90aGVtZVwiOlwiMzgzNzYzYWVlMDgzODgwNzYzYmJjYzIwYTg3YjJiY2RcIixcImdmb3JtX3N0eWxlX3NldHRpbmdzXCI6XCJiYWJmMGRlY2JlODMwMTNiYjRhZjZjY2VlZWQ0ZGM0NVwiLFwiZm9ybV9pZFwiOlwiZWJlYTc3YzRjNjIyMTE1NDY4ZDQ4ODdkZjk5YjNjYThcIixcInVybFwiOlwiMzllZTg5MmRlY2YyMTFjYzUzODUyYTljNTkzZWY1Y2RcIixcInN0YXRlX3RpbWVzdGFtcFwiOlwiZTcyZmZjNWEzZDEzZWQwMjA2ZWQ5NzQyZTMzNWI4NjNcIn0iLCI3OGVhYTgyNzg3NTY5YWZhYjExMzBmNGNmNWE5NTgyNSIsMTc5NDM1NTAyOV0=' \/>\n            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_target_page_number_3' id='gform_target_page_number_3' value='0' \/>\n            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_source_page_number_3' id='gform_source_page_number_3' value='1' \/>\n            <input type='hidden' name='gform_field_values' value='' \/>\n            \n        <\/div>\n                        <\/form>\n                        <\/div>\n\t\t                <iframe style='display:none;width:0px;height:0px;' src='about:blank' name='gform_ajax_frame_3' id='gform_ajax_frame_3' title='This iframe contains the logic required to handle Ajax powered Gravity Forms.'><\/iframe>\n\t\t                <script>\ngform.initializeOnLoaded( function() {jQuery('#gform_ajax_frame_3').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_3');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_3').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_3').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_3').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_3').removeClass('gform_validation_error');}setTimeout( function() { \/* delay the scroll by 50 milliseconds to fix a bug in chrome *\/ jQuery(document).scrollTop(jQuery('#gform_wrapper_3').offset().top - mt); }, 50 );var current_page = jQuery('#gform_source_page_number_3').val();jQuery(document).trigger('gform_page_loaded', [3, current_page]);window['gf_submitting_3'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}jQuery('#gform_wrapper_3').replaceWith(confirmation_content);jQuery(document).scrollTop(jQuery('#gf_3').offset().top - mt);jQuery(document).trigger('gform_confirmation_loaded', [3]);if(window.gform && gform.pagination && gform.pagination.removePageQueryArg){gform.pagination.removePageQueryArg(3);}window['gf_submitting_3'] = false;wp.a11y.speak(jQuery('#gform_confirmation_message_3').text());}else{jQuery('#gform_3').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger(\"gform_pre_post_render\", [{ formId: \"3\", currentPage: \"current_page\", abort: function() { this.preventDefault(); } }]);        if (event && event.defaultPrevented) {                return;        }        const gformWrapperDiv = document.getElementById( \"gform_wrapper_3\" );        if ( gformWrapperDiv ) {            const visibilitySpan = document.createElement( \"span\" );            visibilitySpan.id = \"gform_visibility_test_3\";            gformWrapperDiv.insertAdjacentElement( \"afterend\", visibilitySpan );        }        const visibilityTestDiv = document.getElementById( \"gform_visibility_test_3\" );        let postRenderFired = false;        function triggerPostRender() {            if ( postRenderFired ) {                return;            }            postRenderFired = true;            gform.core.triggerPostRenderEvents( 3, current_page );            if ( visibilityTestDiv ) {                visibilityTestDiv.parentNode.removeChild( visibilityTestDiv );            }        }        function debounce( func, wait, immediate ) {            var timeout;            return function() {                var context = this, args = arguments;                var later = function() {                    timeout = null;                    if ( !immediate ) func.apply( context, args );                };                var callNow = immediate && !timeout;                clearTimeout( timeout );                timeout = setTimeout( later, wait );                if ( callNow ) func.apply( context, args );            };        }        const debouncedTriggerPostRender = debounce( function() {            triggerPostRender();        }, 200 );        if ( visibilityTestDiv && visibilityTestDiv.offsetParent === null ) {            const observer = new MutationObserver( ( mutations ) => {                mutations.forEach( ( mutation ) => {                    if ( mutation.type === 'attributes' && visibilityTestDiv.offsetParent !== null ) {                        debouncedTriggerPostRender();                        observer.disconnect();                    }                });            });            observer.observe( document.body, {                attributes: true,                childList: false,                subtree: true,                attributeFilter: [ 'style', 'class' ],            });        } else {            triggerPostRender();        }    } );} );\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>A very handy utility for quick work with WordPress is available on the hosting plans for WordPress. Working with it takes place through the command line, and the SSH protocol is used to connect. If you do not have experience with the command line &#8211; we do not recommend you to use this utility, as&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"inline_featured_image":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","ghostkit_customizer_options":"","ghostkit_custom_css":"","ghostkit_custom_js_head":"","ghostkit_custom_js_foot":"","ghostkit_typography":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"ht-kb-category":[10669],"ht-kb-tag":[],"class_list":["post-33060","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-hosting-en"],"taxonomy_info":{"ht_kb_category":[{"value":10669,"label":"Hosting"}]},"featured_image_src_large":[],"author_info":{"display_name":"Denys Semeniuk","author_link":"https:\/\/tuthost.ua\/en\/author\/semden\/"},"comment_info":0,"_links":{"self":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb\/33060","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/comments?post=33060"}],"version-history":[{"count":4,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb\/33060\/revisions"}],"predecessor-version":[{"id":52375,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb\/33060\/revisions\/52375"}],"wp:attachment":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/media?parent=33060"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb-category?post=33060"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=33060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}