{"id":9920,"date":"2020-07-15T09:40:56","date_gmt":"2020-07-15T09:40:56","guid":{"rendered":"https:\/\/www.milesweb.in\/hosting-faqs\/?p=9920"},"modified":"2020-07-15T09:40:56","modified_gmt":"2020-07-15T09:40:56","slug":"commands-used-to-update-wordpress-using-wp-cli","status":"publish","type":"post","link":"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/","title":{"rendered":"Common Commands Used To Update WordPress Using WP-CLI"},"content":{"rendered":"<p>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.<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">cd html<\/pre>\n<h2>To update WordPress using WP-CLI<\/h2>\n<p>In order to update WordPress to the latest version, you need to run the following command.<\/p>\n<p>Note:\u00a0 You will have to replace the X value with the current version number or WordPress.<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp core update --version=5.0.x --force<\/pre>\n<p>For example, in order to update WordPress to the most current version which is 5.0.3, run the following command :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp core update --version=5.0.3 --force<\/pre>\n<p>If you wish to update with the 5.1 version, then your command will be :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp core update --version=5.1 --force<\/pre>\n<p>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 :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp option delete core_updater.lock<\/pre>\n<h2>WordPress version using WP-CLI<\/h2>\n<p>Run following command, to verify the version of WordPress that is installed :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp core version<\/pre>\n<h2>Updating theme using WP-CLI<\/h2>\n<p>After updating WordPress, the next step is to update the default themes as well. By using the following command you can update those themes:<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp theme update twentysixteen twentyseventeen twentynineteen<\/pre>\n<p>In the above command, the themes updated would be Twenty Sixteen, Twenty Seventeen, and Twenty Nineteen.<\/p>\n<h2>Plugins updation using WP-CLI<\/h2>\n<p>If you have Akismet or Jetpack plugins installed, then you can update those two plugins by running either of the following commands :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp plugin update akismet<\/pre>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp plugin update jetpack<\/pre>\n<p>Alternatively, you can update both plugins using one following command :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp plugin update akismet jetpack<\/pre>\n<h2>Installing Classic Editor using WP-CLI<\/h2>\n<p>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.<\/p>\n<p>Run the following command, to install and activate the Classic Editor plugin :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp plugin install classic-editor --activate<\/pre>\n<p>Run following command, to install and activate the Disable Gutenberg plugin :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">wp plugin install disable-gutenberg --activate<\/pre>\n<p>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.<\/p>\n<p><strong>Also Read :<\/strong><\/p>\n<p><strong>\u00a0<a href=\"https:\/\/www.milesweb.in\/hosting-faqs\/learn-to-stage-a-wordpress-website-using-softaculous-in-cpanel\/\" target=\"_blank\" rel=\"noopener\">Learn to stage a WordPress website using Softaculous in cPanel<\/a><\/strong><\/p>\n<p><strong>\u00a0<a href=\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-fix-rss-feed-errors-in-wordpress\/\" target=\"_blank\" rel=\"noopener\">How To Fix RSS Feed Errors In WordPress?<\/a><\/strong><\/p>\n<p><strong>\u00a0<a href=\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-create-a-landing-page-in-wordpress\/\" target=\"_blank\" rel=\"noopener\">How to Create a Landing Page in WordPress?<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[1174,1525,78,1201,1296],"class_list":["post-9920","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-wordpress-faq","tag-command-line","tag-managed-wordpress","tag-wordpress-2","tag-wordpress-update","tag-wp-cli"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Common Commands Used To Update WordPress Using WP-CLI - Web Hosting FAQs by MilesWeb<\/title>\n<meta name=\"description\" content=\"Learn some important commands that are used to update WordPress using Wp-CLI.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Common Commands Used To Update WordPress Using WP-CLI - Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"og:description\" content=\"Learn some important commands that are used to update WordPress using Wp-CLI.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-15T09:40:56+00:00\" \/>\n<meta name=\"author\" content=\"Sonam Wagh\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sonam Wagh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/\"},\"author\":{\"name\":\"Sonam Wagh\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4\"},\"headline\":\"Common Commands Used To Update WordPress Using WP-CLI\",\"datePublished\":\"2020-07-15T09:40:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/\"},\"wordCount\":444,\"commentCount\":0,\"keywords\":[\"command line\",\"managed WordPress\",\"WordPress\",\"WordPress update\",\"WP-CLI\"],\"articleSection\":[\"WordPress FAQ\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/\",\"name\":\"Common Commands Used To Update WordPress Using WP-CLI - Web Hosting FAQs by MilesWeb\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\"},\"datePublished\":\"2020-07-15T09:40:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4\"},\"description\":\"Learn some important commands that are used to update WordPress using Wp-CLI.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Common Commands Used To Update WordPress Using WP-CLI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4\",\"name\":\"Sonam Wagh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/12\/Sonam-Wagh-150x150.jpg\",\"contentUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/12\/Sonam-Wagh-150x150.jpg\",\"caption\":\"Sonam Wagh\"},\"description\":\"With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/author\/sonam\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Common Commands Used To Update WordPress Using WP-CLI - Web Hosting FAQs by MilesWeb","description":"Learn some important commands that are used to update WordPress using Wp-CLI.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/","og_locale":"en_US","og_type":"article","og_title":"Common Commands Used To Update WordPress Using WP-CLI - Web Hosting FAQs by MilesWeb","og_description":"Learn some important commands that are used to update WordPress using Wp-CLI.","og_url":"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2020-07-15T09:40:56+00:00","author":"Sonam Wagh","twitter_misc":{"Written by":"Sonam Wagh","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/#article","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/"},"author":{"name":"Sonam Wagh","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4"},"headline":"Common Commands Used To Update WordPress Using WP-CLI","datePublished":"2020-07-15T09:40:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/"},"wordCount":444,"commentCount":0,"keywords":["command line","managed WordPress","WordPress","WordPress update","WP-CLI"],"articleSection":["WordPress FAQ"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/","name":"Common Commands Used To Update WordPress Using WP-CLI - Web Hosting FAQs by MilesWeb","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website"},"datePublished":"2020-07-15T09:40:56+00:00","author":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4"},"description":"Learn some important commands that are used to update WordPress using Wp-CLI.","breadcrumb":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/commands-used-to-update-wordpress-using-wp-cli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.in\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"Common Commands Used To Update WordPress Using WP-CLI"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.in\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4","name":"Sonam Wagh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/12\/Sonam-Wagh-150x150.jpg","contentUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/12\/Sonam-Wagh-150x150.jpg","caption":"Sonam Wagh"},"description":"With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.","url":"https:\/\/www.milesweb.in\/hosting-faqs\/author\/sonam\/"}]}},"_links":{"self":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/9920","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=9920"}],"version-history":[{"count":1,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/9920\/revisions"}],"predecessor-version":[{"id":9921,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/9920\/revisions\/9921"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=9920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=9920"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=9920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}