WordPress Installation on Linux

WORDPRESS INSTALLATION ON LINUX

 

Installing WordPress

 

Prerequisites to install WordPress:

 Apache

PHP

MySQL / MariaDB

 

Installing Apache as web server

sudo yum -y install httpd

 

Start Apache and enable it

sudo systemctl start httpd

sudo systemctl enable httpd

 

Check that Apache is running

sudo systemctl status httpd

 

Enable mod_rewrite module on  /etc/httpd/conf/httpd.conf

AllowOverride All

 

Installing MySQL / MariaDB

sudo yum install mariadb-server mariadb

 

To start the MariaDB server

sudo systemctl start mariadb

 

Setting the “root” user for MySQL / MariaDB.

sudo mysql_secure_installation

(follow the wizard to set the security)

 

Installing PHP

To install PHP run the following command

sudo yum -y install php php-mysql php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl

 

Installing phpMyAdmin

sudo yum -y install epel-release

And then issue the below command again.

sudo yum -y install phpmyadmin

 

Restart Apache

sudo systemctl restart httpd.service

 

Testing phpmyAdmin

http://yourIP/phpmyadmin

 

Installing WordPress

 Download WordPress from here

 sudo wget https://wordpress.org/latest.zip

 

Unzip WordPress under /var/www/html

sudo unzip latest.zip

 

Modify your permissions on the wordpress folder

sudo chmod -R 775 wordpress

sudo chown apache:apache wordpress

 

Let's create our Database for WordPress

You can use phpmyAdmin in order to create the database

https://YourIP/phpmyadmin

 

or you can do it from the command line

sudo mysql –u root –p   (you already assigned the password previously)

 

 

Once you are inside of the database

  Mysql>

CREATE DATABASE wordpress;

GRANT ALL PRIVILEGES ON wordpress.* TO "wordpress"@"localhost" IDENTIFIED BY "MYPASSWORD";

FLUSH PRIVILEGES;

 

exit from the database

 

Let's configure WordPress

http://yourIP/wordpress

You can follow the wizard to complete the installation as you have all the elements ready to complete it