Free Shipping

Secure Payment

easy returns

24/7 support

  • Home
  • Blog
  • WordPress Installation on Linux Server

WordPress Installation on Linux Server

 July 20  | 0 Comments

In this blog we will discuss about WordPress installation on Linux (Centos instance). Before that we need to understand what WordPress is ?

WordPress is a free and open-source content management system (CMS) which uses PHP and MySQL. WordPress is a freely available web tool that you can use to create beautiful websites.

It was released on May 27, 2003, by Matt Mullenweg and Mike Little. You can refer to the link given below for complete details of WordPress.


Following are the recommended softwares required to run WordPress:

  • PHP version 5.6 or greater
  • MySQL version 5.6 or greater

WordPress community recommends Apache or Nginx as the most robust and featured server for running WordPress, but any server that supports PHP and MySQL can also be used.

Here, in this tutorial we will install Linux, Apache, MySQL, PHP (LAMP) stack On CentOS 6 with the above prerequisites.

Let us now understand each of them one by one.

So, what is LAMP?

LAMP stack stands for Linux, Apache, MySQL, and PHP. a group of open source softwares used to run dynamic web sites and servers. This setup requires a user who has root privileges, so we need to create a sudo user first.

Creating a “sudo” User

Step1 : Login to root and add a new user

passwd acadgild

Step 2 : Provide root privileges to this user


Refer to the image given below to configure acadgild by providing root privileges. Add the highlighted line below root line.


Step 3 : Save it and restart the ssh services.


LAMP Installation

Login to sudo user which we have added recently with root privileges (that’s a must)

 Step 1 : Install Apache webserver-


yum httpd install

Step 2 : Once intallation gets over you can start Apache and its services.


Note: To check if Apache is installed, open your browser with your domain name or server’s IP address (e.g. The page should display a static page like below:


Installing MySQL database

MySQL is an open-source relational database management system (RDBMS) for organizing data on a server.

Follows these commands to install MySQL:




Once it is done, you should set a root MySQL password. Follow this command to set it:


Note: A prompt will ask you for your current root password as you have just installed MySQL, so leave it blank by pressing enter.



Configure MySQL according to your need. If you don’t want to go through all that, then  allow all the prompts ( press ‘y’ for every prompt).


Installing PHP

PHP is server-side scripting language, designed for web development. PHP is a powerful tool for making dynamic and interactive Web pages. It is also used as a general-purpose programming language.

Follow the below mentioned commands to install php:


Install php-mysql plugin into Linux server




Note: Press ‘y’ if prompt comes up.

Now LAMP stack is configured on your instance.

Next, We need to set the ‘httpd’ and ‘mysqld’ processes to run automatically every time the Linux server restarts. We don’t need to do for php because it will run automatically once Apache starts.


Once you have the prerequisite software, you can start installing WordPress!

Installing WordPress

Step 1: First, download WordPress from below link:



Step 2: Unzip the compressed file into desired location.




Step 3: Creating MySQL User and database for WordPress-

Login to MySQL Shell:




A prompt will ask for MySQL root password, which we have created earlier.

Now, We need a database and an user in that database.



Output: Query OK, 1 row affected (0.00 sec)





Set password to this user:




Now, provide all privileges to this new user.



Query OK, 0 rows affected (0.00 sec)