Speed Up Your WordPress Development With Wp-cli

[vc_row][vc_column][vc_column_text]

  • WordPress Command Line Interface (WP-CLI) tool will enable you to tackle administrative tasks more efficiently.
  • You can create a child theme manually with a single command, you’d not need to go through several steps.

[/vc_column_text][vc_column_text]

Overview of WP-CLI

[/vc_column_text][vc_single_image image=”2931″ img_size=”full”][vc_column_text]

  • This tool makes it easy for WordPress users to interact with the platform.
  • It enables developers to speed up day-to-day tasks by using simple commands
  • The tool supports every action you need to manage a WordPress site, including:
    • Installing the platform
    • Executing WordPress core updates
    • Managing WordPress themes and plugins
    • Creating child themes
    • Importing media files in bulk

[/vc_column_text][vc_column_text]

Setting Up WP-CLI

  • Make sure your hosting environment meets these basic setup requirements.
  • A UNIX-like environment.
  • PHP 5.3.29 (or later).
  • WordPress 3.7 (or later).
  • Secure Shell (SSH) access to your hosting environment.
  • Install the tool by downloading its .phar file using the curl command, as seen below:

[/vc_column_text][vc_single_image image=”2932″ img_size=”full”][vc_column_text]

  • run the following command to make sure the tool is setup properly:

[/vc_column_text][vc_single_image image=”2933″ img_size=”full”][vc_column_text]

  • Now a message similar to this one will display, indicating which version of WP-CLI you’re running:

[/vc_column_text][vc_single_image image=”2934″ img_size=”full”][vc_column_text]

  • At this stage, we recommend you to create an executable file for WP-CLI and move the tool to its own folder (preferably called wp). Here’s the code you’ll need to run to pull it off:

[/vc_column_text][vc_single_image image=”2935″ img_size=”full”][vc_column_text]

  • this will let you use WP-CLI from your own command line with the wp command.

[/vc_column_text][vc_column_text]

3 Ways to Speed Up WordPress Development Using WP-CLI

[/vc_column_text][vc_column_text]

1. Install and Update WordPress

  • locate the directory where you want to set it up and run the following command:

[/vc_column_text][vc_single_image image=”2937″ img_size=”full”][vc_column_text]

  • Next, create a wp-config.php file in the same directory using this code:

[/vc_column_text][vc_single_image image=”2938″ img_size=”full”][vc_column_text]

  • Finally, you’ll need to execute the core install command to finish the process.

[/vc_column_text][vc_single_image image=”2939″ img_size=”full”][vc_column_text]

  • Now update the platform for this use this command:

[/vc_column_text][vc_single_image image=”2941″ img_size=”full”][vc_column_text]

  • Once the platform is fully updated, you’ll want to do the same for your database:

[/vc_column_text][vc_single_image image=”2942″ img_size=”full”][vc_column_text]

2. Manage Your WordPress Themes and Plugins

  • WP-CLI automatically connects to the official WordPress theme and plugin directories
  • You can install both types of add-ons without having to download any files by hand.
  • Here’s the list of the most common commands you’ll need to know to interact with themes and plugins:

Managing Themes

  • Install: wp theme install theme’s_name
  • Activate: wp theme activate theme’s_name
  • Update: wp theme update theme’s_name
  • Update all themes: wp theme update -all

Managing Plugins

  • Install: wp plugin install plugin’s_name
  • Activate:
  • Update: wp plugin update plugin’s_name
  • Update all plugins: wp plugin update -all

3. Create Child Themes

  • Creating a child theme manually is a lengthy process.
  • WP-CLI makes it simpler by using a single command,Here’s how:

