How To Install Wordpress on Centos 6

How To Install Wordpress on Centos 6
Riddhi Jindal
Riddhi Jindal

Created: 05/20/2020 2:14 PM - Updated: 05/20/2020 2:14 PM

How To Install Wordpress on Centos 6

Pre-requisites

Root privileges on the VPS

LEMP installed on the VPS

Step One—Download WordPress

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

Step Two—Create the WordPress Database and User

mysql -u root -p
 
CREATE DATABASE wordpress;
Query OK, 1 row affected (0.00 sec)
 
CREATE USER [email protected];
Query OK, 0 rows affected (0.00 sec)
 
SET PASSWORD FOR [email protected]= PASSWORD("password");
Query OK, 0 rows affected (0.00 sec)
 
GRANT ALL PRIVILEGES ON wordpress.* TO [email protected] IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)
 
FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
 
exit

Step Three—Setup the WordPress Configuration

cp ~/wordpress/wp-config-sample.php ~/wordpress/wp-config.php
 
vi ~/wordpress/wp-config.php

Find the section that have below fields and change in the correct name for your database, username, and password:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');
 
/** MySQL database username */
define('DB_USER', 'wordpressuser');
 
/** MySQL database password */
define('DB_PASSWORD', 'password');

Save and Exit.

Step Four—Copy the Files

sudo cp -r ~/wordpress/* /var/www/html
 
sudo yum install php-gd
 
sudo service httpd restart

Step Five—Access the WordPress Installation

Wordpress online installation page is up.

Now, access the page by adding /wp-admin/install.php to site's domain or IP address (eg. example.com/wp-admin/install.php) and fill out the short online form.

Was this article helpful?

0 Out of 0 Marked As Helpfull

Have more questions? Please Contact Us