Download wp-cli.phar
create foler wp-cli in drive c
create file wp.bat an push this data
@ECHO OFF
php "c:/wp-cli/wp-cli.phar" %*
create a file with name 'wp' for cygwin and push this data
#!/bin/sh
dir=$(cd "${0%[/\\]*}" > /dev/null; pwd)
if [[ -d /proc/cygdrive && $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
# We are in Cgywin using Windows php, so the path must be translated
dir=$(cygpath -m "$dir");
fi
php "${dir}/wp-cli.phar" "$@"
at the end file : C:\cygwin64\etc/profile
# export PROFILEREAD PATH ORIGINAL_PATH MANPATH INFOPATH USER TMP TEMP PRINTER HOSTNAME PS1 SHELL tmp temp
export PROFILEREAD PATH ORIGINAL_PATH INFOPATH USER TMP TEMP PRINTER HOSTNAME PS1 SHELL
export PATH="/cygdrive/f/Server/linuxphp7/php:/cygdrive/f/Server/linuxphp7/mysql/bin:/cygdrive/c/composer:/cygdrive/c/wp-cli/vendor/bin:$PATH"
export WP_CLI_PACKAGES_DIR="C:\Users\AvvalStock/.wp-cli/packages/"
#https://make.wordpress.org/cli/handbook/config/
//phpstorm -> [ctrl+ shift + x] console terminal tools
/* List Of Function */ //WP_CLI::success( $args[0] ); //WP_CLI::error( $args[1] ); //WP_CLI::warning( $message ) //WP_CLI::log("[{$key}] No meta, skipped"); //WP_CLI::line(""); //$locale = \WP_CLI\Utils\get_flag_value( $assoc_args, 'locale', 'en_US' );
- download
wp core download [--locale=fa_IR]
-
wp config create --dbname=testing --dbuser=wp --dbpass=securepswd --dbprefix=
-
del "filename" | ren "wp-config-sample.php" "wp-config.php"
-
wp core install --url=localhost/razmayesh96.ir --title=Example --admin_user=admin --admin_password=admin --admin_email=[email protected]
/***************************************************** 6)if change prefix wp package install iandunn/wp-cli-rename-db-prefix wp rename-db-prefix se_ /*****************************************************
-
wp core language install fa_IR --activate
-
wp plugin install wp-parsidate --activate
-
wp plugin update --all || wp plugin wp-parsidate
$url_framework = 'http://localhost/buymarketing.ir'; define ('WP_CONTENT_FOLDERNAME', 'asset'); define ('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME) ; define ('WP_CONTENT_URL', $url_framework.'/'.WP_CONTENT_FOLDERNAME); define ('WP_PLUGIN_DIR', ABSPATH . 'addone'); define ('WP_PLUGIN_URL', $url_framework.'/addone'); define( 'PLUGINDIR', ABSPATH . 'addone' ); define( 'UPLOADS', ''.'image' );