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.
mysql_secure_installation

#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
wget http://wordpress.org/latest.tar.gz
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';
FLUSH PRIVILEGES;

# 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.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to install AVG Antivirus scanner on Ubuntu?

AVG free is antivirus which protects from spyware as well malware. It is free to use for private...

How to change the port number of Apache Web Server?

Default port to access the Apache is 80. Secure port for communicating with world for Apache is...

How to install Postfix on CentOS?

Postfix is an open-source Mail Transport Agent (MTA), which supports protocols like LDAP, SMTP...

How to install SOAP on CentOS?

Install SOAP on CentOS 1) Fire below command - yum install php-soap Output will be as follow...

How to update kernel on centos server?

Please follow below steps to update the kernel on centos server - 1. SSH of centos server and...

Powered by WHMCompleteSolution