How to Install WordPress version 4 on CentOS 7 / RHEL 7 / SL 7 / OL 7 / Fedora 22 / 21 / 20. WordPress is the one of the best CMS platforms for the web designer and web developer. The WordPress has great interface make it ease of use to the web users to operate the websites or blog. It has the great features as well as the airtight security that makes the an award winning CMS. It the first choice for the web developers.
Pre installation Dependencies required for WordPress
Only for CentOS 7 / RHEL 7 / SL 7 / OL 7
Install EPEL Repository
firstname.lastname@example.org ~ # yum install epel-release -y
email@example.com ~ # yum localinstall --nogpgcheck http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel//epel-release-latest-7.noarch.rpm
Enable EPEL Repository
firstname.lastname@example.org ~ # yum clean all
email@example.com ~ # yum update
Installing WordPress 4
Step-1(Installing LAMP packages)
On Fedora 22
firstname.lastname@example.org ~ # dnf install httpd* mariadb* php*
On CentOS 7 / RHEL 7 / SL 7 / OL 7
email@example.com ~ # yum install httpd* mariadb* php*
Step-2(Starting the Services)
firstname.lastname@example.org ~ # systemctl start httpd email@example.com ~ # systemctl start mariadb
Step-3 (Auto Enable Services at boot)
firstname.lastname@example.org ~ # systemctl enable mariadb Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
email@example.com ~ # systemctl enable httpb Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
Step-4 (Configure MySQL)
firstname.lastname@example.org ~ # mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] Y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] Y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] Y ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] Y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB!
Step-5(Create a WordPress DB)
email@example.com ~ # mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 18 Server version: 10.0.19-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE techbrown; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON techbrown.* TO "YOURNAME"@"localhost" -> IDENTIFIED BY "YOUR PASSWORD"; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> EXIT Bye
Step-6 (Download and Install WordPress)
firstname.lastname@example.org ~ # wget http://wordpress.org/latest.tar.gz
email@example.com ~ # tar -xf latest.tar.gz
firstname.lastname@example.org ~ # cp -rv wordpress/* /var/www/html/
Step-7 (Providing Permissions to the WordPress)
email@example.com ~ # sudo chmod -R 755 /var/www/html/
firstname.lastname@example.org ~ # sudo chown -R apache:apache /var/www/html/
email@example.com ~ # systemctl restart httpd
Step-8 (Configure and setup WordPress sites)
Visit your localhost address on internet browser like Mozilla Firefox,etc. to run the setup
Provide the information as shown in the images
Step-9 (Start your WordPress Site)
WordPress is an awesome CMS which provide easy admin panel for the users to setup the sites. It has great plugins to improve the functionality of the sites with ease. For more information about this setup use the comment section below.