How to Install WordPress on Ubuntu 16.04
WordPress is an online easiest,powerful, open source tool, a Content Management System ( CMS ) to build Websites and Blogs.
Prerequisites:-
- Install Ubuntu 16.04 server.
- Install LAMP – Linux, Apache, MySQL, PHP
Step 1 :-
Now create a Database for WordPress. Login as root user
mysql> mysql -u root -p
Enter the password. Now create a database
mysql> CREATE DATABASE DATABASE_NAME ;
Create a user
mysql> CREATE USER user@'localhost' identified by 'password';
Grant all privileges to this user for the database you created.
mysql> GRANT ALL PRIVILEGES on DATABASE_NAME.* to user@'localhost';
mysql> FLUSH PRIVILEGES;
Step 2 :-
Install Lamp –> Click Here
Also update and install php extensions
$ sudo apt-get update $ sudo apt-get install php-curl php-gd php-mbstring php-mcrypt php-xml php-xmlrpc
Restart Apache server
$ sudo systemctl restart apache2
Step 3 :-
Download WordPress
$ curl -O https://wordpress.org/latest.tar.gz
unzip the downloaded file
$ tar xzvf latest.tar.gz
Move wordpress folder to document root folder
$ sudo cp -R wordpress /var/www/html/ $ sudo chown -R www-data:www-data /var/www/html
Step 5:-
Now copy the wp-config-sample.php file to wp-config.php file
$ sudo cp -R wp-config-sample.php wp-config.php
Edit wp-config.php and update database name, user, password.
$ sudo vi /var/www/html/wp-config.php $ sudo cp -R wordpress /var/www/html/
define('DB_NAME', 'database name'); /** MySQL database username */ define('DB_USER', 'user'); /** MySQL database password */ define('DB_PASSWORD', 'password'); define('FS_METHOD', 'direct');
Step 6:-
Now, browse your IP address of the server
http://server_domain_or_IP