Skip to main content

WORDPRESS ON CENTOS


Wordpress is a free and open-source content management system used for creating websites also to some extend managing them.It is mainly based on php amd mysql.

1.First Create a LAMP setup.For that you can follow instructions in the following link

2. We can download Wordpress straight from their website
# wget http://wordpress.org/latest.tar.gz
Now extract it
#tar -xzvf latest.tar.gz

3.Create the WordPress Database and User

mysql -u root -p
CREATE DATABASE wordpress;
CREATE USER 'user'@'localhost' IDENTIFIED BY 'REDhat@1234';
GRANT ALL PRIVILEGES ON wordpress.* TO user@localhost IDENTIFIED BY 'REDhat@1234';
FLUSH PRIVILEGES;
Exit

4.Copy the contents to /va r/www/html
#cp -r ~/wordpress/* /var/www/html
5.Setup the WordPress Configuration
#cp ~/wordpress/wp-config-sample.php ~/wordpress/wp-config.php


Open the wp-config.php file.Here we enter credentials for wordpress

#vi ~/wordpress/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', 'wordpressuser');

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






6.Now restart httpd service
#service httpd restart