[/vc_column_text][vc_single_image image=”2943″ img_size=”full”][vc_column_text]

  • configure the parameters to your specifications.

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_column_text][vc_row][vc_column width="1/3"][mpc_icon_column preset="mpc_preset_65" border_css="border-radius:20px;" padding_css="padding:0px;" title_font_preset="mpc_preset_20" title_font_color="#444444" title_font_size="17" title_font_line_height="1.4" title_font_transform="uppercase" title_font_align="center" title="Small jobs, large jobs, anything in between" content_font_preset="mpc_preset_1" content_font_color="#888888" content_font_size="14" content_font_line_height="1.5" content_font_align="center" mpc_icon__icon="etl etl-trophy" mpc_icon__icon_color="#7bdae5" mpc_icon__icon_size="48" mpc_icon__border_css="border-radius:0px;" mpc_icon__padding_divider="true" mpc_icon__padding_css="padding-top:8px;padding-right:8px;padding-bottom:8px;padding-left:8px;" mpc_icon__margin_divider="true" mpc_icon__margin_css="margin-top:0px;margin-right:0px;margin-bottom:8px;margin-left:0px;" mpc_icon__hover_icon_color="#ffffff" mpc_icon__hover_background_color="#7bdae5" mpc_icon__hover_border_css="border-radius:50px;" mpc_divider__disable="true" mpc_divider__width="10" mpc_divider__align="left" mpc_divider__content_padding_divider="true" mpc_divider__content_padding_css="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;" mpc_divider__lines_color="#dddddd" mpc_divider__padding_divider="true" mpc_divider__padding_css="padding-top:3px;padding-bottom:3px;"][/mpc_icon_column][/vc_column][vc_column width="1/3"][mpc_icon_column preset="mpc_preset_65" border_css="border-radius:20px;" padding_css="padding:0px;" title_font_preset="mpc_preset_20" title_font_color="#444444" title_font_size="17" title_font_line_height="1.4" title_font_transform="uppercase" title_font_align="center" title="Jobs that are on fixed price, or hourly terms" content_font_preset="mpc_preset_1" content_font_color="#888888" content_font_size="14" content_font_line_height="1.5" content_font_align="center" mpc_icon__icon="etl etl-clock" mpc_icon__icon_color="#7bdae5" mpc_icon__icon_size="48" mpc_icon__border_css="border-radius:0px;" mpc_icon__padding_divider="true" mpc_icon__padding_css="padding-top:8px;padding-right:8px;padding-bottom:8px;padding-left:8px;" mpc_icon__margin_divider="true" mpc_icon__margin_css="margin-top:0px;margin-right:0px;margin-bottom:8px;margin-left:0px;" mpc_icon__hover_icon_color="#ffffff" mpc_icon__hover_background_color="#7bdae5" mpc_icon__hover_border_css="border-radius:50px;" mpc_divider__disable="true" mpc_divider__width="10" mpc_divider__align="left" mpc_divider__content_padding_divider="true" mpc_divider__content_padding_css="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;" mpc_divider__lines_color="#dddddd" mpc_divider__padding_divider="true" mpc_divider__padding_css="padding-top:3px;padding-bottom:3px;"][/mpc_icon_column][/vc_column][vc_column width="1/3"][mpc_icon_column preset="mpc_preset_65" border_css="border-radius:20px;" padding_css="padding:0px;" title_font_preset="mpc_preset_20" title_font_color="#444444" title_font_size="17" title_font_line_height="1.4" title_font_transform="uppercase" title_font_align="center" title="Work that requires specific skill sets, costs, or scheduling requirements." content_font_preset="mpc_preset_1" content_font_color="#888888" content_font_size="14" content_font_line_height="1.5" content_font_align="center" mpc_icon__icon="etl etl-newspaper" mpc_icon__icon_color="#7bdae5" mpc_icon__icon_size="48" mpc_icon__border_css="border-radius:0px;" mpc_icon__padding_divider="true" mpc_icon__padding_css="padding-top:8px;padding-right:8px;padding-bottom:8px;padding-left:8px;" mpc_icon__margin_divider="true" mpc_icon__margin_css="margin-top:0px;margin-right:0px;margin-bottom:8px;margin-left:0px;" mpc_icon__hover_icon_color="#ffffff" mpc_icon__hover_background_color="#7bdae5" mpc_icon__hover_border_css="border-radius:50px;" mpc_divider__disable="true" mpc_divider__width="10" mpc_divider__align="left" mpc_divider__content_padding_divider="true" mpc_divider__content_padding_css="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;" mpc_divider__lines_color="#dddddd" mpc_divider__padding_divider="true" mpc_divider__padding_css="padding-top:3px;padding-bottom:3px;"][/mpc_icon_column][/vc_column][/vc_row][vc_row][vc_column][vc_empty_space][/vc_column][/vc_row][vc_row][vc_column width="1/2"][mpc_textblock content_width="80" font_color="#21c5ba" font_size="80" font_line_height="1" font_transform="none" font_align="right"]

