$ wget -c http://wordpress.org/latest.tar.gz
$ tar -xzvf latest.tar.gz
$ sudo mv wordpress/* /var/www/html/
$ sudo chown -R www-data:www-data /var/www/html/
$ sudo chmod -R 755 /var/www/html/
$ sudo mysql -u root -p
mysql> CREATE DATABASE wp_myblog;
mysql> CREATE USER 'username'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
mysql> GRANT ALL ON wp_myblog.* TO 'username'@'%';
mysql> FLUSH PRIVILEGES;
mysql> EXIT;
Go the /var/www/html/ directory and rename existing wp-config-sample.php to wp-config.php. Also, make sure to remove the default Apache index page.
$ cd /var/www/html/
$ sudo mv wp-config-sample.php wp-config.php
$ sudo rm -rf index.html
$ sudo nano wp-config.php
After that you need to enter your db name , user name , password

After full fill db name, db user, db password then keyboard type Ctrl + x, Shift + Y then hit enter.
Afterward, restart the web server and mysql service using the commands below:
$ sudo systemctl restart apache2.service
$ sudo systemctl restart mysql.service
Then open a browser and hit your server name or ip address.
nice post
ReplyDelete