15
Using WP-CLI to Create Your Own Managed WordPress Hosting

Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

Using WP-CLI to Create Your Own Managed WordPress Hosting

Page 2: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

• Command-Line

• SSH

• Varying Vagrant Vagrants

Page 3: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

These aren’t scary!

Page 4: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

What is SSH?

• Connection from your local computer to a remote computer

• Secure, seriously, it’s secure

Page 5: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

How can I SSH?

• Terminal (Mac OS X)

• iTerm (Mac OS X)

• PuTTY (Windows)

• Prompt 2 (iOS)

Page 6: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

Install WP-CLIhttp://wp-cli.org

Many hosts already offer it pre-installed.

Page 7: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

Running Commands

wp <command> <sub-command> <params>

Page 8: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

Running Commands

<param> — required

[--param] — optional flag

[--param=<value>] — optional w/value

Page 9: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

core• Check current WordPress version, or see if there

are updates available.

• Do the update!

• Install a brand new site

• Convert an existing site to Multisite!

• Verify core checksums

Page 10: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

core• We can setup a brand new site on a development

server using the following:

wp core download

wp core config

wp db create

wp core install --prompt

Page 11: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

plugins

• Install, Delete Plugins

• Activate & Deactivate Plugins

• Update Plugins

• Search the repository for plugins

Page 12: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

Plugins

• Time savers!

wp plugin update --all

wp plugin deactivate --all

Page 13: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

Database

• The “db” command is how WP-CLI interacts with the MySQL database.

wp db export backup-file-name.sql

wp db import backup-file-name.sql

wp db cli

Page 14: Using WP-CLI to Create Your Own Managed WordPress Hosting · 2016. 3. 26. · core • Check current WordPress version, or see if there are updates available. • Do the update! •

Coding Time!