Sunday, November 23, 2014

how to install wordpress 4 on centos 7

Leave a Comment
The first, install lamp install, then install wordpress on centos 7. Step-by-step install wordpress on centos 7 as below:

Step 1: Create a MySQL database and user for wordpress

# mysql -u root -p
Create new database
CREATE DATABASE wordpress;
Create new account and password
CREATE USER wordpressuser@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit

Step 2: Install wordpress

The first, install php-gd package,then start to apache server
# yum install php-gd
# service httpd restart
Download wordpress latest
# wget http://wordpress.org/latest.tar.gz
Extract the archive
# tar xzvf latest.tar.gz
# rsync -avP ~/wordpress/ /var/www/html/ 
Create a folder for WordPress to store uploaded files
# mkdir -p /var/www/html/wp-content/uploads
Assign the correct ownership and permissions to our WordPress files and folders
# chown -R apache:apache /var/www/html/*

Step 3: Configure Wordpress

# cd /var/www/html
# cp wp-config-sample.php wp-config.php
vi wp-config.php
// ** MySQL settings - You can get this info from your web host ** //
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'wordpressuser');
/** MySQL database password */
define('DB_PASSWORD', 'password');
/** The name of the database for WordPress */

Step 4: The finish install wordpress 4 on centos 7

install wordpress

You have a install wordpress  on centos 7. I hope will this help you!
Copyright by: www.linuxoperatingsystem.info http://goo.gl/kMscJ4

0 comments:

Post a Comment