How to setup a WordPress website on plain Centos server?

The following steps have been successfully tested on a plain centos server.

Now lets start with the first step of installing a web server.
yum install httpd or http*

# Start the service to see if it coming up properly.
service httpd start

# Now lets install the database server as its important to setup the wordpress database.
yum install mysql-server or mysql*

# Start the service to see if it coming up properly.
service mysqld start

# PHP installation on the server along with its modules.
yum install php*

# run the following command to complete mysql installation and improve security.

#Press enter if there is no pass (most likely won’t have one, so leave it blank and set root pass on next step), Press y for rest of the option

# Time to setup the wordpress on the server. Lets install wordpress ** note : default doc root is /var/www/html so its better to download the setup files under that.
cd /var/www/html
tar -xzf latest.tar.gz

# All done, now database & user creation. Mysql is installed, lets login into mysql with the root password.
mysql -u root -p

CREATE DATABASE wordpress_db;
CREATE USER 'wp_usr@localhost' IDENTIFIED BY 'blabla';
GRANT ALL PRIVILEGES ON wp_usr.* TO 'wp_usr@localhost';

# Site setup
cd /var/www/html
cp wp-config-sample.php wp-config.php

nano wp-config.php and edit below lines as per your database

/** The name of the database for WordPress */
define('DB_NAME', 'wordpress_db');
/** MySQL database username */
define('DB_USER', 'wp_usr');
/** MySQL database password */
define('DB_PASSWORD', 'blabla');

service httpd restart

Run the WordPress install URL and complete the installation. Running into any problems contact us.

Was this answer helpful?

 Print this Article

Also Read

How to perform LAMP installation on CentOS?

LAMP stands for Linux, Apache, MySQL, and PHP. It is nothing but Linux operating system with...

Basic exim commands

1. REMOVE MAILS BY ID - /usr/sbin/exim -v -Mrm (MAIL ID HERE) 2. LIST QUEUED MAILS -...

Daily Useful Linux Commands

Finding the username from provided hosting service name - /script/whoowns domain_name Finding...

Disk Usage Useful Command

Note - You can replace /home with correct '/' drive on your server. 1. Checking the disk usage -...

How to backup and restore large MySQL databases using mysqldump?

1. Backup database:#mysqldump -u username -p[username_password] databasename >...