2. Internet 2200 jaar geleden:
de Bibliotheek van Alexandrië
❖ Surfen in de oudheid
❖ De boot nemen naar…
Alexandrië in Egypte
❖ Snuisteren in één van de
400.000 boekrollen
3. Kopiisten: de webmasters van weleer
❖ Levensduur boekrol +/- 80 jaar
❖ Boekrol kopiëren => 2 kopiisten
(pair programming) 5 weken
❖ 400.000 boekrollen zou een
legertje van 1000 kopiisten
vergen… in een pre-industriële
samenleving was verval was
onvermijdelijk.
4. Gebrek aan onderhoud: vroeger en nu
❖ Website wordt traag
❖ Gebruiksgemak gaat achteruit
❖ SEO rankings slabakken
❖ En uiteindelijk...
5. WP-CLI: Tikken in plaats van klikken
❖ WP-CLI is de officiële command line interface om je
WordPress sites te beheren.
❖ Alle taken die je kan uitvoeren op de back end of
administratiepagina’s van je WordPress site kan je ook
uitvoeren met WP-CLI (en meer)
❖ WP-CLI leent zich tot uitbreiding en automatisering
❖ WPI-CLI is de snelste manier op je WordPress sites te
beheren
6. Een voorbeeldje
Mijn back end is zo perfect
getuned dat ik sneller kan
klikken dan jij kan tikken
met je WP-CLI...
10. WP-CLI in actie
$ wp plugin deactivate evil-plugin
Plugin ‘evil-plugin’ deactivated.
Succes: Deactivated 1 of 1 plugins.
11. De Terminal
❖ Om met WP-CLI aan de slag te gaan heb je een
terminal nodig waarmee je via SSH connecteert
op je server.
❖ Linux en OS X systemen zijn standaard uitgerust
met terminal software.
❖ Op Windows kan je Putty of Cygwin installeren.
12. Installatie
❖ Alle betrouwbare hostingbedrijven bieden
WP-CLI standaard aan
❖ Alle goede kant-en-klare lokale WordPress
ontwikkelomgevingen zijn uitgerust met WP-CLI
❖ Steek je graag zelf de handen uit de mouwen volg
dan handleiding op wp-cli.org of vraag het aan je
favoriete systeembeheerder
13. $ wp
NAME
wp
DESCRIPTION
Manage WordPress through the command line
SYNOPSIS
Wp <command>
SUBCOMMANDS
cache Adds,removes,fetches,and flushes the WP Object Cache object.
cap Adds,removes, and lists capabilities of a user role.
:
WP-CLI in detail
14. wp admin
wp cache
wp cap
wp cli
wp comment
wp config
wp core
wp cron
wp db
wp dist-archive
wp embed
wp eval
wp eval-file
wp export
wp find
wp help
wp import
wp language
wp media
wp menu
wp network
wp option
wp package
wp plugin
wp post
wp post-type
wp rewrite
wp role
wp scaffold
wp search-replace
wp server
wp shell
wp sidebar
wp site
wp super-admin
wp taxonomy
wp term
wp theme
wp transient
wp user
wp widget
WP-CLI in detail
16. $ wp plugin --help
WP-CLI in detail
command global parameter
17. NAME
Wp plugin
DESCRIPTION
Manages plugins, including installs, activation, and
updates.
SYNOPSIS
Wp plugin <command>
SUBCOMMANDS
activate Activates one or more plugins.
deactivate Deactivates one or more plugins
:
WP-CLI in detail
18. SUBCOMMANDS
activate Activates one or more plugins.
deactivate Deactivates one or more plugins.
delete Deletes plugin files without deactivating or uninstalling.
get Gets details about an installed plugin.
install Installs one or more plugins.
is-installed Checks if a given plugin is installed.
list Gets a list of plugins.
path Gets the path to a plugin or to the plugin directory.
search Searches the WordPress.org plugin directory.
status Reveals the status of one or all plugins.
toggle Toggles a plugin's activation state.
uninstall Uninstalls one or more plugins.
update Updates one or more plugins.
verify-checksums Verifies plugin files against WordPress.org's checksums.
WP-CLI in detail
19. $ wp plugin list
+-----------------------------+----------+-----------+-----------+
| name | status | update | version |
+-----------------------------+----------+-----------+-----------+
| bulk-delete | inactive | none | 5.6.1 |
| content-scheduler | inactive | none | 2.0.5 |
| debug-bar | active | available | 0.9 |
| disable-emojis | active | none | 1.7 |
| export-user-data | inactive | none | 1.3.1 |
| formidable | active | none | 3.0.05 |
| formidable-pro | active | none | 3.0.05 |
| formidable-wpml | active | none | 1.04 |
| formidable-registration | inactive | none | 1.11.07 |
| fusion-builder | active | none | 1.3.1 |
| fusion-core | active | none | 3.3.1 |
+-----------------------------+----------+-----------+-----------+
WP-CLI in detail
20. NAME
wp plugin update
DESCRIPTION
Updates one or more plugins.
SYNOPSIS
wp plugin update [<plugin>...] [--all] [--exclude=<name>] [--minor]
[--patch]
[--format=<format>] [--version=<version>] [--dry-run]
OPTIONS
[<plugin>...]
One or more plugins to update.
[--all]
If set, all plugins that have updates will be updated.
:
WP-CLI in detail
21. $ wp plugin update evil-plugin
WP-CLI in detail
command subcommand option/parameter
Installing evil-plugin
Downloading install package from
https://downloads.wordpress.org/plugin/evil-plugin.zip...
Unpacking the package...
Installing the plugin...
Removing the old version of the plugin...
Plugin updated successfully.
Success: Updated 1 of 1 plugins.