Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • WordPress doesn’t come with the WP-CLI by default. It would have to be installed using the instructions found here: https://wp-cli.org/ or provided by your webhost.

    In order to run commands you would need to create an ssh connection to your server using terminal in Mac/Linux or an application like PuTTY in Windows https://www.putty.org/ . Your webhost should be able to assist you with how to make an ssh connection to your site.

    From there you would simply type the command and press enter to execute.

    Honestly though, you may not need to do any of that and simply disable each plugin or theme one by one until the error messages stop being generated. You’ll know it’s a plugin or theme issue if you disable all of the plugins and set the theme to default which should stop the errors.

    Using process of elimination you can determine which plugin is to blame, or if it is the theme.

    Hi JD,

    What is the output if you run the command wp cron event list ? I have seen this error occur with theme or plugin functions that incorrectly set cron events such as below:


    | 1424523454 | | now | Non-repeating |
    | 1424523454 | | now | Non-repeating |
    | 1424523454 | | now | Non-repeating |
    | 1424523454 | | now | Non-repeating |

    A hook should be displayed for these rather than a string of numbers:


    | wp_version_check | 2017-05-04 09:12:26 | now | 12 hours |
    | wp_update_plugins | 2017-05-04 09:12:26 | now | 12 hours |
    | wp_update_themes | 2017-05-04 09:12:26 | now | 12 hours |

    Does the error occur while using the default theme with all plugins disabled?

    You will also want to make sure WordPress core, along with all themes and plugins have been updated to their latest versions.

    Cheers!

    • This reply was modified 7 years, 7 months ago by colemanedwards. Reason: code block edit

    I’m sorry. I misunderstood the request and now realize it is for the maintenance mode plugin and not WP-CLI itself.

    In that case, please do not submit a feature request to the WP-CLI idea repo I provided before.

    Of course I realized this as soon as I clicked the submit button and it was too late.

    Take care!

    Hi there Jerry,

    The WP-CLI Project uses Github to manage and track feature requests here: https://github.com/wp-cli/ideas/issues

    If you could please create a new issue at that page with your idea including as much detail as possible.

    Of course, if you need any help with how to do that successfully just reply to this message! ??

    Cheers!

    • This reply was modified 7 years, 8 months ago by colemanedwards. Reason: Misunderstood request
    • This reply was modified 7 years, 8 months ago by colemanedwards.

    Hello,

    From what I gathered the steps to reproduce are to:

    1) Install WordPress Site
    2) Install WP-CLI on environment using steps found here: https://wp-cli.org/#installing
    3) Run command wp plugin list within WP site installation directory
    4) Observe plugins are listed
    5) Run command wp plugin install responsive-menu
    6) Run command wp plugin activate responsive-menu
    7) Run wp plugin list
    8) Observe Fatal Error reported above.

    I have tested these steps on my own installation and successfully reproduced the error. This does appear to be a third-party issue and not an issue with WP-CLI itself.

    Cheers!

    Here is another similar issue where it was recommended to “add nonroot to the www-data group, and make your files group”readable/writable.”

    https://github.com/wp-cli/wp-cli/issues/1241

    Also, this is normal for any command that is writing to the directory. You will want to use the prefix sudo -u when using commands such as ‘wp core download’ on environments set up in this way.

    Hi there David,

    Have you tried changing the ownership of the doc root (which I’m assuming is public_html) to www-data and adding your non-root user to that group?

    https://www.linode.com/docs/websites/cms/install-wordpress-using-wp-cli-on-ubuntu-14-04

    Main Install Section; Step 2

    Change the ownership of the public_html directory. Apache comes with its own usergroup www-data. As a recommended practice, you should change the ownership of your installation directory to this group. You also need to add your username to the group, and enable group write permissions to perform any commands in the directory:

     sudo chown -R www-data public_html
     sudo usermod -aG www-data username
     sudo chmod -R g+w public_html

    Hi Thomas,

    Have you tried using the --path=<path>
    Path to the WordPress files Global Parameter to specify which directory the install is contained in?

    So
    wp plugin list --path=/opt/wordpress/ possibly?

Viewing 9 replies - 1 through 9 (of 9 total)