WordPress is a free and open-source content management system (CMS) written in PHP and paired with a MySQL or MariaDB database. Features include a plugin architecture and a template system, referred to within WordPress as Themes. WordPress was originally created as a blog-publishing system but has evolved to support other types of web content including more traditional mailing lists and forums, media galleries, membership sites, learning management systems (LMS) and online stores. WordPress is used by more than 60 million websites, including 33.6% of the top 10 million websites as of April 2019, WordPress is one of the most popular content management system solutions in use. WordPress has also been used for other application domains such as pervasive display systems (PDS).

Step:1 Create a Mysql Database & User for Wordpress  

# sudo apt-get update && sudo apt-get upgrade -y 

# sudo mysql -u root -p

#mysql>  CREATE DATABASE wordpress;

#mysql> CREATE USER 'Wordpressuser'@'localhost' IDENTIFIED BY 'password';

#mysql> GRANT ALL PRIVILEGES ON * . * TO 'wordpressuser'@'localhost';

#mysql> FLUSH PRIVILEGES;

#mysql> EXIT;

Step:2 Download Wordpress On your server 

# cd ~

# sudo wget http://wordpress.org/latest.tar.gz

# sudo tar -xzvf latest.tar.gz 

This will create a directory called wordpress in your home directory.

# sudo rsync -avP  wordpress/ /var/www/html/

# sudo apt-get install php7-gd libssh2-php -y

Step:3 Install Additional PHP Extensions

# sudo apt-get install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip -y

# sudo systemctl restart apache2 

Step:4 Configuring the WordPress Directory

# sudo chown -R www-data:www-data /var/www/wordpress

Step:5 Configure Wordpress

# cd /var/www/html/wordpress

# sudo cp wp-config-sample.php wp-config.php

# sudo vim wp-config.php

. . .

define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'wordpressuser');

/** MySQL database password */
define('DB_PASSWORD', 'password');

. . .

define('FS_METHOD', 'direct');

Esc :wq! save and exit file.

Step:6 Completing the Installation Through the Web Interface

In your web browser, navigate to your server’s domain name or public IP address:

https://server-domain _or_ip-address

Select the language you would like to use:



Next, you will come to the main setup page.


When you click ahead, you will be taken to a page that prompts you to log in:

Once you log in, you will be taken to the WordPress administration dashboard: