Install And Setup up WordPress in Ubuntu 18.04

1. Install Apache2

Open the terminal and execute the following command to install Apache2

 sudo apt-get install apache2 

2. Install MySQL

To install MySQL, execute the following command

 sudo apt-get install mysql-server 

3. Install PHP

To install PHP, execute the following command

 sudo apt-get install php libapache2-mod-php php-mysql 

4. Download and install WordPress

To download the latest version of WordPress, execute the following command

wget -c http://wordpress.org/latest.tar.gz 

Extract the WordPress archive

tar -xzvf latest.tar.gz

Move the content of the WordPress directory to the document root directory of the Apache server

sudo mv wordpress/* /var/www/html/ 

Create a new database for WordPress

mysql -u root -p 

5. Configure WordPress

Create a new configuration file for WordPress

sudo cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php

Open the WordPress configuration file

sudo nano /var/www/html/wp-config.php

Input the database details

define(‘DB_NAME’, ‘your_database_name’);

define(‘DB_USER’, ‘database_user’);

define(‘DB_PASSWORD’, ‘database_password’);

Save and close the file

Ctrl + X -> Y ->

Enter Restart Apache

sudo systemctl restart apache2

Open your web browser and navigate to http://your_ip_address/wp-admin/install.php Follow the instructions on the screen to finish the installation process.

Leave a Reply