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 run the backup process which is stuck using rsync?

While running the backup process, I was getting the error message as - /usr/bin/rsync -rlptD...

Basic exim commands

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

How to install Imagic?

1. # yum install ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make 2.  # cd...

How to install phpMyAdmin with Apache on a CentOS 7 server?

phpMyAdmin used to provide graphical user interface for your databases. Accessing or performing...

How to get files and folders from a remote server using FTP?

Let's make a quick start by looking at the various commands to get files and folders from a...

Powered by WHMCompleteSolution