WP-CLI is a set of command-line tools for managing WordPress installations without using a web browser. You can perform WordPress tasks such as updating plugins and configuring multisite installs.
You can also use WP-CLI to perform certain tasks in Beaver Builder. This article describes the commands available for the Beaver Builder plugin and theme. To see a description of the Beaver Themer commands, see this article.
After you've installed WP-CLI, use SSH to access your hosting server. Navigate to the WordPress installation directory that you want to work in and enter the following command to get a list of all options:
The on-screen information tells you what commands are available and the syntax of each command, with options and examples.
This command clears the Beaver Builder plugin cache or both the Beaver Builder plugin and Beaver Builder Theme caches:
Clears the Beaver Builder cache for all sites on a network.
Clears both the Beaver Builder plugin and Beaver Builder Theme caches.
Clear the Beaver Builder Plugin cache on your site.
wp beaver clearcache
Reset the Beaver Theme cache on your site.
wp beaver theme clearcache
If the Beaver Builder Theme is active, clear both caches.
wp beaver clearcache --all
Clear the Beaver Builder plugin cache on all subsites of a multisite installation.
wp beaver clearcache --network
Clear the Beaver Builder plugin cache and reset the Beaver Builder Theme cache on all subsites of a multisite installation. Beaver Theme must be active on the root site.
wp beaver clearcache --network --all
The following command activates or deactivates the Beaver Builder license key and registration of the domain in your account at wpbeaverbuilder.com.
Deactivates this domain at wpbeaverbuilder.com and removes the license.
License key value to use
Activate the license (substitute your license key number) and register the domain whose directory you are in:
wp beaver register --license=01234567890
Activate the license when the license is defined in wp-config.php using
wp beaver register
Deactivate the license for the domain whose directory you are in:
wp beaver register --deactivate
Returns the list of Beaver Builder global settings.
Normally you manage global settings at Tools > Global Settings in the Beaver Builder editor, but you can also change individual global settings with a WP-CLI command by using the setting's ID and assigning a new value. Here's the basic command:
The ID for the global option.
The value for the global option.
Hide the page title for the WordPress theme you're using by changing the value of the CSS selector option in Tools > Global settings in the Beaver Builder editor.
This command assigns the value
.fl-post-header to the CSS selector field in Tools > Global Settings.
.fl-post-header is the selector for the Beaver Builder Theme and is the default CSS selector value. Follow this article to find the selector for your theme.