ITEXPERT Wordpress

Update WordPress on Linux console

Update WordPress by Linux Console Command

$ wp core update
Updating to version 4.5.2 (en_US)…
Downloading update from https://downloads.wordpress.org/release/wordpress-4.5.2-no-content.zip…
Unpacking the update…


Cleaning up files…
No files found that need cleaning up
Success: WordPress updated successfully.

If doesn’t work, you can download from wordpress.com as a file and move to folder “/var/www/WordPress” and run a command “wp core update ./wordpress-5.5.1.zip” and also have the account www-data be logged in (login as www-data (/etc/passwd -> /usr/sbin/nologin -> /bin/bash temporarily)

# Update WordPress to latest version of 3.8 release
$ wp core update –version=3.8 ../latest.zip
Updating to version 3.8 ()…
Unpacking the update…
Cleaning up files…
File removed: wp-admin/js/tags-box.js

File removed: wp-admin/js/updates.min.
377 files cleaned up
Success: WordPress updated successfully.

# Update WordPress to 3.1 forcefully
$ wp core update –version=3.1 –force
Updating to version 3.1 (en_US)…
Downloading update from https://wordpress.org/wordpress-3.1.zip…
Unpacking the update…
Warning: Checksums not available for WordPress 3.1/en_US. Please cleanup files manually.
Success: WordPress updated successfully.

wp core update-db
Runs the WordPress database update procedure.

wp core update-db [–network] [–dry-run] [–network]

Update databases for all sites on a network [–dry-run] Compare database versions without performing the update.
EXAMPLES

# Update the WordPress database
$ wp core update-db
Success: WordPress database upgraded successfully from db version 36686 to 35700.

# Update databases for all sites on a network
$ wp core update-db –network
WordPress database upgraded successfully from db version 35700 to 29630 on example.com/
Success: WordPress database upgraded on 123/123 sites

wp core version
Displays the WordPress version.

wp core version [–extra] OPTIONS [–extra] Show extended version information.
EXAMPLES

# Display the WordPress version
$ wp core version
4.5.2

# Display WordPress version along with other information
$ wp core version –extra
WordPress version: 4.5.2
Database revision: 36686
TinyMCE version: 4.310 (4310-20160418)
Package language: en_US
<p style=”text-align: center;”>[출처] wp-cli <a href=”https://github.com/wp-cli/core-command”>go</a></p>