Support » Plugin: WP STAGING - Backup Duplicator & Migration » WP Staging and WP-CLI

  • Resolved ladyslynn


    Is there any way to use wp-cli with this plugin? Anytime i try it just outputs some html, and doesn’t listen to the commands.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Rene Hermenau


    @ladyslynn its not tested with wp-cli.

    What commands do you need?

    Thread Starter ladyslynn


    Well anything that works in development it would be nice if it also worked on the staging site. I use cache flush and varnish purge allot. I also use wp-cli to update wordpress and plugins. It’s nice for downgrading plugins when the current version isn’t working properly.

    Plugin Author Rene Hermenau


    I need to check that out. Honestly said, I never worked with wp-cli before, so that’s the main reason why support for it has not been tested, yet.

    Do you know what html has been outputted during your tests?

    Would be great if you could also send me a few of the commands you tried, like wp plugin activate wp-staging?

    Thread Starter ladyslynn


    wp-cli is a fantastic tool, it makes things like installing plugins and creating users so much faster and easier. it really is a time saver, and I’ve been able to do things in wp-cli I wouldn’t normally be able to do on our site. Like update WordPress, because there’s something wrong on our host end that doesn’t tell me when a wordpress update is available, so I’ve had to do it with wp-cli. It’s fantastic.

    Here are the last 5 commands I’ve tried to use;
    wp plugin list
    wp plugin activate woocommerce
    wp cache flush
    wp core version
    wp role list

    Below is the exact code outputted for every single command I’ve tried(except wp core version),
    Looking closer at it now, I realize it’s the login page html.

    <!DOCTYPE html>
          <html xmlns="" lang="en-US">
                  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                  <meta name="viewport" content="width=device-width">
                      <meta name='robots' content='noindex,follow' />
                      <title>WordPress &rsaquo; Error</title>
                      <style type="text/css">
                          html {
                              background: #f1f1f1;
                          body {
                              background: #fff;
                              color: #444;
                              font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
                              margin: 2em auto;
                              padding: 1em 2em;
                              max-width: 700px;
                              -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13);
                              box-shadow: 0 1px 3px rgba(0,0,0,0.13);
                          h1 {
                              border-bottom: 1px solid #dadada;
                              clear: both;
                              color: #666;
                              font-size: 24px;
                              margin: 30px 0 0 0;
                              padding: 0;
                              padding-bottom: 7px;
                          #error-page {
                              margin-top: 50px;
                          #error-page p {
                              font-size: 14px;
                              line-height: 1.5;
                              margin: 25px 0 20px;
                          #error-page code {
                              font-family: Consolas, Monaco, monospace;
                          ul li {
                              margin-bottom: 10px;
                              font-size: 14px ;
                          a {
                              color: #0073aa;
                          a:active {
                              color: #00a0d2;
                          a:focus {
                              color: #124964;
                                  0 0 0 1px #5b9dd9,
                                  0 0 2px 1px rgba(30, 140, 190, .8);
                                  0 0 0 1px #5b9dd9,
                                  0 0 2px 1px rgba(30, 140, 190, .8);
                              outline: none;
                          .button {
                              background: #f7f7f7;
                              border: 1px solid #ccc;
                              color: #555;
                              display: inline-block;
                              text-decoration: none;
                              font-size: 13px;
                              line-height: 26px;
                              height: 28px;
                              margin: 0;
                              padding: 0 10px 1px;
                              cursor: pointer;
                              -webkit-border-radius: 3px;
                              -webkit-appearance: none;
                              border-radius: 3px;
                              white-space: nowrap;
                              -webkit-box-sizing: border-box;
                              -moz-box-sizing:    border-box;
                              box-sizing:         border-box;
                              -webkit-box-shadow: 0 1px 0 #ccc;
                              box-shadow: 0 1px 0 #ccc;
                              vertical-align: top;
                          .button.button-large {
                              height: 30px;
                              line-height: 28px;
                              padding: 0 12px 2px;
                          .button:focus {
                              background: #fafafa;
                              border-color: #999;
                              color: #23282d;
                          .button:focus  {
                              border-color: #5b9dd9;
                              -webkit-box-shadow: 0 0 3px rgba( 0, 115, 170, .8 );
                              box-shadow: 0 0 3px rgba( 0, 115, 170, .8 );
                              outline: none;
                          .button:active {
                              background: #eee;
                              border-color: #999;
                              -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
                              box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
                              -webkit-transform: translateY(1px);
                              -ms-transform: translateY(1px);
                              transform: translateY(1px);
    		<form name="loginform" id="loginform" action="" method="post">
    			<p class="login-username">
    				<label for="user_login">Username or Email Address</label>
    				<input type="text" name="wpstg-username" id="user_login" class="input" value="" size="20" />
    			<p class="login-password">
    				<label for="user_pass">Password</label>
    				<input type="password" name="wpstg-pass" id="user_pass" class="input" value="" size="20" />
    			<p class="login-remember"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" /> Remember Me</label></p>
    			<p class="login-submit">
    				<input type="submit" name="wpstg-submit" id="wp-submit" class="button button-primary" value="Log In" />
    				<input type="hidden" name="redirect_to" value="http://" />
    • This reply was modified 4 years, 1 month ago by ladyslynn.
    • This reply was modified 4 years, 1 month ago by ladyslynn.
    Plugin Author Rene Hermenau


    @ladyslynn Thanks for the detailed commands. I definitely put it on our to do list.

    For the moment, please try to disable authentication in wp staging settings, then create a new staging site and see if the wp-cli commands are working then.



    Hi @ladyslynn
    You can try adding --user=<id|login|email> global parameter to your commands. Then even with authentication enabled commands should work

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP Staging and WP-CLI’ is closed to new replies.