install wordpress via command line

 

install WordPress via command line
step 1: Navigate to the directory where you want to install or create new directory and navigate there
Sudo mkdir /home/user/www/burnbelly.in
chmod to 755
chmod -R 755 /home/pubclubindia/epf/burnbelly.in
cd /home/pubclubindia/epf/burnbelly.in
step 2: Download WordPress & Unzip
unzip tar
tar xfz latest.tar.gz
By default WordPress extracts in WordPress folder. then you have to move top level folder
step 3:  and delete the existing WordPress folder.
mv wordpress/* ./
step 4: Delete folder and zip archive
rmdir ./wordpress/
rm -f latest.tar.gz
Creation  database from command line
mysql -u username -p  u=seranme p=passowrd
mysql -u root -p enter this command and enter sql password.
Step 2 create database dbname;
 
create database burnbelly;
 
For mysql root no need to assign privileges.
 
grant usage on *.* to [email protected] identified by ‘password’;
grant all privileges on dbname.* to [email protected];
use burnbelly;
 
you get message like database changed
 
 
 
 
Edit wp-config.php
 
added db details.
 
 
sudo nano ./wp-config-sample.php
 
 
by deaflut wp-config.php not present in new install
we have added changes to wp-config-sample.php
Delete a MySQL Database on Linux via Command Line
DROP DATABASE burnbelly;
i have not added vhost file in apache