### Install and Activate a Plugin Source: https://closte.com/support/wordpress/using-wp-cli-command-line-tool These commands demonstrate how to install a specific plugin (e.g., 'bbpress') and then activate it within your WordPress site. This is a common workflow for adding new functionality. ```bash wp plugin install bbpress wp plugin activate bbpress ``` -------------------------------- ### SFTP Host Format Example Source: https://closte.com/support/wordpress/sftp This example demonstrates the correct format for entering the SFTP host address in a client like FileZilla. The host should be prefixed with 'sftp://' followed by the server's IP address. ```text sftp://127.0.0.1 ``` -------------------------------- ### List Installed Plugins Source: https://closte.com/support/wordpress/using-wp-cli-command-line-tool This command lists all installed plugins on your WordPress site, along with their status (active/inactive), update availability, and version numbers. It provides a comprehensive overview of your site's plugins. ```bash wp plugin list ``` -------------------------------- ### Convert SSL Certificate to PFX Format using OpenSSL Source: https://closte.com/support/wordpress/create-install-free-ssl This command-line instruction demonstrates how to convert an existing SSL certificate and its private key into the PFX format, which is required for importing into the Closte system. Ensure you have OpenSSL installed and replace placeholder filenames with your actual certificate and key files. ```bash openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt ``` -------------------------------- ### WP-CLI: Plugin Management Source: https://closte.com/support/wordpress/using-wp-cli-command-line-tools Commands for managing WordPress plugins, including installation, activation, and listing. These operations require the plugin slug as an argument. ```bash wp plugin install bbpress ``` ```bash wp plugin activate bbpress ``` ```bash wp plugin list +-------------------------------------+----------+-----------+---------+ | name | status | update | version | +-------------------------------------+----------+-----------+---------+ | bbpress | active | none | 2.5.10 | | closte | active | available | 2.0.3 | | custom-permalinks | inactive | available | 0.7.21 | | fluid-responsive-slideshow | inactive | available | 2.2.8 | | litespeed-cache | active | none | 1.0.10 | | migrate-to-liquidweb | active | none | 1.30 | | quick-pagepost-redirect-plugin | active | none | 5.1.8 | | thumbnails-regenerate | inactive | none | 2.0.5 | | simple-full-screen-background-image | inactive | none | 1.2 | | slideshow-satellite | inactive | none | 2.4 | | speed-booster-pack | inactive | none | 2.8 | | wd_shortcode | inactive | none | 1.1 | | woocommerce | active | available | 2.5.5 | | woocommerce-all-currencies | active | available | 1.0.2 | | woocommerce-checkout-field-editor | active | none | 3.7 | | woocommerce-multilingual | active | available | 3.8.2 | | woocommerce-nlb | active | none | 0.1.0 | | woocommerce-payment-gateway | active | none | 1.7.6 | | wpml-media | active | none | 2.1.20 | | sitepress-multilingual-cms | active | none | 3.3.7 | | wpml-string-translation | active | none | 2.3.7 | | wpml-translation-management | active | none | 2.1.6 | | wpml-widgets | active | none | 1.0.4 | | wptouch | active | available | 4.1.8 | | wordpress-seo | active | available | 3.4 | | zm-ajax-login-register | active | none | 2.0.2 | +-------------------------------------+----------+-----------+---------+ ``` -------------------------------- ### Check WordPress Version Source: https://closte.com/support/wordpress/using-wp-cli-command-line-tool This command retrieves and displays the current version of your WordPress installation. It's useful for confirming compatibility or understanding the environment. ```bash wp core version 4.5.2 ``` -------------------------------- ### Check WP-CLI Version Source: https://closte.com/support/wordpress/using-wp-cli-command-line-tool This command checks and displays the installed version of WP-CLI. It's a fundamental command to verify WP-CLI is accessible and functioning. ```bash wp --version WP-CLI 0.24.1 ``` -------------------------------- ### Execute WP-CLI Commands for Site URL Issues Source: https://closte.com/support/wordpress/troubleshooting This snippet demonstrates how to use WP-CLI commands to retrieve the site URL while bypassing plugins and themes. This is useful for diagnosing issues where the site URL might be incorrectly set or causing conflicts, especially when encountering 500 HTTP errors. ```shell wp option get siteurl wp option get siteurl --skip-plugins wp option get siteurl --skip-themes wp option get siteurl --skip-plugins --skip-themes ``` -------------------------------- ### Purge CDN Cache with Patterns Source: https://closte.com/support/wordpress/google-cloud-cdn These examples show how to purge specific files, patterns, or the entire cache from the Google Cloud CDN using wildcard or specific path notations. This is useful when updates are not reflecting due to caching. ```bash /wp-content/themes/theme/style.css ``` ```bash /wp-content/* ``` ```bash /* ``` -------------------------------- ### Composer Basic Usage Command Source: https://closte.com/support/wordpress/composer This snippet shows the basic command to invoke Composer and its version. It also lists available commands and options. This is the primary command for interacting with Composer. ```bash user@closte $: composer Composer version 1.2.1 2016-09-12 11:27:19 Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --profile Display timing and memory usage information --no-plugins Whether to disable plugins. -d, --working-dir=WORKING-DIR If specified, use the given directory as working directory. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: about Short information about Composer archive Create an archive of this composer package browse Opens the package's repository URL or homepage in your browser. clear-cache Clears composer's internal package cache. clearcache Clears composer's internal package cache. config Set config options create-project Create new project from a package into given directory. depends Shows which packages cause the given package to be installed diagnose Diagnoses the system to identify common errors. dump-autoload Dumps the autoloader dumpautoload Dumps the autoloader exec Execute a vendored binary/script global Allows running commands in the global composer dir ($COMPOSER_HOME). help Displays help for a command home Opens the package's repository URL or homepage in your browser. info Show information about packages init Creates a basic composer.json file in current directory. install Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json. licenses Show information about licenses of dependencies list Lists commands outdated Shows a list of installed packages that have updates available, including their latest version. prohibits Shows which packages prevent the given package from being installed remove Removes a package from the require or require-dev require Adds required packages to your composer.json and installs them run-script Run the scripts defined in composer.json. search Search for packages self-update Updates composer.phar to the latest version. selfupdate Updates composer.phar to the latest version. show Show information about packages status Show a list of locally modified packages suggests Show package suggestions update Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file. validate Validates a composer.json and composer.lock why Shows which packages cause the given package to be installed why-not Shows which packages prevent the given package from being installed ``` -------------------------------- ### Run Composer with Custom PHP Configuration Source: https://closte.com/support/wordpress/composer This command executes Composer while specifying a custom `php.ini` file using the `-c` flag. This allows Composer to utilize PHP settings defined in the provided `~/composer.ini`. ```bash php -c ~/composer.ini composer [args] ``` -------------------------------- ### Copy Default PHP Configuration Source: https://closte.com/support/wordpress/composer This command clones the current `php.ini` file to the user's home directory, creating a copy that can be modified. This is the first step in customizing the PHP environment for Composer. ```bash cp /opt/alt/php70/etc/php.ini ~/composer.ini ``` -------------------------------- ### Check Current PHP Configuration Source: https://closte.com/support/wordpress/composer This command helps identify the location of the active `php.ini` file and other related configuration files. This is a prerequisite for understanding the default PHP environment. ```bash [user@closte ~]$ php --ini Configuration File (php.ini) Path: /opt/alt/php70/etc Loaded Configuration File: /opt/alt/php70/etc/php.ini Scan for additional .ini files in: /opt/alt/php70/link/conf Additional .ini files parsed: /opt/alt/php70/link/conf/alt_php.ini ``` -------------------------------- ### Connect to SSH Server (Linux) Source: https://closte.com/support/wordpress/access-site-via-ssh This command connects to a remote SSH server using the provided username, server IP address, and port. You will be prompted for a password upon connection. Ensure you have the correct credentials. ```bash $ ssh username@server_ip_address:port ``` ```bash $ ssh -p 55000 user@127.0.0.1 ```