Installing Wordpress on CentOS 64bit




    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


    The tutorial will assume that:

    1. You have a CentOS 7 64bit vps server from If you dont have, you can purchase one from the OneHost Cloud Website here
    2. You have logged-in to your vps server thru an ssh terminal.
    3. You have already configured Apache, PHP and 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:


    then exit mysql:



    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:


    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

    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.


    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:

    Where 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

    Was this article helpful?
    0 out of 0 found this helpful


    Powered by Zendesk