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 -pCREATE 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.phpnano 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.