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
email@example.com ~ # yum install epel-release -y
firstname.lastname@example.org ~ # yum localinstall --nogpgcheck http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel//epel-release-latest-7.noarch.rpm
Enable EPEL Repository
email@example.com ~ # yum clean all
firstname.lastname@example.org ~ # yum update
Installing WordPress 4
Step-1(Installing LAMP packages)
On Fedora 22
email@example.com ~ # dnf install httpd* mariadb* php*
On CentOS 7 / RHEL 7 / SL 7 / OL 7
firstname.lastname@example.org ~ # yum install httpd* mariadb* php*
Step-2(Starting the Services)
email@example.com ~ # systemctl start httpd firstname.lastname@example.org ~ # systemctl start mariadb
Step-3 (Auto Enable Services at boot)
email@example.com ~ # systemctl enable mariadb Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
firstname.lastname@example.org ~ # 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)
email@example.com ~ # 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)
firstname.lastname@example.org ~ # 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)
email@example.com ~ # wget http://wordpress.org/latest.tar.gz
firstname.lastname@example.org ~ # tar -xf latest.tar.gz
email@example.com ~ # cp -rv wordpress/* /var/www/html/
Step-7 (Providing Permissions to the WordPress)
firstname.lastname@example.org ~ # sudo chmod -R 755 /var/www/html/
email@example.com ~ # sudo chown -R apache:apache /var/www/html/
firstname.lastname@example.org ~ # 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.