HOW TO DOWNLOAD AND INSTALL WORDPRESS THROUGH COMMAND LINE UPDATE
If you need to update WordPress or you need to check for updates you can use the following commands to do so: $ wp core check-updateĪnother interesting command is verify-checksums, this will verify WordPress files against ’s checksums to see if there are any changed files.
You can use wp-cli to check the current version of WordPress with this command: $ wp core version
Next use the following commands to create the wp-config file and the database for your new WordPress installation, you will need to change the dbname, dbuser and dbpassword to the database and user that is available on your system: $ wp core config -dbname=test -dbuser=root -dbpass=passwordįinally, you will have to use the core install command to finish the installation setting the url, title, admin_user, admin_password and admin_email parameters to values that you wish to use: $ wp core install -url="-title="Testing WP-CLI" -admin_user="admin" WP-cli recommend running commands as a user, if wish you can run as root with -allow-root option. First we will assume you have a working Apache/MySQL/PHP installation on your system and your web root directory is “ /var/www/html”, the installation just takes 4 commands.įirst use the following command to download the latest WordPress files in the current directory: $ wp core download $ sudo wp cli update Installing WordPress using WP-CLIĪfter WP-CLI is installed on your system installing and configuring WordPress installations is made very easy. You can update WP-CLI by repeating the above installation steps or using following command. You can add the below line in php.ini (/etc/php5/cli/php.ini) file. If the test fails, make sure phar is whitelisted in suhosin executor.