Sharing Ilmu

Sharing for useful things

How To Install & Configure CMS WordPress Ubuntu Server 20.04 LTS

In this tutorial I’ll discuss about how to install and configuration CMS WordPress on ubuntu server 20.04.  For step by step installation the cms make sure you have installed webserver and database server on your system.  For how to install web server you can see at article How To Install webserver (Apache,PHP) ubuntu server 20.04 and database server see at article How To Install and Configure Database Mysql/Mariadb Server ubuntu server 20.04 LTS .  To setup custom directory you can see at article How To Configuration Apache2 (Custom html directory) ubuntu server 20.04.

Fist download CMS WordPress at link https://wordpress.org/download/

You need FileZilla Client for upload cms to your server, Download at link https://filezilla-project.org/ and install the software on your system.

Make sure all requirement service has been installed.

Configure custom directory for cms named as website.

root@Taufik:~# cd /etc/apache2/sites-available/
root@Taufik:/etc/apache2/sites-available#
root@Taufik:/etc/apache2/sites-available# cp 000-default.conf website.conf
root@Taufik:/etc/apache2/sites-available# nano website.conf

Change the DocumentRoot path.

<VirtualHost *:80>

                 ServerAdmin webmaster@localhost
                 DocumentRoot /var/www/html/website

              ErrorLog ${APACHE_LOG_DIR}/error.log
              CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

 

Enable website.conf and disable 000-default.conf files :

root@Taufik:/etc/apache2/sites-available# a2ensite website.conf
root@Taufik:/etc/apache2/sites-available# a2dissite 000-default.conf

 

Restart apache2 service :

root@Taufik:/etc/apache2/sites-available# systemctl restart apache2

 

Configure Database :

Login to mariadb, create new user and new database then grant access new user to new database :

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 46
Server version: 10.3.34-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE WEB_DB;
Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> CREATE USER 'taufiknh'@'localhost' IDENTIFIED BY 'UserDBPassword';
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON WEB_DB .* TO 'taufiknh'@'localhost';
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]>exit

Upload cms wordpress from your computer to your server using FileZilla.

Make sure you have installed openssh service. For how to install it you can see at article How To install and configure SSH ubuntu server 20.04 LTS

 

Install Unzip Packages :

root@Taufik:~# apt-get install unzip

 

Upload cms wordpress to your server using filezilla, open filezilla and login to your server.  Host is YourServerIP, Username and password is Userlogin and password linux server, Port is default port number SSH service. After that click Quickconnect.

Click OK.

 

Make sure access to server succesfull. To upload file cms, click and drag cms to home directory as the following image. make sure upload succes.

 

After that back to server, change to home directory where file cms uploaded.  use ls command to view the content of the file on home dir.

root@Taufik:~# cd /home/myserver/
root@Taufik:/home/myserver# ls
wordpress-6.0.zip
root@Taufik:/home/myserver#

 

extract the wordpress file.

root@Taufik:/home/myserver# unzip wordpress-6.0.zip

 

use ls command to view content of the file.  you can see file extract as  named wordpress.

root@Taufik:/home/myserver# ls
wordpress   wordpress-6.0.zip
root@Taufik:/home/myserver#

 

Rename wordpress directory become website.

root@Taufik:/home/myserver# mv wordpress website
root@Taufik:/home/myserver# ls
website   wordpress-6.0.zip
root@Taufik:/home/myserver#

 

After rename, move website directory to /var/www/html.

root@Taufik:/home/myserver# mv website /var/www/html/
root@Taufik:/home/myserver#

 

Change to /var/www/html directory, view content of the file on html dir.

root@Taufik:/home/myserver# cd /var/www/html/
root@Taufik:/var/www/html# ls
index.html info.php website
root@Taufik:/var/www/html#

 

Grant access rights to website directory :

root@Taufik:~# chown -R www-data:www-data /var/www/html/website/

 

From the computer, access your webserver through web browser.  Click continue.

Click Let’s go!  for continue.

This is database information config, fill in the Database, Username, and password according to the configuration that you have created on the Mariadb configuration. if done, click Submit.

This is Information of your website and administrator login to your website. fill in as you needed.

Login to your website.

Use the username and password that have you created.

This is wordpress dashboard view.

This is website view.

z

Leave a Reply

Your email address will not be published. Required fields are marked *.

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>