Install WordPress (LAMP) On CentOS 8

WordPress installation is just 10 minutes task and even less you’ve done it before. Simply follow the commands, and let me know if you run into any problem.

yum install mariadb mariadb-server httpd httpd-tools php php-cli php-json php-gd php-mbstring php-pdo php-xml php-mysqlnd php-pecl-zip wget

systemctl status httpd
systemctl start httpd; systemctl enable httpd
systemctl status httpd

systemctl status mariadb
systemctl start mariadb;systemctl enable mariadb
systemctl status mariadb

mysql -u root -p
CREATE DATABASE wordpress;
GRANT ALL ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'secret';
FLUSH PRIVILEGES;
quit
cd /var/www
wget https://wordpress.org/latest.tar.gz
tar xvzf latest.tar.gz ; rm -v latest.tar.gz
chown -Rf apache:apache ./wordpress/
chmod -Rf 775 ./wordpress/

vim /etc/httpd/conf.d/wordpress.conf

 

<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot /var/www/wordpress
<Directory "/var/www/wordpress">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common
</VirtualHost>
httpd -t
systemctl restart httpd

 

Leave a Reply