wordpress agency, wordpress agency for development, enterprise wordpress, wordpress website, wordpress developer, make a website, wordpress sites, wordpress blog, wordpress for dummies, wordpress website development, wordpress website design, wordpress design, wordpress web design, wordpress help, wordpress designer, premium wordpress themes, create a wordpress website, wordpress plugin development, wordpress theme development, build a wordpress website, wordpress website templates, wordpress web, woocommerce plugin, wordpress free website, wp themes, setting up a website, wordpress web development, wordpress homepage, wordpress cms, best wordpress sites, custom wordpress theme, wordpress for beginners, best wordpress websites, using wordpress, wordpress designs, create website using wordpress, wordpress web developer, wordpress website hosting, wordpress website examples, create new website, start a website, wordpress premium, wordpress web hosting, create wordpress, wordpress customization, wordpress plugin developer, create wordpress theme, custom wordpress development, wordpress guide, wordpress programming, wordpress design services, create wordpress blog, wordpress website tutorial, using wordpress to build a website, how to build a wordpress website, wordpress website developer, using wordpress to create a website, custom wordpress design, wordpress website designers, building a website from scratch, online site hosted by wordpress, wordpress website development company, hosted wordpress, i want to create a website, best wordpress, build website using wordpress, woocommerce wordpress, website using wordpress, make a wordpress website, setting up a wordpress site, start a wordpress blog, wordpress web design company, wordpress website development services, buy wordpress themes, custom wordpress, create wordpress site, wordpress web design services, wordpress themes for business, wordpress page, world press website, custom wordpress website, steps to create a website, websites created with wordpress, best way to create a website, wordpress web design for dummies, wordpress website design company, learn wordpress step by step, build wordpress site, building a website for dummies, using wordpress for a website, create a website from scratch, wordpress website themes, website design using wordpress, wordpress business website, best way to build a website, design wordpress theme, wordpress site design, wordpress professional, wordpress blog page, wordpress site development, how to create a website with wordpress, top wordpress sites, make a website from scratch, make a webpage, build your own wordpress website, setting up a wordpress blog, get wordpress, wordpress layouts, building a website, wordpress website design tutorial, wordpress free site, website creation, e commerce website, website design, create wordpress account, wordpress web development services, design a website, wordpress cms tutorial, setting up your own website, create your own website wordpress, website developer, website developers, best premium wordpress themes, wordpress free blog, top wordpress websites, create a blog website, build wordpress theme, webdesign, website design companies, best way to make a website, web agency, web developers, custom wordpress plugin development, web page design, wordpress malware, web design companies, ecommerce website design, designer websites, professional website design, wordpress best themes, wordpress create website free, professional website, custom wordpress website design, wordpress blog examples, wp plugin development, examples of wordpress sites, web development companies, web design agency, wordpress webpage, custom website design, mobile website design, best way to learn wordpress, web development agency, popular wordpress blogs, setting up a wordpress website, ecommerce web design, create your own wordpress theme, custom web design, ecommerce website development, wordpress web design theme, build your own wordpress site, website companies, website design agency, website development company, wordpress for business, web application development, best wordpress designers, custom website, web design tools, professional web design, web creation, design companies, web design studio, web development websites, new wordpress, ecommerce design, how to use wordpress to create a website, website design and development, wordpress website management, wordpress start, make a wordpress site, wordpress membership plugin, new wordpress website, web design and development, make wordpress, custom wordpress site, the best wordpress themes, ecommerce web development, wordpress application development, great wordpress sites, wordpress theme designer, new website design, wordpress step by step, web design portfolio, develop website using wordpress, create professional website, best web design, online wordpress, new wordpress site, wordpress tutorials for beginners, best web design company, create wordpress template, start wordpress website, themes wordpress, world press website design, build your website with wordpress, best wordpress blogs, learn to build a website, wordpress tutorial 2022, woocommerce shop, web design prices, premium wp themes, ecommerce website development company

