SlideShare a Scribd company logo
1 of 82
GESTIONE AVANZATA DI
WORDPRESS CON WP-CLI
Andrea Cardinali
@andreacardinali
T.C. Informatica
WordCamp Torino - 8 Aprile 2017 - #wctrn
ANDREA CARDINALI
• DEVELOPER & SEO @ T.C. INFORMATICA
• WORDPRESS LOVER SINCE v2.8
• PROUD MEMBER OF WORDPRESS MEETUP ROMAGNA
• seoCMS ORGANIZER
BE SOCIAL
#WCTRN
@andreacardinali
TABLE OF CONTENTS
1. WHAT IS WP-CLI AND WHY USE IT
2. HOW TO USE IT (INSTALL AND EXAMPLES)
3. ADVANCED USAGES
4. DEMO TIME
5. QUESTIONS
POLL TIME
VERY SHORT HISTORY
• Open source Project created in 2011
https://github.com/wp-cli/wp-cli/
• Project maintained by Daniel Bachhuber.
• Initial code by Andreas Creten and Cristi Burcă (scribu).
• Officially supported by WordPress.org since December 2016
v 1.1
STABLE VERSION
WP-WHAT ?
COMMAND LINE DRIVEN
PHP APPLICATION
WHAT IS WP-CLI
PHAR (PHP Archive)
•Single file (*.phar) containing multiple files
•PHP Application
(kinda of *.exe on Win /*.app on Mac)
WHAT IS WP-CLI
COMMAND
LINE
INTERFACE
WHAT IS WP-CLI
WP-CLI is a set of command-line tools for
managing WordPress installations. You can
update plugins, configure multisite installs and
much more, without using a web browser.
HOW TO INSTALL IT
MINIMUM REQUIREMENTS
• UNIX-like environment (OS X, Linux, FreeBSD, Cygwin);
(limited support in Windows environment)
• PHP 5.3.29 or later (php 5.3 EOL 14 Aug 2014)
• WordPress 3.7 or later (released on October 2013)
• SSH access
• no root privileges needed*
• http://wp-cli.org/
HOW TO INSTALL IT (locally)
curl -O https://raw.githubusercontent.com/wp-
cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
or
Download it manually and copy it into document root
NOTICE: if installed locally WP-CLI must be placed in the same folder of WP core
files (i.e. public_html)
https://make.wordpress.org/cli/handbook/installing/
HOW TO INSTALL IT (globally)
curl -O https://raw.githubusercontent.com/wp-
cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
wp --info
https://make.wordpress.org/cli/handbook/installing/
CAN INSTALLATION
BE AVOIDED?
USE VVV TO TRY IT
• VVV (Variable Varying Vagrant) provides WP-CLI
• VVV uses WP-CLI under the hood to create new WP install
https://www.slideshare.net/AndreaCardinali/professional-wordpress-development-with-vagrant-andrea-cardinali-wordcamp-milano-2016
USE WP-CLI POWERED HOSTING
https://make.wordpress.org/cli/handbook/hosting-companies/
HOW IT WORKS?
WP-CLI SYNOPSIS
wp command subcommand args --global-arg1
WP-CLI GLOBAL ARGS
--path=<path>Path to the WordPress files.
--ssh=[<user>@]<host>[:<port>][<path>]Perform operation against a remote server over SSH.
--http=<http>Perform operation against a remote WordPress install over HTTP.
--url=<url>Pretend request came from given URL. In multisite, this argument is how the
target site is specified.
--user=<id|login|email>Set the WordPress user.
--skip-plugins[=<plugin>]Skip loading all or some plugins. Note: mu-plugins are still
loaded.
--skip-themes[=<theme>]Skip loading all or some themes.
--skip-packagesSkip loading all installed packages.
--require=<path>Load PHP file before running the command (may be used more than once).
--[no-]colorWhether to colorize the output.
--debug[=<group>]Show all PHP errors; add verbosity to WP-CLI bootstrap.
--prompt[=<assoc>]Prompt the user to enter values for all command arguments, or a subset
specified as comma-separated values.
--quietSuppress informational messages.
WHY SHOULD I USE IT?
EXTENSIBLE
EXTENSIBLE
• Extend functionalities with packages
• Write your own functionality (more on this later)
• You can concat multiple commands (pipe)
• SSH support out of the box (control your WP from remote)
FAST
FAST
• CLI is faster than browser
• WP-CLI can skip plugin / themes loading
• You can create a shell script with multiple wp-cli commands
SAVE TIME
SAVE TIME
• DRY: Don’t Repeat Yourself
• You don’t have to login / visit url/ wait for page loads
• You can export data in CSV, XML, JSON
• You can pilot multiple installation at once
TAKE AWAY
• WP-CLI is a swiss army knife for wp users
• WP-CLI can be installed if not available on your hosting
• WP-CLI let you save a lot of time
HOW LONG IT TAKES TO PERFORM THE
FOLLOWING OPERATIONS?
1. Download WordPress
2. Install theme
3. Install and activate plugins
4. Create users
5. Import backup (from dev)
6. Replace production url
WP-CLI IN ACTION
HOW DO YOU USUALLY
INSTALL WORDPRESS?
BRAND NEW WP INSTALL
wp core download --locale=it_IT
wp core config --dbuser=‘wp’ --dbpass=‘wp’ --
dbprefix=‘wctrn17_’
wp core install --siteurl=‘’
wp core config --prompt
wp core install --prompt
http://wp-cli.org/commands/core/
USEFUL SUBCOMMANDS
WORDPRESS INSTALL
wp core [subcommand]
wp core download
wp core config
wp core update
wp core update-db
wp core version
wp core multisite-convert
http://wp-cli.org/commands/core/
HOW DO YOU COPY DATABASE
FROM DEV TO PRODUCTION?
USEFUL SUBCOMMANDS
REPLACE STRING IN DATABASE
wp search-replace oldstring newstring
wp search-replace http://dev.mysite.com http://www.mysite.com
HOW DO YOU USUALLY
INSTALL A PLUGIN?
USEFUL SUBCOMMANDS
INSTALL A PLUGIN
wp plugin install sg-cachepress --activate
wp plugin install sg-cachepress --activate
http://wp-cli.org/commands/plugin/
USEFUL SUBCOMMANDS
PLUGINS
wp plugin [subcommand]
wp plugin install $slug --version=
wp plugin activate
wp plugin list
wp plugin update $slug
wp plugin --update-all
wp plugin toggle
WHAT IF YOU HAVE TO INSTALL
15 PLUGINS?
INSTALL MULTIPLE PLUGINS AT ONCE
cat plugins.txt | xargs wp plugin install
https://gist.github.com/Cardy/347807cf73681783f1fb6c2911a7cddd
INSTALL MULTIPLE PLUGINS AT ONCE WITH
SPECIFIC VERSION
sh plugins.sh
https://gist.github.com/Cardy/347807cf73681783f1fb6c2911a7cddd
#!/bin/bash
input="./plugins.txt"
# Set "," as the field separator using $IFS # and read line by line using while read combo
while IFS=',' read -r f1 f2 do
if [ -z "$f1" ] then continue;
fi
echo "Installing $f1 $f2"
if [ -z "$f2" ]
then wp plugin install $f1 --activate >> install.log 2>&1
else wp plugin install $f1 --version=$f2 --force --activate >> install.log 2>&1
fi
done < "$input"
HOW DO YOU REGENERATE
POST THUMBNAILS?
USEFUL SUBCOMMANDS
THUMBNAILS
wp media [subcommand]
wp media regenerate
wp media import ~/Pictures/**/*.jpg
http://wp-cli.org/commands/media/
WHAT IF YOU HAVE TO
REGENERATE ONLY THE MOST
RECENT THUMBNAILS?
THUMBNAILS
wp media regenerate $(wp post list --
post_type=attachment --format=ids --
posts_per_page=50)
• http://wp-cli.org/commands/media/
HOW DO YOU EMPTY CACHE /
TRANSIENTS?
USEFUL SUBCOMMANDS
HANDLE CACHE
wp cache [subcommand]
wp cache set $key $value $group $expire
wp cache add
wp cache get
USEFUL SUBCOMMANDS
HANDLE TRANSIENTS
wp transient [subcommand]
wp transient delete --expired
http://wp-cli.org/commands/transient/
HOW DO YOU HANDLE YOUR
DB?
USEFUL SUBCOMMANDS
BACKUP / RESTORE DB
wp db [subcommand]
wp db export filename.sql
wp db import filename.sql
USEFUL SUBCOMMANDS
WORKS ON DB WITHOUT phpMyAdmin
wp db [subcommand]
wp db create
wp db drop --yes
wp db query < my_query.sql
wp db optimize
http://wp-cli.org/commands/db/
HOW DO YOU MANAGE
USERS / ROLES ?
USEFUL SUBCOMMANDS
USERS AND CAPABILITIES
wp user [subcommand]
wp user list
wp user create username email --role=rolename
wp user update 1 --user_pass=‘changeMe123’
wp user import-csv
http://wp-cli.org/commands/user/
ADVANCED USAGE
YAML FILE
YAML FILE
You can define a wp-cli.yaml to store default configuration
1. inline args
2. wp-cli.local.yml file inside the current working directory (or
upwards).
3. wp-cli.yml file inside the current working directory (or
upwards).
4. ~/.wp-cli/config.yml file WP-CLI defaults.
WP-CLI PACKAGES
WP-CLI PACKAGE
Available on all WordPress installs, as opposed to just where
the plugin is activated.
USEFUL SUBCOMMANDS
WP-CLI PACKAGE
wp cli [subcommand]
wp package install wp-cli/restful
wp package list
wp package install
(SOME) USEFUL WP-CLI PACKAGES
wp-cli/restful
binarygary/db-checkpoint
runcommand/assign-featured-images
and many more
https://wp-cli.org/package-index/
WP-CLI RESTFUL
RESTful WP-CLI makes WP REST API endpoints available as WP-
CLI commands.
https://github.com/wp-cli/restful
WP CLI INTERNAL API
WP-CLI EXECUTION
WP-CLI EXECUTION
• WP_CLI::launch() - Launch an arbitrary external process that
takes over I/O.
• WP_CLI::launch_self() - Run a WP-CLI command in a new
process reusing the current runtime arguments.
• WP_CLI::runcommand() - Run a WP-CLI command.
• WP_CLI::run_command() - Run a given command within the
current process using the same global
WP-CLI HOOKS
WP-CLI HOOKS
• WP_CLI::add_hook() - Schedule a callback to be executed at a
certain point.
• WP_CLI::do_hook() - Execute callbacks registered to a given
hook.
• WP_CLI::add_wp_hook() - Add a callback to a WordPress
action or filter.
• WP_CLI::add_command() - Register a command to WP-CLI.
WP-CLI HOOKS
WP_CLI::add_hook( $when, $callback)
esegue $callback quando viene scatenato $when
WP_CLI::do_hook( $when )
scatena $when che può essere agganciato tramite add_hook
WP-CLI $when
before_invoke:<command> - Just before a command is invoked.
after_invoke:<command> - Just after a command is involved.
before_wp_load - Just before the WP load process begins.
before_wp_config_load - After wp-config.php has been located.
after_wp_config_load - After wp-config.php has been loaded into scope.
after_wp_load - Just after the WP load process has completed.
WP-CLI OUTPUT
• WP_CLI::log() - Display informational message without prefix.
• WP_CLI::success() - Display success message prefixed with "Success: ".
• WP_CLI::debug() - Display debug message prefixed with "Debug: " when `--
debug` is used.
• WP_CLI::warning() - Display warning message prefixed with "Warning: ".
• WP_CLI::error() - Display error message prefixed with "Error: " and exit
script.
• WP_CLI::halt() - Halt script execution with a specific return code.
CREATE YOUR OWN PACKAGE
CREATE YOUR OWN PACKAGE
1. Create a new command
2. Extend an existing one (create a subcommand)
3. Make use of PHPDoc
4. Include your package inside a plugin or add it to wp
package index
https://make.wordpress.org/cli/handbook/commands-cookbook/
CREATE YOUR OWN PACKAGE
https://make.wordpress.org/cli/handbook/commands-cookbook/ https://wp-cli.org/docs/internal-api/
<?php
class Cardy_Command
{
public function greetings( $args )
{
WP_CLI::success(‘Hello World');
}
}
$instance = new Cardy_Command();
WP_CLI::add_command( 'cardy', $instance );
ADD PACKAGE TO YOUR PLUGIN
if ( defined( 'WP_CLI' ) && WP_CLI ) {
require_once dirname( __FILE__ ) . '/inc/class-
plugin-cli-command.php';
}
DEMO TIME
HOW LONG IT TAKES TO PERFORM THE
FOLLOWING OPERATIONS?
1. Download WordPress
2. Install theme
3. Install and activate plugins
4. Create users
POLL TIME
ANY QUESTION?
WE’RE HIRING
http://bit.ly/wctrnjobs
WORDPRESS MEETUP ROMAGNA
QUANDO:
ogni 1° giovedi del mese
DOVE:
Dinamo Coworking Space Cesena
PERCHÉ:
Per parlare di WordPress, conoscere bella gente e condividere
le proprie esperienze
wpromagna.com
@romagnawp
THANKS
Twitter:@andreacardinali
Slideshare: http://www.slideshare.net/andreacardinali
Website: https://www.andreacardinali.it/
Website: https://www.tcinformatica.net/
seoCMS: bit.ly/SeoWCampTRN

More Related Content

What's hot

Ako na vlastne WP temy
Ako na vlastne WP temyAko na vlastne WP temy
Ako na vlastne WP temyJuraj Kiss
 
Building a community of Open Source intranet users
Building a community of Open Source intranet usersBuilding a community of Open Source intranet users
Building a community of Open Source intranet usersLuke Oatham
 
Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16tshellberg
 
Ryan Duff 2015 WordCamp US HTTP API
Ryan Duff 2015 WordCamp US HTTP APIRyan Duff 2015 WordCamp US HTTP API
Ryan Duff 2015 WordCamp US HTTP APIryanduff
 
Get Started in Professional WordPress Design & Development
Get Started in Professional WordPress Design & DevelopmentGet Started in Professional WordPress Design & Development
Get Started in Professional WordPress Design & DevelopmentCliff Seal
 
A crash course in scaling wordpress
A crash course inscaling wordpress A crash course inscaling wordpress
A crash course in scaling wordpress GovLoop
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansibleKrish
 
WordPress London Developer Operations For Beginners
WordPress London Developer Operations For BeginnersWordPress London Developer Operations For Beginners
WordPress London Developer Operations For BeginnersStewart Ritchie
 
How I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPressHow I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPressChris Jean
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressOtto Kekäläinen
 
Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIWP Engine
 
Managing Multisite: Lessons from a Large Network
Managing Multisite: Lessons from a Large NetworkManaging Multisite: Lessons from a Large Network
Managing Multisite: Lessons from a Large NetworkWilliam Earnhardt
 
Workshop On WP-CLI
Workshop On WP-CLIWorkshop On WP-CLI
Workshop On WP-CLIAjit Bohra
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress developmentSteve Mortiboy
 
Introduction to apache maven
Introduction to apache mavenIntroduction to apache maven
Introduction to apache mavenKrish
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Otto Kekäläinen
 
Java Fundamentals to Advance
Java Fundamentals to AdvanceJava Fundamentals to Advance
Java Fundamentals to AdvanceKrish
 

What's hot (20)

Ako na vlastne WP temy
Ako na vlastne WP temyAko na vlastne WP temy
Ako na vlastne WP temy
 
Building a community of Open Source intranet users
Building a community of Open Source intranet usersBuilding a community of Open Source intranet users
Building a community of Open Source intranet users
 
Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16
 
Ryan Duff 2015 WordCamp US HTTP API
Ryan Duff 2015 WordCamp US HTTP APIRyan Duff 2015 WordCamp US HTTP API
Ryan Duff 2015 WordCamp US HTTP API
 
Get Started in Professional WordPress Design & Development
Get Started in Professional WordPress Design & DevelopmentGet Started in Professional WordPress Design & Development
Get Started in Professional WordPress Design & Development
 
A crash course in scaling wordpress
A crash course inscaling wordpress A crash course inscaling wordpress
A crash course in scaling wordpress
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
WordPress London Developer Operations For Beginners
WordPress London Developer Operations For BeginnersWordPress London Developer Operations For Beginners
WordPress London Developer Operations For Beginners
 
How I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPressHow I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPress
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
 
Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLI
 
Managing Multisite: Lessons from a Large Network
Managing Multisite: Lessons from a Large NetworkManaging Multisite: Lessons from a Large Network
Managing Multisite: Lessons from a Large Network
 
Workshop On WP-CLI
Workshop On WP-CLIWorkshop On WP-CLI
Workshop On WP-CLI
 
Way of the Future
Way of the FutureWay of the Future
Way of the Future
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
ICONUK 2015 - Gradle Up!
ICONUK 2015 - Gradle Up!ICONUK 2015 - Gradle Up!
ICONUK 2015 - Gradle Up!
 
Working in harmony
Working in harmonyWorking in harmony
Working in harmony
 
Introduction to apache maven
Introduction to apache mavenIntroduction to apache maven
Introduction to apache maven
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
 
Java Fundamentals to Advance
Java Fundamentals to AdvanceJava Fundamentals to Advance
Java Fundamentals to Advance
 

Similar to Advanced WordPress Management with WP-CLI

Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLIDiana Thompson
 
Advanced WordPress Tooling: By InstaWP.com
Advanced WordPress Tooling: By InstaWP.comAdvanced WordPress Tooling: By InstaWP.com
Advanced WordPress Tooling: By InstaWP.comInstaWP Inc
 
Administer WordPress with WP-CLI
Administer WordPress with WP-CLIAdminister WordPress with WP-CLI
Administer WordPress with WP-CLISuwash Kunwar
 
WordPress CLI in-depth
WordPress CLI in-depthWordPress CLI in-depth
WordPress CLI in-depthSanjay Willie
 
Introduction to WP-CLI: Manage WordPress from the command line
Introduction to WP-CLI: Manage WordPress from the command lineIntroduction to WP-CLI: Manage WordPress from the command line
Introduction to WP-CLI: Manage WordPress from the command lineBehzod Saidov
 
Command Line WordPress with WP-CLI - WordPress Perth User Group
Command Line WordPress with WP-CLI - WordPress Perth User GroupCommand Line WordPress with WP-CLI - WordPress Perth User Group
Command Line WordPress with WP-CLI - WordPress Perth User GroupJames Collins
 
Extending Your WordPress Toolbelt with WP-CLI
Extending Your WordPress Toolbelt with WP-CLIExtending Your WordPress Toolbelt with WP-CLI
Extending Your WordPress Toolbelt with WP-CLIryanduff
 
Make your life easy with WP-CLI
Make your life easy with WP-CLIMake your life easy with WP-CLI
Make your life easy with WP-CLIMichael Corkum
 
Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLIDiana Thompson
 
Session: WP Site Management using WP-CLI from Scratch
Session: WP Site Management using WP-CLI from ScratchSession: WP Site Management using WP-CLI from Scratch
Session: WP Site Management using WP-CLI from ScratchRoald Umandal
 
WordPress and The Command Line
WordPress and The Command LineWordPress and The Command Line
WordPress and The Command LineKelly Dwan
 
Take Command of WordPress With WP-CLI at WordCamp Long Beach
Take Command of WordPress With WP-CLI at WordCamp Long BeachTake Command of WordPress With WP-CLI at WordCamp Long Beach
Take Command of WordPress With WP-CLI at WordCamp Long BeachDiana Thompson
 
WP-CLI For The Win
WP-CLI For The WinWP-CLI For The Win
WP-CLI For The WinMicah Wood
 
Command Line WordPress with WP-CLI
Command Line WordPress with WP-CLICommand Line WordPress with WP-CLI
Command Line WordPress with WP-CLIJames Collins
 
The Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIEdmund Turbin
 
WordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cli
WordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cliWordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cli
WordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cliGetSource
 
Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLIDiana Thompson
 
WP-CLI Workshop at WordPress Meetup Cluj-Napoca
WP-CLI Workshop at WordPress Meetup Cluj-NapocaWP-CLI Workshop at WordPress Meetup Cluj-Napoca
WP-CLI Workshop at WordPress Meetup Cluj-Napoca4nd4p0p
 
WooCommerce WP-CLI Basics
WooCommerce WP-CLI BasicsWooCommerce WP-CLI Basics
WooCommerce WP-CLI Basicscorsonr
 
WP-CLI: WordCamp NYC 2015
WP-CLI: WordCamp NYC 2015WP-CLI: WordCamp NYC 2015
WP-CLI: WordCamp NYC 2015Terell Moore
 

Similar to Advanced WordPress Management with WP-CLI (20)

Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLI
 
Advanced WordPress Tooling: By InstaWP.com
Advanced WordPress Tooling: By InstaWP.comAdvanced WordPress Tooling: By InstaWP.com
Advanced WordPress Tooling: By InstaWP.com
 
Administer WordPress with WP-CLI
Administer WordPress with WP-CLIAdminister WordPress with WP-CLI
Administer WordPress with WP-CLI
 
WordPress CLI in-depth
WordPress CLI in-depthWordPress CLI in-depth
WordPress CLI in-depth
 
Introduction to WP-CLI: Manage WordPress from the command line
Introduction to WP-CLI: Manage WordPress from the command lineIntroduction to WP-CLI: Manage WordPress from the command line
Introduction to WP-CLI: Manage WordPress from the command line
 
Command Line WordPress with WP-CLI - WordPress Perth User Group
Command Line WordPress with WP-CLI - WordPress Perth User GroupCommand Line WordPress with WP-CLI - WordPress Perth User Group
Command Line WordPress with WP-CLI - WordPress Perth User Group
 
Extending Your WordPress Toolbelt with WP-CLI
Extending Your WordPress Toolbelt with WP-CLIExtending Your WordPress Toolbelt with WP-CLI
Extending Your WordPress Toolbelt with WP-CLI
 
Make your life easy with WP-CLI
Make your life easy with WP-CLIMake your life easy with WP-CLI
Make your life easy with WP-CLI
 
Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLI
 
Session: WP Site Management using WP-CLI from Scratch
Session: WP Site Management using WP-CLI from ScratchSession: WP Site Management using WP-CLI from Scratch
Session: WP Site Management using WP-CLI from Scratch
 
WordPress and The Command Line
WordPress and The Command LineWordPress and The Command Line
WordPress and The Command Line
 
Take Command of WordPress With WP-CLI at WordCamp Long Beach
Take Command of WordPress With WP-CLI at WordCamp Long BeachTake Command of WordPress With WP-CLI at WordCamp Long Beach
Take Command of WordPress With WP-CLI at WordCamp Long Beach
 
WP-CLI For The Win
WP-CLI For The WinWP-CLI For The Win
WP-CLI For The Win
 
Command Line WordPress with WP-CLI
Command Line WordPress with WP-CLICommand Line WordPress with WP-CLI
Command Line WordPress with WP-CLI
 
The Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLI
 
WordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cli
WordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cliWordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cli
WordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cli
 
Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLI
 
WP-CLI Workshop at WordPress Meetup Cluj-Napoca
WP-CLI Workshop at WordPress Meetup Cluj-NapocaWP-CLI Workshop at WordPress Meetup Cluj-Napoca
WP-CLI Workshop at WordPress Meetup Cluj-Napoca
 
WooCommerce WP-CLI Basics
WooCommerce WP-CLI BasicsWooCommerce WP-CLI Basics
WooCommerce WP-CLI Basics
 
WP-CLI: WordCamp NYC 2015
WP-CLI: WordCamp NYC 2015WP-CLI: WordCamp NYC 2015
WP-CLI: WordCamp NYC 2015
 

More from Andrea Cardinali

5 falsi miti su Woocommerce - Andrea Cardinali - WordCamp Catania 2019
5 falsi miti su Woocommerce - Andrea Cardinali - WordCamp Catania 20195 falsi miti su Woocommerce - Andrea Cardinali - WordCamp Catania 2019
5 falsi miti su Woocommerce - Andrea Cardinali - WordCamp Catania 2019Andrea Cardinali
 
WordPress Async 101 - An Introduction to wp-ajax and rest api - WordCamp Bari...
WordPress Async 101 - An Introduction to wp-ajax and rest api - WordCamp Bari...WordPress Async 101 - An Introduction to wp-ajax and rest api - WordCamp Bari...
WordPress Async 101 - An Introduction to wp-ajax and rest api - WordCamp Bari...Andrea Cardinali
 
From Cache to Ca$h - Advanced use of WP Cache - Andrea Cardinali
From Cache to Ca$h - Advanced use of WP Cache - Andrea CardinaliFrom Cache to Ca$h - Advanced use of WP Cache - Andrea Cardinali
From Cache to Ca$h - Advanced use of WP Cache - Andrea CardinaliAndrea Cardinali
 
4+1 Errori SEO Fatali per il tuo sito WordPress
4+1 Errori SEO Fatali per il tuo sito WordPress4+1 Errori SEO Fatali per il tuo sito WordPress
4+1 Errori SEO Fatali per il tuo sito WordPressAndrea Cardinali
 
Andrea Cardinali - WordPress Performance Optimization Cos'è cambiato con HTTP/2
Andrea Cardinali - WordPress Performance Optimization Cos'è cambiato con HTTP/2Andrea Cardinali - WordPress Performance Optimization Cos'è cambiato con HTTP/2
Andrea Cardinali - WordPress Performance Optimization Cos'è cambiato con HTTP/2Andrea Cardinali
 
Andrea Cardinali - SEO on Site e WordPress Errori da Evitare
Andrea Cardinali - SEO on Site e WordPress Errori da Evitare Andrea Cardinali - SEO on Site e WordPress Errori da Evitare
Andrea Cardinali - SEO on Site e WordPress Errori da Evitare Andrea Cardinali
 
Rivoluziona il tuo sito con le WP REST API - Andrea Cardinali
Rivoluziona il tuo sito con le WP REST API - Andrea CardinaliRivoluziona il tuo sito con le WP REST API - Andrea Cardinali
Rivoluziona il tuo sito con le WP REST API - Andrea CardinaliAndrea Cardinali
 
Realizzare siti velocissimi che si caricano in un secondo - WordCamp Milano 2...
Realizzare siti velocissimi che si caricano in un secondo - WordCamp Milano 2...Realizzare siti velocissimi che si caricano in un secondo - WordCamp Milano 2...
Realizzare siti velocissimi che si caricano in un secondo - WordCamp Milano 2...Andrea Cardinali
 
WordPress - 9 Falsi miti smascherati - Andrea Cardinali - WordPress Romagna M...
WordPress - 9 Falsi miti smascherati - Andrea Cardinali - WordPress Romagna M...WordPress - 9 Falsi miti smascherati - Andrea Cardinali - WordPress Romagna M...
WordPress - 9 Falsi miti smascherati - Andrea Cardinali - WordPress Romagna M...Andrea Cardinali
 
I vantaggi di utilizzare un Visual Composer - WordCamp Torino 2017 - Andrea C...
I vantaggi di utilizzare un Visual Composer - WordCamp Torino 2017 - Andrea C...I vantaggi di utilizzare un Visual Composer - WordCamp Torino 2017 - Andrea C...
I vantaggi di utilizzare un Visual Composer - WordCamp Torino 2017 - Andrea C...Andrea Cardinali
 
5 Errori Seo Da Non Commettere Sul Tuo E-Commerce
5 Errori Seo Da Non Commettere Sul Tuo E-Commerce5 Errori Seo Da Non Commettere Sul Tuo E-Commerce
5 Errori Seo Da Non Commettere Sul Tuo E-CommerceAndrea Cardinali
 
CMS in ottica SEO per i contenuti - SEMrush WebStudy Marathon - SEO Tecnico -...
CMS in ottica SEO per i contenuti - SEMrush WebStudy Marathon - SEO Tecnico -...CMS in ottica SEO per i contenuti - SEMrush WebStudy Marathon - SEO Tecnico -...
CMS in ottica SEO per i contenuti - SEMrush WebStudy Marathon - SEO Tecnico -...Andrea Cardinali
 
My WordPress Toolbox - WordPress Meetup Romagna #13 - 15 Settembre 2016
My WordPress Toolbox - WordPress Meetup Romagna #13 - 15 Settembre 2016My WordPress Toolbox - WordPress Meetup Romagna #13 - 15 Settembre 2016
My WordPress Toolbox - WordPress Meetup Romagna #13 - 15 Settembre 2016Andrea Cardinali
 
SEO On Site & WordPress - Errori da Evitare - #10 WordPress Meetup Romagna C...
SEO On Site & WordPress - Errori da Evitare  - #10 WordPress Meetup Romagna C...SEO On Site & WordPress - Errori da Evitare  - #10 WordPress Meetup Romagna C...
SEO On Site & WordPress - Errori da Evitare - #10 WordPress Meetup Romagna C...Andrea Cardinali
 
WordPress, migrazioni e re-branding: don't try this at home. #wmf15
WordPress, migrazioni e re-branding: don't try this at home. #wmf15WordPress, migrazioni e re-branding: don't try this at home. #wmf15
WordPress, migrazioni e re-branding: don't try this at home. #wmf15Andrea Cardinali
 
WPDay 2015 - WordPress Performance Optimization - Pordenone - 13 Novembre 2015
WPDay 2015 - WordPress Performance Optimization - Pordenone - 13 Novembre 2015WPDay 2015 - WordPress Performance Optimization - Pordenone - 13 Novembre 2015
WPDay 2015 - WordPress Performance Optimization - Pordenone - 13 Novembre 2015Andrea Cardinali
 
Seo on site - La stai facendo nel modo giusto? | GT Conference Torino 2013
Seo on site - La stai facendo nel modo giusto? | GT Conference Torino 2013Seo on site - La stai facendo nel modo giusto? | GT Conference Torino 2013
Seo on site - La stai facendo nel modo giusto? | GT Conference Torino 2013Andrea Cardinali
 
50 tips su Web  Performance Optimization per siti ad alto traffico @ WpCamp B...
50 tips su Web  Performance Optimization per siti ad alto traffico @ WpCamp B...50 tips su Web  Performance Optimization per siti ad alto traffico @ WpCamp B...
50 tips su Web  Performance Optimization per siti ad alto traffico @ WpCamp B...Andrea Cardinali
 
5 consigli SEO da tenere a mente durante lo sviluppo di temi e plugin @ WpCam...
5 consigli SEO da tenere a mente durante lo sviluppo di temi e plugin @ WpCam...5 consigli SEO da tenere a mente durante lo sviluppo di temi e plugin @ WpCam...
5 consigli SEO da tenere a mente durante lo sviluppo di temi e plugin @ WpCam...Andrea Cardinali
 

More from Andrea Cardinali (19)

5 falsi miti su Woocommerce - Andrea Cardinali - WordCamp Catania 2019
5 falsi miti su Woocommerce - Andrea Cardinali - WordCamp Catania 20195 falsi miti su Woocommerce - Andrea Cardinali - WordCamp Catania 2019
5 falsi miti su Woocommerce - Andrea Cardinali - WordCamp Catania 2019
 
WordPress Async 101 - An Introduction to wp-ajax and rest api - WordCamp Bari...
WordPress Async 101 - An Introduction to wp-ajax and rest api - WordCamp Bari...WordPress Async 101 - An Introduction to wp-ajax and rest api - WordCamp Bari...
WordPress Async 101 - An Introduction to wp-ajax and rest api - WordCamp Bari...
 
From Cache to Ca$h - Advanced use of WP Cache - Andrea Cardinali
From Cache to Ca$h - Advanced use of WP Cache - Andrea CardinaliFrom Cache to Ca$h - Advanced use of WP Cache - Andrea Cardinali
From Cache to Ca$h - Advanced use of WP Cache - Andrea Cardinali
 
4+1 Errori SEO Fatali per il tuo sito WordPress
4+1 Errori SEO Fatali per il tuo sito WordPress4+1 Errori SEO Fatali per il tuo sito WordPress
4+1 Errori SEO Fatali per il tuo sito WordPress
 
Andrea Cardinali - WordPress Performance Optimization Cos'è cambiato con HTTP/2
Andrea Cardinali - WordPress Performance Optimization Cos'è cambiato con HTTP/2Andrea Cardinali - WordPress Performance Optimization Cos'è cambiato con HTTP/2
Andrea Cardinali - WordPress Performance Optimization Cos'è cambiato con HTTP/2
 
Andrea Cardinali - SEO on Site e WordPress Errori da Evitare
Andrea Cardinali - SEO on Site e WordPress Errori da Evitare Andrea Cardinali - SEO on Site e WordPress Errori da Evitare
Andrea Cardinali - SEO on Site e WordPress Errori da Evitare
 
Rivoluziona il tuo sito con le WP REST API - Andrea Cardinali
Rivoluziona il tuo sito con le WP REST API - Andrea CardinaliRivoluziona il tuo sito con le WP REST API - Andrea Cardinali
Rivoluziona il tuo sito con le WP REST API - Andrea Cardinali
 
Realizzare siti velocissimi che si caricano in un secondo - WordCamp Milano 2...
Realizzare siti velocissimi che si caricano in un secondo - WordCamp Milano 2...Realizzare siti velocissimi che si caricano in un secondo - WordCamp Milano 2...
Realizzare siti velocissimi che si caricano in un secondo - WordCamp Milano 2...
 
WordPress - 9 Falsi miti smascherati - Andrea Cardinali - WordPress Romagna M...
WordPress - 9 Falsi miti smascherati - Andrea Cardinali - WordPress Romagna M...WordPress - 9 Falsi miti smascherati - Andrea Cardinali - WordPress Romagna M...
WordPress - 9 Falsi miti smascherati - Andrea Cardinali - WordPress Romagna M...
 
I vantaggi di utilizzare un Visual Composer - WordCamp Torino 2017 - Andrea C...
I vantaggi di utilizzare un Visual Composer - WordCamp Torino 2017 - Andrea C...I vantaggi di utilizzare un Visual Composer - WordCamp Torino 2017 - Andrea C...
I vantaggi di utilizzare un Visual Composer - WordCamp Torino 2017 - Andrea C...
 
5 Errori Seo Da Non Commettere Sul Tuo E-Commerce
5 Errori Seo Da Non Commettere Sul Tuo E-Commerce5 Errori Seo Da Non Commettere Sul Tuo E-Commerce
5 Errori Seo Da Non Commettere Sul Tuo E-Commerce
 
CMS in ottica SEO per i contenuti - SEMrush WebStudy Marathon - SEO Tecnico -...
CMS in ottica SEO per i contenuti - SEMrush WebStudy Marathon - SEO Tecnico -...CMS in ottica SEO per i contenuti - SEMrush WebStudy Marathon - SEO Tecnico -...
CMS in ottica SEO per i contenuti - SEMrush WebStudy Marathon - SEO Tecnico -...
 
My WordPress Toolbox - WordPress Meetup Romagna #13 - 15 Settembre 2016
My WordPress Toolbox - WordPress Meetup Romagna #13 - 15 Settembre 2016My WordPress Toolbox - WordPress Meetup Romagna #13 - 15 Settembre 2016
My WordPress Toolbox - WordPress Meetup Romagna #13 - 15 Settembre 2016
 
SEO On Site & WordPress - Errori da Evitare - #10 WordPress Meetup Romagna C...
SEO On Site & WordPress - Errori da Evitare  - #10 WordPress Meetup Romagna C...SEO On Site & WordPress - Errori da Evitare  - #10 WordPress Meetup Romagna C...
SEO On Site & WordPress - Errori da Evitare - #10 WordPress Meetup Romagna C...
 
WordPress, migrazioni e re-branding: don't try this at home. #wmf15
WordPress, migrazioni e re-branding: don't try this at home. #wmf15WordPress, migrazioni e re-branding: don't try this at home. #wmf15
WordPress, migrazioni e re-branding: don't try this at home. #wmf15
 
WPDay 2015 - WordPress Performance Optimization - Pordenone - 13 Novembre 2015
WPDay 2015 - WordPress Performance Optimization - Pordenone - 13 Novembre 2015WPDay 2015 - WordPress Performance Optimization - Pordenone - 13 Novembre 2015
WPDay 2015 - WordPress Performance Optimization - Pordenone - 13 Novembre 2015
 
Seo on site - La stai facendo nel modo giusto? | GT Conference Torino 2013
Seo on site - La stai facendo nel modo giusto? | GT Conference Torino 2013Seo on site - La stai facendo nel modo giusto? | GT Conference Torino 2013
Seo on site - La stai facendo nel modo giusto? | GT Conference Torino 2013
 
50 tips su Web  Performance Optimization per siti ad alto traffico @ WpCamp B...
50 tips su Web  Performance Optimization per siti ad alto traffico @ WpCamp B...50 tips su Web  Performance Optimization per siti ad alto traffico @ WpCamp B...
50 tips su Web  Performance Optimization per siti ad alto traffico @ WpCamp B...
 
5 consigli SEO da tenere a mente durante lo sviluppo di temi e plugin @ WpCam...
5 consigli SEO da tenere a mente durante lo sviluppo di temi e plugin @ WpCam...5 consigli SEO da tenere a mente durante lo sviluppo di temi e plugin @ WpCam...
5 consigli SEO da tenere a mente durante lo sviluppo di temi e plugin @ WpCam...
 

Recently uploaded

Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 

Recently uploaded (20)

Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 

Advanced WordPress Management with WP-CLI

  • 1. GESTIONE AVANZATA DI WORDPRESS CON WP-CLI Andrea Cardinali @andreacardinali T.C. Informatica WordCamp Torino - 8 Aprile 2017 - #wctrn
  • 2. ANDREA CARDINALI • DEVELOPER & SEO @ T.C. INFORMATICA • WORDPRESS LOVER SINCE v2.8 • PROUD MEMBER OF WORDPRESS MEETUP ROMAGNA • seoCMS ORGANIZER
  • 4. TABLE OF CONTENTS 1. WHAT IS WP-CLI AND WHY USE IT 2. HOW TO USE IT (INSTALL AND EXAMPLES) 3. ADVANCED USAGES 4. DEMO TIME 5. QUESTIONS
  • 6. VERY SHORT HISTORY • Open source Project created in 2011 https://github.com/wp-cli/wp-cli/ • Project maintained by Daniel Bachhuber. • Initial code by Andreas Creten and Cristi Burcă (scribu). • Officially supported by WordPress.org since December 2016
  • 10. WHAT IS WP-CLI PHAR (PHP Archive) •Single file (*.phar) containing multiple files •PHP Application (kinda of *.exe on Win /*.app on Mac)
  • 12. WHAT IS WP-CLI WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, configure multisite installs and much more, without using a web browser.
  • 14. MINIMUM REQUIREMENTS • UNIX-like environment (OS X, Linux, FreeBSD, Cygwin); (limited support in Windows environment) • PHP 5.3.29 or later (php 5.3 EOL 14 Aug 2014) • WordPress 3.7 or later (released on October 2013) • SSH access • no root privileges needed* • http://wp-cli.org/
  • 15. HOW TO INSTALL IT (locally) curl -O https://raw.githubusercontent.com/wp- cli/builds/gh-pages/phar/wp-cli.phar php wp-cli.phar --info or Download it manually and copy it into document root NOTICE: if installed locally WP-CLI must be placed in the same folder of WP core files (i.e. public_html) https://make.wordpress.org/cli/handbook/installing/
  • 16. HOW TO INSTALL IT (globally) curl -O https://raw.githubusercontent.com/wp- cli/builds/gh-pages/phar/wp-cli.phar php wp-cli.phar --info chmod +x wp-cli.phar sudo mv wp-cli.phar /usr/local/bin/wp wp --info https://make.wordpress.org/cli/handbook/installing/
  • 18. USE VVV TO TRY IT • VVV (Variable Varying Vagrant) provides WP-CLI • VVV uses WP-CLI under the hood to create new WP install https://www.slideshare.net/AndreaCardinali/professional-wordpress-development-with-vagrant-andrea-cardinali-wordcamp-milano-2016
  • 19. USE WP-CLI POWERED HOSTING https://make.wordpress.org/cli/handbook/hosting-companies/
  • 21. WP-CLI SYNOPSIS wp command subcommand args --global-arg1
  • 22. WP-CLI GLOBAL ARGS --path=<path>Path to the WordPress files. --ssh=[<user>@]<host>[:<port>][<path>]Perform operation against a remote server over SSH. --http=<http>Perform operation against a remote WordPress install over HTTP. --url=<url>Pretend request came from given URL. In multisite, this argument is how the target site is specified. --user=<id|login|email>Set the WordPress user. --skip-plugins[=<plugin>]Skip loading all or some plugins. Note: mu-plugins are still loaded. --skip-themes[=<theme>]Skip loading all or some themes. --skip-packagesSkip loading all installed packages. --require=<path>Load PHP file before running the command (may be used more than once). --[no-]colorWhether to colorize the output. --debug[=<group>]Show all PHP errors; add verbosity to WP-CLI bootstrap. --prompt[=<assoc>]Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. --quietSuppress informational messages.
  • 23. WHY SHOULD I USE IT?
  • 25. EXTENSIBLE • Extend functionalities with packages • Write your own functionality (more on this later) • You can concat multiple commands (pipe) • SSH support out of the box (control your WP from remote)
  • 26. FAST
  • 27. FAST • CLI is faster than browser • WP-CLI can skip plugin / themes loading • You can create a shell script with multiple wp-cli commands
  • 29. SAVE TIME • DRY: Don’t Repeat Yourself • You don’t have to login / visit url/ wait for page loads • You can export data in CSV, XML, JSON • You can pilot multiple installation at once
  • 30. TAKE AWAY • WP-CLI is a swiss army knife for wp users • WP-CLI can be installed if not available on your hosting • WP-CLI let you save a lot of time
  • 31. HOW LONG IT TAKES TO PERFORM THE FOLLOWING OPERATIONS? 1. Download WordPress 2. Install theme 3. Install and activate plugins 4. Create users 5. Import backup (from dev) 6. Replace production url
  • 33. HOW DO YOU USUALLY INSTALL WORDPRESS?
  • 34. BRAND NEW WP INSTALL wp core download --locale=it_IT wp core config --dbuser=‘wp’ --dbpass=‘wp’ -- dbprefix=‘wctrn17_’ wp core install --siteurl=‘’ wp core config --prompt wp core install --prompt http://wp-cli.org/commands/core/
  • 35. USEFUL SUBCOMMANDS WORDPRESS INSTALL wp core [subcommand] wp core download wp core config wp core update wp core update-db wp core version wp core multisite-convert http://wp-cli.org/commands/core/
  • 36. HOW DO YOU COPY DATABASE FROM DEV TO PRODUCTION?
  • 37. USEFUL SUBCOMMANDS REPLACE STRING IN DATABASE wp search-replace oldstring newstring wp search-replace http://dev.mysite.com http://www.mysite.com
  • 38. HOW DO YOU USUALLY INSTALL A PLUGIN?
  • 39. USEFUL SUBCOMMANDS INSTALL A PLUGIN wp plugin install sg-cachepress --activate wp plugin install sg-cachepress --activate http://wp-cli.org/commands/plugin/
  • 40. USEFUL SUBCOMMANDS PLUGINS wp plugin [subcommand] wp plugin install $slug --version= wp plugin activate wp plugin list wp plugin update $slug wp plugin --update-all wp plugin toggle
  • 41. WHAT IF YOU HAVE TO INSTALL 15 PLUGINS?
  • 42. INSTALL MULTIPLE PLUGINS AT ONCE cat plugins.txt | xargs wp plugin install https://gist.github.com/Cardy/347807cf73681783f1fb6c2911a7cddd
  • 43. INSTALL MULTIPLE PLUGINS AT ONCE WITH SPECIFIC VERSION sh plugins.sh https://gist.github.com/Cardy/347807cf73681783f1fb6c2911a7cddd #!/bin/bash input="./plugins.txt" # Set "," as the field separator using $IFS # and read line by line using while read combo while IFS=',' read -r f1 f2 do if [ -z "$f1" ] then continue; fi echo "Installing $f1 $f2" if [ -z "$f2" ] then wp plugin install $f1 --activate >> install.log 2>&1 else wp plugin install $f1 --version=$f2 --force --activate >> install.log 2>&1 fi done < "$input"
  • 44. HOW DO YOU REGENERATE POST THUMBNAILS?
  • 45. USEFUL SUBCOMMANDS THUMBNAILS wp media [subcommand] wp media regenerate wp media import ~/Pictures/**/*.jpg http://wp-cli.org/commands/media/
  • 46. WHAT IF YOU HAVE TO REGENERATE ONLY THE MOST RECENT THUMBNAILS?
  • 47. THUMBNAILS wp media regenerate $(wp post list -- post_type=attachment --format=ids -- posts_per_page=50) • http://wp-cli.org/commands/media/
  • 48. HOW DO YOU EMPTY CACHE / TRANSIENTS?
  • 49. USEFUL SUBCOMMANDS HANDLE CACHE wp cache [subcommand] wp cache set $key $value $group $expire wp cache add wp cache get
  • 50. USEFUL SUBCOMMANDS HANDLE TRANSIENTS wp transient [subcommand] wp transient delete --expired http://wp-cli.org/commands/transient/
  • 51. HOW DO YOU HANDLE YOUR DB?
  • 52. USEFUL SUBCOMMANDS BACKUP / RESTORE DB wp db [subcommand] wp db export filename.sql wp db import filename.sql
  • 53. USEFUL SUBCOMMANDS WORKS ON DB WITHOUT phpMyAdmin wp db [subcommand] wp db create wp db drop --yes wp db query < my_query.sql wp db optimize http://wp-cli.org/commands/db/
  • 54. HOW DO YOU MANAGE USERS / ROLES ?
  • 55. USEFUL SUBCOMMANDS USERS AND CAPABILITIES wp user [subcommand] wp user list wp user create username email --role=rolename wp user update 1 --user_pass=‘changeMe123’ wp user import-csv http://wp-cli.org/commands/user/
  • 58. YAML FILE You can define a wp-cli.yaml to store default configuration 1. inline args 2. wp-cli.local.yml file inside the current working directory (or upwards). 3. wp-cli.yml file inside the current working directory (or upwards). 4. ~/.wp-cli/config.yml file WP-CLI defaults.
  • 60. WP-CLI PACKAGE Available on all WordPress installs, as opposed to just where the plugin is activated.
  • 61. USEFUL SUBCOMMANDS WP-CLI PACKAGE wp cli [subcommand] wp package install wp-cli/restful wp package list wp package install
  • 62. (SOME) USEFUL WP-CLI PACKAGES wp-cli/restful binarygary/db-checkpoint runcommand/assign-featured-images and many more https://wp-cli.org/package-index/
  • 63. WP-CLI RESTFUL RESTful WP-CLI makes WP REST API endpoints available as WP- CLI commands. https://github.com/wp-cli/restful
  • 66. WP-CLI EXECUTION • WP_CLI::launch() - Launch an arbitrary external process that takes over I/O. • WP_CLI::launch_self() - Run a WP-CLI command in a new process reusing the current runtime arguments. • WP_CLI::runcommand() - Run a WP-CLI command. • WP_CLI::run_command() - Run a given command within the current process using the same global
  • 68. WP-CLI HOOKS • WP_CLI::add_hook() - Schedule a callback to be executed at a certain point. • WP_CLI::do_hook() - Execute callbacks registered to a given hook. • WP_CLI::add_wp_hook() - Add a callback to a WordPress action or filter. • WP_CLI::add_command() - Register a command to WP-CLI.
  • 69. WP-CLI HOOKS WP_CLI::add_hook( $when, $callback) esegue $callback quando viene scatenato $when WP_CLI::do_hook( $when ) scatena $when che può essere agganciato tramite add_hook
  • 70. WP-CLI $when before_invoke:<command> - Just before a command is invoked. after_invoke:<command> - Just after a command is involved. before_wp_load - Just before the WP load process begins. before_wp_config_load - After wp-config.php has been located. after_wp_config_load - After wp-config.php has been loaded into scope. after_wp_load - Just after the WP load process has completed.
  • 71. WP-CLI OUTPUT • WP_CLI::log() - Display informational message without prefix. • WP_CLI::success() - Display success message prefixed with "Success: ". • WP_CLI::debug() - Display debug message prefixed with "Debug: " when `-- debug` is used. • WP_CLI::warning() - Display warning message prefixed with "Warning: ". • WP_CLI::error() - Display error message prefixed with "Error: " and exit script. • WP_CLI::halt() - Halt script execution with a specific return code.
  • 72. CREATE YOUR OWN PACKAGE
  • 73. CREATE YOUR OWN PACKAGE 1. Create a new command 2. Extend an existing one (create a subcommand) 3. Make use of PHPDoc 4. Include your package inside a plugin or add it to wp package index https://make.wordpress.org/cli/handbook/commands-cookbook/
  • 74. CREATE YOUR OWN PACKAGE https://make.wordpress.org/cli/handbook/commands-cookbook/ https://wp-cli.org/docs/internal-api/ <?php class Cardy_Command { public function greetings( $args ) { WP_CLI::success(‘Hello World'); } } $instance = new Cardy_Command(); WP_CLI::add_command( 'cardy', $instance );
  • 75. ADD PACKAGE TO YOUR PLUGIN if ( defined( 'WP_CLI' ) && WP_CLI ) { require_once dirname( __FILE__ ) . '/inc/class- plugin-cli-command.php'; }
  • 77. HOW LONG IT TAKES TO PERFORM THE FOLLOWING OPERATIONS? 1. Download WordPress 2. Install theme 3. Install and activate plugins 4. Create users
  • 81. WORDPRESS MEETUP ROMAGNA QUANDO: ogni 1° giovedi del mese DOVE: Dinamo Coworking Space Cesena PERCHÉ: Per parlare di WordPress, conoscere bella gente e condividere le proprie esperienze wpromagna.com @romagnawp