Monday, August 29, 2016

Wordpress install by wp-cli (Command line only)

Prepare the database (mysql / mariadb)

  • mysql -u -p
  • create database wp_db1;
  • grant all on wp_db1.* to @'%' identified by ;

wp-cli

  • Download wp-cli at http://wp-cli.org/
  • wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
    
  • Move the file to /usr/local/bin (Or set $PATH to the location you want )
  • create the wordpress home (eg. /var/www/wordpress)
  • cd /var/www/wordpress
  • wp core download
  • wp core config --dbname=wp_db1 --dbuser= --dbpass= --dbprefix=wp
  • wp core install --url=""  --title="" --admin_user="<user>" --admin_password="<password>" --admin_email="<email>"</li> </ul> Now you can login WordPress with a browser for further configuration.<br><div> <p> <br></p> </div> <div> <p> <br></p> </div>