How to install WordPress on CentOS 7

banner dedicated


In this tutorials, we will explain how to install WordPress on your Linux Dedicated Server


Requirements


Create the database for WordPress

mysql -u root -p

create database wordpress;
CREATE USER wp_user@localhost IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON wordpress.* TO wp_user@localhost IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;
exit

Change “PASSWORD” by a password of your choice


Download and unpack WordPress

cd /root
wget http://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz


Copy the content to the Document root Directory

cd wordpress
rsync-avP * /var/www/html/


Create the Upload directory for WordPress

mkdir /var/www/html/wp-content/uploads


Create the config file for WordPress

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


Edit the file and set the MySQL database name, user and password

nano wp-config.php

 // ** 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', 'wp_user');

   /** MySQL database password */
   define('DB_PASSWORD', 'PASSWORD');


Give the permissions to Apache to the folder installation

chown apache. /var/www/html/ -R


Complete your WordPress Installation online : http://your_ip/


banner dedicated


Colo-Serv Communications has written 32 articles

Premium Dedicated Hosting Services