• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install WordPress CMS on Ubuntu 21.04

  • 00:37 lsb_release -a
  • 00:50 mysql -u root -p
  • 01:07 create database wordpress;
  • 01:21 grant all on wordpress.* to wordpress@localhost identified by 'linuxc';
  • 01:44 flush privileges;
  • 01:54 exit
  • 02:06 wget https://wordpress.org/latest.tar.gz
  • 02:23 tar xzvf latest.tar.gz
  • 02:39 mv wordpress/ /var/www/
  • 02:52 chown -R www-data. /var/www/wordpress
  • 03:10 chmod -R 775 /var/www/wordpress
  • 03:25 vi /etc/apache2/sites-available/wordpress.conf
  • 04:09 a2ensite wordpress.conf
  • 04:28 a2dissite 000-default.conf
  • 04:50 a2enmod rewrite
  • 05:02 systemctl restart apache2
  • 05:15 vi /etc/hosts
{{postValue.id}}

To Install Wordpress CMS on Ubuntu 21.04

Introduction

CMS means Content management system, it is the software user to manage the digital content. WordPress is a free and open-source content management system (CMS) written in PHP

Prerequisites:

• Apache Web server

• Maria DB

• PHP and its Modules

Installation Procedure

Step 1: Check the OS version by using the below command

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 21.04
Release:	21.04
Codename:	hirsute

Step 2: Log in to the Maria DB by using the below command

root@linuxhelp:~# mysql -u root -p 
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 30
Server version: 10.5.12-MariaDB-0ubuntu0.21.04.1 Ubuntu 21.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.

Step 3:Create database for Wordpress CMS by using the below command

MariaDB [(none)]> create database wordpress;
Query OK, 1 row affected (0.001 sec)

Step 4: Create a user and Grant all privileges on wordpress database for the user “wordpress” by using the below command

MariaDB [(none)]> grant all on wordpress.* to wordpress@localhost identified by 'linuxc';
Query OK, 0 rows affected (0.004 sec)

Step 5: Flush privileges to make changes effect by using the below command

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.001 sec)

Step 6: Exit from the Maria DB

MariaDB [(none)]> exit
Bye

Step 7: Download wordpress CMS by using the below command

root@linuxhelp:~# wget https://wordpress.org/latest.tar.gz
--2021-12-06 01:23:34--  https://wordpress.org/latest.tar.gz
Resolving wordpress.org (wordpress.org)... 198.143.164.252
Connecting to wordpress.org (wordpress.org)|198.143.164.252|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15085301 (14M) [application/octet-stream]
Saving to: ‘latest.tar.gz’

latest.tar.gz               100%[========================================>]  14.39M  2.38MB/s    in 17s     

2021-12-06 01:23:51 (882 KB/s) - ‘latest.tar.gz’ saved [15085301/15085301]

Step 8: Extract the downloaded file by using the below command

root@linuxhelp:~# tar xzvf latest.tar.gz
wordpress/
wordpress/xmlrpc.php
wordpress/wp-blog-header.php
wordpress/readme.html
wordpress/wp-signup.php
wordpress/index.php
wordpress/wp-content/
wordpress/wp-content/themes/
wordpress/wp-admin/js/code-editor.min.js
wordpress/wp-admin/js/set-post-thumbnail.js
wordpress/wp-admin/options-permalink.php
wordpress/wp-admin/widgets.php
wordpress/wp-admin/setup-config.php
wordpress/wp-admin/install.php
wordpress/wp-admin/admin-header.php
wordpress/wp-admin/post-new.php
wordpress/wp-admin/themes.php
wordpress/wp-admin/options-reading.php
wordpress/wp-trackback.php
wordpress/wp-comments-post.php

Step 9: Move the extracted directory to the apache home directory by using the below command

root@linuxhelp:~# mv wordpress/  /var/www/

Step 10: Change ownership for the wordpress directory by using the below command

root@linuxhelp:~# chown -R www-data. /var/www/wordpress

Step 11: Change Permission to the Wordpress directory by using the below command

root@linuxhelp:~# chmod -R 775 /var/www/wordpress

Step 12: Create Virtual Host for the wordpress CMS by using the below command

root@linuxhelp:~# vi /etc/apache2/sites-available/wordpress.conf

<virtualhost *:80>
servername www.linuxhelp1.com
documentroot /var/www/ wordpress

<Directory /var/www/ wordpress >

        AllowOverride All
        allow from all 
</Directory>
</virtualhost>

Step 13: Enable the Virtual Host by using the below command

root@linuxhelp:~# a2ensite wordpress.conf
Enabling site wordpress.
To activate the new configuration, you need to run:
  systemctl reload apache2

Step 14: Disable the default Virtual Host file of apache by using the below command

root@linuxhelp:~# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2

Step 15: Enable the read write module of apache by using the below command

root@linuxhelp:~# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2

Step 16: Restart the apache webserver by using the below command

root@linuxhelp:~# systemctl restart apache2

Step 17:Make host entry for wordpress CMS by using the below command

root@linuxhelp:~# vi /etc/hosts

192.168.6.115 www.linuxhelp1.com

Step 18: Ping server name in browser as show in the below image Snap 1

Step 19: Give Data Base Credentials as shown in the below image Snap 2

Step 20: Create Admin Credentials as shown in the below image Snap 3

Step 21: Login to the Admin section as shown in the below image Snap 4

Step 22: This is the Wordpress CMS Dashboard Snap 5

By this the process of installing Wordpress CMS on Ubuntu 21.04 has been completed

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How can we download WordPress CMS?

A

Word press CMS can be downloaded by "wget https://wordpress.org/latest.tar.gz" command.

Q

What are the dependencies for WordPress CMS?

A

The dependencies for WordPress CMS are
1) 7.4 or greater of PHP
2) MySQL version 5.6 OR MariaDB version 10.1 or greater
3) Apache or Nginx.

Q

Is WordPress is open-source?

A

Yes, WordPress is a free and open-source content management system.

Q

From what WordPress is written?

A

WordPress is written in PHP

Q

What is the latest version of WordPress CMS?

A

The latest version of WordPress CMS is 5.8.2

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Jayce ?
What are the types of table used in IPtables

What are the various types of table used in IPtables and how to use that for my server security?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.