WP CLI – show users whose ID is larger than given ID

One way to work with existing WP-CLI commands is through the WP_CLI::runcommand(). Here are two examples how we can filter an existing WP-CLI command, namely the wp user list command based on WP_User_Query and it’s pre_user_query hook: Run a custom script in WP-CLI Let’s write our script.php file with: <?php add_action( ‘pre_user_query’, ‘wpse_pre_user_query’ ); WP_CLI::runcommand( … Read more

PHP warning are displaying when using WP CLI [closed]

The first thing to check for this issue is the WP_DEBUG, WP_DEBUG_LOG and WP_DEBUG_DISPLAY constants in the wp-config.php file. They have to be set to false or be commented out (the default value is false). Else, no matter which global log_errors, display_errors or error_reporting settings you have, you will still see those warnings when running … Read more

wp core update not working anymore

What is inside your version.php file? File: /wp-includes/version.php 1: <?php 2: /** 3: * The WordPress version string 4: * 5: * @global string $wp_version 6: */ 7: $wp_version = ‘4.7.1’; You can play with that number and test. You can try to install the latest version of WP Cli and test. You may update … Read more

What is the difference between the Package Language and the Site Language?

As you probably already know, WordPress supports language packs. Translation files that reside in wp-content/languages. Those are used to translate all the strings the user sees in WordPress. WordPress also allows translation teams on WordPress.org to provide localized release packages. These already come with the translation files included, plus a bit more. They can translate … Read more

Using WP CLI to set options in WP Multisite

You could probably manipulate the option with wp option update but you shouldn’t. It has plenty of dedicated commands for plugins, in your case it would probably be something like wp plugin activate active-directory-integration,disable-comments,http-authentication –url=blogs.my.domain/test1.