tutorials questions & answers
by Mark

Installing and Configuring Wordpress on an CentOS 7 64bit Server

TAGS:
  • wordpress
  • centos
  • mysql
  • apache

Wordpress installation on CentOS

Overview

This article will guide you on installing wordpress in a CentOS 7 64bit server.

You will need the wordpress files that you can freely download at https://wordpress.org/download/.


Prerequisites

The tutorial will assume that:

  1. You have a CentOS 7 64bit vps server from vpsserver.com. If you dont have, you can purchase one from https://www.vpsserver.com/plans/
  2. You have logged-in to your vps server thru an ssh terminal.
  3. You have already configured Apache, PHP and Mysql. If not, please go to this page to learn how to install and configure LAMP server on CentOS7 64bit.

Create a database using Mysql

Login to your mysql server using the command:

mysql -u root -p

Then create a database by following the commands. For this tutorial we will create a database named "orders_newdatabasename" with a user "orders_dbuser" and password of "mynewpassword".

You will have to write down this information since we will use it later on.

CREATE DATABASE wordpress_sample;

CREATE USER wp_user@localhost IDENTIFIED BY 'wp_password';

GRANT ALL PRIVILEGES ON wordpress_sample.* TO wp_user@localhost;

Flush all privileges to re-read the users files:

FLUSH PRIVILEGES;

then exit mysql:

exit


Installing Wordpress

Let us install php-gd first, this module is used to resize images so we can create a thumbnail. Let us try to fetch the package from CentOS repository:

sudo yum install php-gd

After that we will need to restart our httpd server so it can recognize the newly installed module:

sudo service httpd restart

Go to your /html folder before we download the latest wordpress files. The /html folder is the public facing folder of your webserver.

cd /var/www/html/

and download the latest wordpress files:

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

Now, we have to untar or unpack our wordpress files:

tar xzvf latest.tar.gz

Unzip the wordpress files in the /var/www/html directory:

unzip -q latest.zip

And then we set the appropriate permissions for the html directory and files to increase wordpress security and to avoid problems with permissions later on as we configure our wordpress.

sudo chown -R apache:apache /var/www/html/*

Now that wordpress is installed the next step we will do is to configure wordpress so we can use it.


Configuring Wordpress

To configure wordpress on CentOS 7, we have to open our browser and enter the ip of your server together with /wordpress. An example is: http://52.41.13.20/wordpress/.

Where 52.41.13.20 is the ip address of your webserver where you installed httpd, mysql and php.

On the first page you will see the language configuration, you can select your preferred language from the options but if your language is not available you can also select any language you can understand. You can always change it later on in the wordpress settings.

enter image description here

On the next page enter the database information as per the requirement on the left, you will need the database name, your database username & password, the database hostname which is usually localhost and the database prefix which you can set or leave as it is.

enter image description here

If the database information you entered is correct, wordpress will inform you that it can now communicate with the database. If not, you will have to enter the database information again while making sure all information is correct.

enter image description here

Once your database details are confirmed to be correct wordpress will ask you some information such as your site title, your administrator username and password.

enter image description here

If all is fine and no errors occur you can now login to the Wordpress administration area to add your theme, plugins and more users.

enter image description here

comments (0)

    leave comment

    Please choose login or register to comment in this thread.

    Start now for as low as $4,99 a month!

    • 8 Characters
    • 1 Uppercase Atleast
    • 1 Number Atleast