In this tutorial we will cover the steps needed to install WordPress on your CentOS 6.4, Debian or Ubuntu platform.

Requirements

  • CentOS 6.4, Debian or Ubuntu installed on your computer/server
  • SSH access (Command line access to the server)
  • root privileges
  • Basic skills for working on a Linux environment
  • LAMP/LEMP installed on the server

WordPress is one of the most popular free open-source content management systems (CMS) available at the moment. You can create flexible blog websites with it although there is large amount of third party plugins allowing you to extend the functionality of the CMS. This way you can create fully functional online shop, gallery website etc.

Configure a WordPress database

The WordPress requires a MySQL database where the website information will be stored. During the installation the database name, database username and password should be specified so we will go ahead and create new empty database through SSH:

You will be prompted to fill in the MySQL root password. After that the command prompt will be switched to a MySQL one.

New MySQL database can be created with the following command:

After that create new MySQL username and assign it to the database:

You can set desired password in the first MySQL query.

When ready flush the MySQL privileges in order for the changes to take effect:

When ready you can exit the MySQL prompt:

Install WordPress and test its functionality

You can download the latest WordPress installation package through the official website. Download and extract the content of the package inside the default web root folder (usually this is /var/www/):

A folder called wordpress should be extracted from the archive.

Access the folder and copy the sample WordPress configuration file included inside:

Make sure that the correct ownership is set for the website content:

where www-data is the default user configured for the web server.

During the installation the WordPress will look for that file. We can go ahead and fill in the database credentials inside:

where pass1234 is the password assigned to the MySQL user which you have created on your end.

When the correct MySQL credentials are filled in we can continue the installation by accessing the WordPress installation wizard through the browser:

where X.X.X.X is your server's IP address, i.e. http://1.2.3.4/wordpress

An easy way to find your server's IP address is to execute the following command:

You will be asked to specify a title for your website and to set WordPress administrative username and password.

You will need to confirm the installation and will be redirected to the WordPress login page:

The WordPress administrative area is available at: