softmaji-header-wbg-min
softmaji-header-wbg-min
softmaji-blue-header-min
softmaji-blue-header-min
  • Home
  • Services
    • Website Designing
      • Responsive Website Design
      • Static Website Design
      • Website Redesign
      • Landing Page Design
    • Website Development
      • PHP Website Development
      • WordPress Website Development
      • Ecommerce Website Development
      • Custom Website Development
    • Digital Marketing
      • Google Adwords/PPC
      • Facebook Promotion
    • SEO Service
  • Trainings
    • Learn Web Development
    • Learn Graphics Design
    • Learn Business Communication Skills
  • Pricing
  • Portfolio
  • Events
  • Offers
  • Contact Us

Common Commands Used To Update WordPress Using WP-CLI

HomeCommon Commands Used To Update WordPress Using WP-CLI

Offer Expire Soon..


Only New User..


WP-CLI is a set of commands that can be used very easily. It allows you to run everything in wp-admin on a WordPress site but by using the command line. In order to run WP-CLI on Managed WordPress, you need to first obtain the SSH creds from the manager, with help of terminal or a command-line program like Putty. Then log in and change the home to HTML (where WordPress is installed). To work with WP-CLI you need to be present in this folder.

cd html

Table of Contents

Toggle
  • To update WordPress using WP-CLI
  • WordPress version using WP-CLI
  • Updating theme using WP-CLI
  • Plugins updation using WP-CLI
  • Installing Classic Editor using WP-CLI

To update WordPress using WP-CLI

In order to update WordPress to the latest version, you need to run the following command.

Note:  You will have to replace the X value with the current version number or WordPress.

wp core update --version=5.0.x --force

For example, in order to update WordPress to the most current version which is 5.0.3, run the following command :

wp core update --version=5.0.3 --force

If you wish to update with the 5.1 version, then your command will be :

wp core update --version=5.1 --force

If any error occurs while running the wp core update command (like WordPress update is already in progress in the terminal), then a lock option value might be set. SO, you can delete that option value by using the following command :

wp option delete core_updater.lock

WordPress version using WP-CLI

Run following command, to verify the version of WordPress that is installed :

wp core version

Updating theme using WP-CLI

After updating WordPress, the next step is to update the default themes as well. By using the following command you can update those themes:

wp theme update twentysixteen twentyseventeen twentynineteen

In the above command, the themes updated would be Twenty Sixteen, Twenty Seventeen, and Twenty Nineteen.

Plugins updation using WP-CLI

If you have Akismet or Jetpack plugins installed, then you can update those two plugins by running either of the following commands :

wp plugin update akismet
wp plugin update jetpack

Alternatively, you can update both plugins using one following command :

wp plugin update akismet jetpack

Installing Classic Editor using WP-CLI

If your site was on an older version of WordPress (like 4.9.9) and you wish to update it to 5.0.3, but at the same time if you want to keep using the classic editor and not the new default Gutenberg block editor, then you can install and activate either the Classic Editor or Disable Gutenberg plugins.

Run the following command, to install and activate the Classic Editor plugin :

wp plugin install classic-editor --activate

Run following command, to install and activate the Disable Gutenberg plugin :

wp plugin install disable-gutenberg --activate

With the use of all these commands in WP-CLI it will become easy for you to update WordPress, themes, plugins, and also helps you to install plugins from the command line without having to update from wp-admin.

Also Read :

 Learn to stage a WordPress website using Softaculous in cPanel

 How To Fix RSS Feed Errors In WordPress?

 How to Create a Landing Page in WordPress?

Faizan Khan
17
Latest News
Prev PostLearn About WordPress Database Management with phpMyAdminMay 11, 2024
Next PostLearn to Manually Move WordPress from Local Server to Live SiteMay 14, 2024

Related items

Latest News

How To Install WordPress Blog?

Let’s see how to install WordPress blog on your WordPress hosting account. Let’s

Faizan Khan
14/05/2024
147
Latest News

How to Install a Theme in WordPress?

Steps to install a theme in WordPress: Log in to WordPress. Navigate to Appearance and cli

Faizan Khan
14/05/2024
132
Latest News

Fatal error: Allowed memory size of xxxx bytes exhausted (tried to allocate xx bytes)

WordPress is a free open source blogging tool. When posting a article OR uploading a image

Faizan Khan
14/05/2024
145
softmaji-header-wbg-min
SoftMaji is one of the affordable web development company in the web development industry. You don’t have to go searching anywhere for finding a reliable web development partner because we have crafted web development solutions that can fill the void left by others in the market.
Services
  • News Portal Development
  • Custom Website Development
  • PHP Website Development
  • Ecommerce Website Development
  • WordPress Website Development
Shortlinks
  • Blog
  • Offers
  • Events
  • Pricing
  • Reviews
  • Portfolio
  • Our Team
  • Payment Options
  • Explore Packages
Company
  • FAQ
  • Careers
  • Sitemap
  • Feedback
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms & Conditions
  • Refund And Cancellation
Contact Us
4/40 Vipul Khand , Gomti Nagar Lucknow
Uttar Pradesh 226010
Landline - +915223162418
Email - hello@softmaji.in
Office Time Mon - Sat
(10:00AM - 5:00PM)
Sunday Close
+91 9795405324
Lucknow , Uttar Pradesh
Copyright © 2022. All Rights Reserved.