PHP

Posted on

Install dynamic content delivery service PHP

sudo yum install php php-mysql

Restart Apache

sudo systemctl restart httpd.service

Assign ownership to wpuser

sudo chown -R $USER:$USER /var/www/html
sudo chmod -R 755 /var/www/

create index website add phpinfo() *

sudo touch /var/www/html/info.php
sudo echo "<?php phpinfo(); ?>" >> /var/www/html/info.php

remove php.info

sudo rm /var/www/html/info.php

Install PHP modules

to retrieve a list of modules search

yum search php-

*if needed adjust firewall

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload