Methods |
public
|
install(string $hostname, string $path = '', array $opts = []): bool
Install WordPress
Parameters
$hostname |
domain or subdomain to install WordPress
|
$path |
optional path under hostname
|
$opts |
additional install options
|
|
#
|
public
|
get_version(string $hostname, string $path = ''): string
Get installed version
|
#
|
public
|
valid(string $hostname, string $path = ''): bool
Location is a valid WP install
Location is a valid WP install
Parameters
|
#
|
public
|
fortify(string $hostname, string $path = '', string $mode = 'max', array $args = []): bool
Restrict write-access by the app
Restrict write-access by the app
|
#
|
public
|
plugin_status(string $hostname, string $path = '', string|null $plugin = null): array|bool
Enumerate plugin states
|
#
|
public
|
install_plugin(string $hostname, string $path, string $plugin, string $version = ''): bool
Install and activate plugin
Install and activate plugin
Parameters
$hostname |
domain or subdomain of wp install
|
$path |
optional path component of wp install
|
$plugin |
plugin name
|
$version |
optional plugin version
|
|
#
|
public
|
uninstall_plugin(string $hostname, string $path, string $plugin, bool $force = false): bool
Uninstall a plugin
Parameters
$plugin |
plugin name
|
$force |
delete even if plugin activated
|
|
#
|
public
|
disable_plugin(string $hostname, string $path, string $plugin): bool
Disable plugin
|
#
|
public
|
enable_plugin(string $hostname, string $path, string $plugin): bool
Enable plugin
|
#
|
public
|
disable_theme(string $hostname, string $path, string $plugin): bool
Disable theme
|
#
|
public
|
enable_theme(string $hostname, string $path, string $plugin): bool
Enable theme
|
#
|
public
|
uninstall_theme(string $hostname, string $path, string $theme, bool $force = false): bool
Remove a Wordpress theme
|
#
|
public
|
disable_all_plugins(string $hostname, string $path = ''): bool
Recovery mode to disable all plugins
Recovery mode to disable all plugins
Parameters
$hostname |
subdomain or domain of WP
|
$path |
optional path
|
|
#
|
public
|
uninstall(string $hostname, string $path = '', string $delete = 'all'): bool
Uninstall WP from a location
Uninstall WP from a location
Parameters
$delete |
"all", "db", or "files"
|
|
#
|
public
|
db_config(string $hostname, string $path = ''): array|bool
Get database configuration for a blog
Get database configuration for a blog
Parameters
$hostname |
domain or subdomain of wp blog
|
$path |
optional path
|
|
#
|
public
|
change_admin(string $hostname, string $path, array $fields): bool
Change WP admin credentials
Change WP admin credentials
$fields is a hash whose indices match wp_update_user
common fields include: user_pass, user_login, and user_nicename
|
#
|
public
|
get_admin(string $hostname, null|string $path = ''): string
Get the primary admin for a WP instance
Get the primary admin for a WP instance
Returns
admin or false on failure
|
#
|
public
|
update_all(string $hostname, string $path = '', string $version = null): bool
Update core, plugins, and themes atomically
Update core, plugins, and themes atomically
Parameters
$hostname |
subdomain or domain
|
$path |
optional path under hostname
|
|
#
|
public
|
update_themes(string $hostname, string $path = '', array $themes = []): bool
Update WordPress themes
Parameters
$hostname |
subdomain or domain
|
$path |
optional path under hostname
|
|
#
|
public
|
update_plugins(string $hostname, string $path = '', array $plugins = []): bool
Update WordPress plugins
Parameters
$hostname |
domain or subdomain
|
$path |
optional path within host
|
$plugins |
flat list of plugins or multi-dimensional of name, force, version
|
|
#
|
public
|
update(string $hostname, string $path = '', string $version = null): bool
Update WordPress to latest version
Update WordPress to latest version
Parameters
$hostname |
domain or subdomain under which WP is installed
|
$path |
optional subdirectory
|
|
#
|
public
|
theme_status(string $hostname, string $path = '', string|null $theme = null): array|bool
Get theme status
Get theme status
Sample response:
[
hestia => [
version => 1.1.50
next => 1.1.51
current => false
max => 1.1.66
]
]
|
#
|
public
|
install_theme(string $hostname, string $path, string $theme, string $version = null): bool
|
#
|
public
|
_housekeeping(): bool
Install wp-cli if necessary
Install wp-cli if necessary
Throws
|
#
|
public
|
get_versions(): array
Get all available WordPress versions
Get all available WordPress versions
Returns
|
#
|
public
|
asset_summary(string $hostname, string $path = ''): array
Get basic summary of assets
Get basic summary of assets
|
#
|
public
|
skip_asset(string $hostname, string $path, string $name, string|null $type): bool
Skip updating an asset
|
#
|
public
|
unskip_asset(string $hostname, string $path, string $name, string|null $type): bool
Permit updates of an asset
Permit updates of an asset
|
#
|
public
|
asset_skipped(string $hostname, string $path, string $name, ?string $type): bool
|
#
|
public
|
install_language(string $hostname, string $path, string $lang): bool
Install language pack for WordPress
Install language pack for WordPress
|
#
|
public
|
language_status(string $hostname, string $path = '', string $lang = null): array
Enumerate information about languages installed in core
Enumerate information about languages installed in core
Parameters
|
#
|
public
|
uninstall_language(string $hostname, string $path, string $lang, bool $force = true): bool
Remove language from WordPress install
Remove language from WordPress install
|
#
|
public
|
duplicate(string $shostname, string $spath, string $dhostname, string $dpath, array $opts = []): bool
Duplicate a WordPress instance
Duplicate a WordPress instance
Parameters
$opts |
clean: (bool) purge target directory
|
|
#
|
public
|
install_package(string $package): bool
Install a WP-CLI package
|
#
|
public
|
package_installed(string $package): bool
WP-CLI package installed
|
#
|
public
|
uninstall_package(string $package): bool
Uninstall WP-CLI package
|
#
|
public
|
cli(string $command, array|string $args = [], string $hostname = null, string $path = ''): mixed
Apply WP-CLI directive
Parameters
$command |
directive
|
$args |
formatted args
|
$hostname |
hostname
|
$path |
subpath
|
Returns
hash of paths or single arraycomprised of @see pman:run() + ['hostname', 'path']
|
#
|