DISCOVER

[/mpc_textblock][mpc_textblock content_width="80" font_color="#333333" font_size="15" font_line_height="1.3" font_transform="none" font_align="right" margin_divider="true" margin_css="margin-top:10px;margin-bottom:10px;"]A SMARTER APPROACH TO BUSINESS GROWTH[/mpc_textblock][mpc_divider width="30" align="right" lines_color="#21c5ba" lines_weight="4" margin_divider="true" margin_css="margin-top:20px;" animation_loop_type="callout.pulse" animation_loop_duration="1000" animation_loop_delay="1000"][vc_empty_space][vc_row_inner][vc_column_inner width="1/2"][/vc_column_inner][vc_column_inner width="1/2"][mpc_counter preset="mpc_preset_1" layout="style_6" alignment="right" icon_vertical="middle" title_font_preset="mpc_preset_44" title_font_color="#888888" title_font_size="20" title_font_line_height="1" title_font_transform="uppercase" title="Permanent" counter_font_preset="mpc_preset_5" counter_font_color="#555555" counter_font_size="44" counter_font_line_height="1.5" value="8" duration="4000" delay="0" padding_css="padding:0px;" margin_css="margin:0px;" mpc_icon__icon="etl etl-profile-male" mpc_icon__icon_color="#21c5ba" mpc_icon__icon_size="60" mpc_icon__padding_divider="true" mpc_icon__padding_css="padding-right:20px;"][vc_empty_space][mpc_counter preset="mpc_preset_1" layout="style_6" alignment="right" icon_vertical="middle" title_font_preset="mpc_preset_44" title_font_color="#888888" title_font_size="20" title_font_line_height="1" title_font_transform="uppercase" title="Retainer" counter_font_preset="mpc_preset_5" counter_font_color="#555555" counter_font_size="44" counter_font_line_height="1.5" value="19" duration="4000" delay="0" padding_css="padding:0px;" margin_css="margin:0px;" mpc_icon__icon="etl etl-briefcase" mpc_icon__icon_color="#21c5ba" mpc_icon__icon_size="60" mpc_icon__padding_divider="true" mpc_icon__padding_css="padding-right:20px;"][vc_empty_space][mpc_counter preset="mpc_preset_1" layout="style_6" alignment="right" icon_vertical="middle" title_font_preset="mpc_preset_44" title_font_color="#888888" title_font_size="20" title_font_line_height="1" title_font_transform="uppercase" title="Projects" counter_font_preset="mpc_preset_5" counter_font_color="#555555" counter_font_size="44" counter_font_line_height="1.5" value="231" duration="4000" delay="0" padding_css="padding:0px;" margin_css="margin:0px;" mpc_icon__icon="etl etl-layers" mpc_icon__icon_color="#21c5ba" mpc_icon__icon_size="60" mpc_icon__padding_divider="true" mpc_icon__padding_css="padding-right:20px;"][vc_empty_space][mpc_counter preset="mpc_preset_1" layout="style_6" alignment="right" icon_vertical="middle" title_font_preset="mpc_preset_44" title_font_color="#888888" title_font_size="20" title_font_line_height="1" title_font_transform="uppercase" title="Consultations" counter_font_preset="mpc_preset_5" counter_font_color="#555555" counter_font_size="44" counter_font_line_height="1.5" value="1192" duration="4000" delay="0" padding_css="padding:0px;" margin_css="margin:0px;" mpc_icon__icon="etl etl-chat" mpc_icon__icon_color="#21c5ba" mpc_icon__icon_size="60" mpc_icon__padding_divider="true" mpc_icon__padding_css="padding-right:20px;"][/vc_column_inner][/vc_row_inner][/vc_column][vc_column width="1/2"][mpc_textblock content_width="100" margin_divider="true" mpc_tooltip__border_divider="true" mpc_tooltip__padding_divider="true"]
[/mpc_textblock][vc_empty_space][/vc_column][/vc_row][/vc_column_text][/vc_column][/vc_row]