Method | Description | |
---|---|---|
activate ( $args, $assoc_args ) | Starts tracking the site | |
applyChanges ( $args = [], $assoc_args = [] ) | Applies changes from the disk to the database | |
checkRequirements ( $args, $assoc_args ) | Checks if VersionPress requirements are met. | |
cloneSite ( $args = [], $assoc_args = [] ) | Clones site to a new folder and database. | |
config ( $args, $assoc_args ) | Configures VersionPress. See options for details. | |
pull ( $args = [], $assoc_args = [] ) | Pulls changes from another clone | |
push ( $args = [], $assoc_args = [] ) | Pushes changes to another clone | |
restoreSite ( $args, $assoc_args ) | Restores a WP site from Git repo / working directory. | |
rollback ( $args = [], $assoc_args = [] ) | Rollbacks site to the same state as it was in the specified commit. | |
undo ( $args = [], $assoc_args = [] ) | Reverts commits | |
update ( $args = [], $assoc_args = [] ) | Updates VersionPress |
Method | Description | |
---|---|---|
checkVpRequirements ( $assoc_args, $requirementsScope ) | ||
dropTables ( ) | ||
finishPull ( ) | ||
flushRewriteRules ( ) | ||
getInitialCommitHash ( |
||
getRemoteUrl ( string $name ) : string | null | Returns URL for a remote name, or null if the remote isn't configured. | |
prepareDatabase ( array $assoc_args ) | Prepares an empty database - creates it if it doesn't exist or drops its WP tables if it does. | |
requireWpConfig ( string $wpConfigPath, string $commonConfigName ) | Tries to require Wordpress config files. Throws WP-CLI error when files not found. | |
runVPInternalCommand ( $subcommand, $args = [], $cwd = null ) | ||
setConfigUrl ( $urlConstant, $pathConstant, $defaultPath, $baseUrl ) | ||
someWpTablesExist ( string $dbUser, string $dbPassword, string $dbName, string $dbHost, string $dbPrefix ) : boolean | Checks if some tables with the given prefix exist in the database | |
suggestCloneUrl ( string $originUrl, string $originDirName, string $cloneDirName ) : string | Suggests clone URL by replacing directory names. If no suggestion can be made, returns null. | |
switchMaintenance ( string $onOrOff, string | null $remoteName = null ) | Switches the maintenance mode on or off for a site specified by a remote. | |
updateConfig ( $clonePath, $environment, $dbUser, $dbPassword, $dbName, $dbHost, $dbPrefix, $dbCharset, $dbCollate ) |
public activate ( $args, $assoc_args ) |
public applyChanges ( $args = [], $assoc_args = [] ) |
public checkRequirements ( $args, $assoc_args ) |
public cloneSite ( $args = [], $assoc_args = [] ) |
public config ( $args, $assoc_args ) |
public pull ( $args = [], $assoc_args = [] ) |
public push ( $args = [], $assoc_args = [] ) |
public restoreSite ( $args, $assoc_args ) |
public rollback ( $args = [], $assoc_args = [] ) |
public undo ( $args = [], $assoc_args = [] ) |
public update ( $args = [], $assoc_args = [] ) |