-
·
How to create a custom plugin:
If you want to create your plugins, WP-CLI has a powerful scaffold command that allows us to generate starter code. In this guide we will see how to generate starter code for a basic plugin. Step 1 – Scaffold the plugin files The following command uses several options to lets us specify the plugin slug,…
-
·
How to install WordPress
Downloading and installing WordPress using WP-CLI is straight forward. It takes four steps. First, you will need to download WordPress using the wp core download command. Step 1 – Download WordPress The syntax of the command to download WordPress is the following: wp core download [–path=<path>] [–locale=<locale>] [–version=<version>] [–skip-content] [–force] $ wp core download –path=wpdemo.test…
-
·
How to put the site in maintenance mode
WP-CLI offers a command to enable, disable maintenance mode and check if maintenance mode is enabled or not. Step 1 – Check the status $ wp maintenance-mode status Maintenance mode is not active. Step 2 – Enable maintenance mode $ wp maintenance-mode activate Enabling Maintenance mode… Success: Activated Maintenance mode. Step 3 – Disable maintenance…
-
·
How to start the webserver
You can use the command wp server to launches PHP’s built-in web server for a specific WordPress installation. By default, the webserver will start using the localhost and default port 8080 but, you can change them using the –host and –port options. Step 1 – Start the web server using the default settings $ wp…
-
·
Internal API
WP-CLI includes a number of utilities which are considered stable and meant to be used by commands. This also means functions and methods not listed here are considered part of the private API. They may change or disappear at any time. Internal API documentation is generated from the WP-CLI codebase on every release. To suggest…
-
·
WP-CLI Hack Day
Welcome to WP-CLI Hack Day! We appreciate you taking time to contribute to the project. We’d love to help you submit at least one pull request today. Given this goal, you’ll likely want to start with something small and attainable. After you’ve submitted your first pull request for the day, you’re welcome to work on…
-
·
Installing
Requirements WP-CLI requires PHP 7.2.24 or later. To check the version of PHP available on your system, run: php –version WP-CLI has no additional requirements beyond those of WordPress itself. Recommended installation The recommended way to install WP-CLI is by downloading the Phar build (archives similar to Java JAR files, see this article for more…
-
·
How to WP-CLI
Introduction Using WP-CLI, you can perform specific tasks using the command line instead of accessing the WordPress admin panel. In the following section, we will cover step by step some of these tasks. How-to install WordPress How to put the website in maintenance mode How-to start the webserver How to create a custom plugin Figure…
-
·
Hosting Companies
The following is a list of hosting companies that have WP-CLI installed by default for their customers, i.e. when they first SSH into their server, the wp command is already available. In alphabetical order: 2020Media 20i 34SP.com A2 Hosting Alldomains.Hosting Altis Cloud Platform AltusHost Amimoto BigCloudy Bluehost Cyberfusion Hypernode CloudHostWorld Cloudways Convesio Curanet D9 Hosting…
-
·
Doctor Guides
Here are some helpful guides for using wp doctor: Default doctor diagnostic checks Customize doctor diagnostic checks Write a custom check to perform an arbitrary assertion Write a check for verifying contents of WordPress files Write a check for asserting the value of a given option Write a check for asserting the value of a…