WordPress Agency for Development | Vipe Studio » Freestyle » WordPress and SSH: Introduction to WP-CLI

WordPress and SSH: Introduction to WP-CLI

Reading Time: 3 minutes

Like we mentioned in Part 1 of this “SSH and WordPress” series, WP-CLI is something that lets you skip the login and navigation and execute text commands for WordPress via a terminal environment. Use WP-CLI, and anything from backups to updates for plugins and queries can all happen in no time.

What you need for WP-CLI

Some web hosts have WP-CLI by default, in which case, skip right ahead to the next section after ‘WP-CLI Installation’. For setting WP-CLI up yourself, you’ll need to meet a few requirements. Besides the SSH access we set up in part 1, you’ll need PHP (at least 5.3.2), WordPress 3.4 or newer, and a terminal environment of the sort we’ve already set up.

WP-CLI Installation

Start by logging in to your server over SSH. You can then use the cURL command or wget command to download WP-CLI. The up-to-date setup (as a .phar file) can be found on the GitHub page for WP-CLI. So you can type:

cURL –O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

WP-CLI will now be installed to the root directory.

For the next part, we need to set permissions so we can execute WP-CLI, for which we enter:

chmod +x wp-cli.phar

In addition, you may also move the downloaded .phar file to a folder and name it just ‘wp’. This way, prefixing ‘wp’ will make any WP-CLI command work. Type:

  If Rory Gilmore Had a WordPress Blog

sudo mv wp-cli.phar /usr/local/bin/wp

Now we’re good to go.

Basic WP-CLI Commands

We can now execute the commands. The most basic command ‘wp help’ is something you can use to access the full WP-CLI help database to learn what each command does, and even what role the subcommands play.

In order to execute the help command, you need to move to the directory that you installed WP-CLI to. To do this you may use ‘ls’ and reveal the current directory status. WP-CLI also allows you to install themes using the following:

wp theme install name_of_theme

Then we can activate the theme by:

wp theme activate name_of_theme

The themes are directly imported from the Theme Repository.

Commands can be used to install plugins as well from the official repository with the following command:

wp plugin install name_of_plugin

And activation will be:

wp plugin activate name_of_plugin

To disable the plugins, on the other hand, it’s as simple as typing

wp plugin deactivate name_of_plugin

You can type

wp plugin list

to show all the available plugins. To update all your eligible plugins you can execute

wp plugin update

If you want to get some more fine-grained control, type

wp plugin update –-all --dry-run

to give you the list of plugins that would be updated by the first command.

  WP All Import released wp-cli integration

In fact, even WordPress itself can be installed if you type and execute

wp core install

Of course, you need to complete the command with other attributes like URL, username, password and email.

To learn more about the WP-CLI commands, you can refer to the official WP-CLI manual at their website.

You are now ready to deploy all the advanced and power-user tools and control your WordPress website and environment better. Some hosting solutions will even let you use Git, npm and other tools. As you use SSH and learn more about WP-CLI, you’ll learn more and more things you can achieve with SSH and the command line, and in no time, you’ll be a natural at doing things the smarter way!

With the power of SSH in your hands, your WordPress experience is faster, and you can say goodbye to the days of clicking through page after page to perform basic WordPress functions. As promised in part 1, you are now indeed a WordPress ninja with SSH!

Looking for WordPress Website Development for your Business?

Our professional developers have proven experience in building high-quality business websites that outperform the competition, thanks to our meticulous attention to detail and the implementation of cutting-edge technologies. We will conduct an in-depth business analysis to ensure the website we create for you meets your highest expectations. Your site will have all of the necessary elements to assist you in increasing your ROI and sales.

Contact Us

The content of this website is copyrighted and protected by Creative Commons 4.0.

Tags:

Vipe Team

Author Vipe Team

Our tireless team who creates high-quality WordPress-related content for you 24/7/365.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

We have already created hundreds of profiting websites!

We have already created hundreds of profiting websites!

Subscribe to our newsletter and get our best WordPress tips!

[mc4wp_form id="8747"]