login to the server using ssh as this is a linux server either using putty or on windows 10 using windows wsl(windows subsystem for linux)
Use the relevant key ssh key.pem centos@privateipaddress
disable SELinux temporarily during the upgrade getenforce or sestatus hows the selinux status
Open the /etc/selinux/config file and set the SELINUX mod to disabled, reboot the system sudo shutdown -r now
goto /var/www/html/wordpress
edit wp-config.php add define('FS_METHOD','direct') at the end; #this will skip the ftp message
sudo yum remove php
sudo yum install epel-release yum-utils
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum-config-manager --enable remi-php56
sudo yum install php56
sudo ln /usr/bin/php56 php # create a symlink
sudo php -v # check php version
sudo yum install php-fpm # install php fpm
sudo vi /etc/php-fpm.d/www.conf # check php fpm config
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum-config-manager --enable remi-php73
sudo yum install php
sudo php -v # check if php has been upgraded to 7.3
/usr/bin/php is location of php binary
config file is /etc/httpd/conf.d/wordpress.conf
<VirtualHost *:80>
#ServerAdmin aa@somedomain.com
DocumentRoot /var/www/html/wordpress
ServerName wordpress
ErrorLog /var/log/httpd/wordpress-error-log
CustomLog /var/log/httpd/wordpress-acces-log common
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/wordpress/$1
DirectoryIndex index.php
</VirtualHost>
Renable SElinux Open the /etc/selinux/config file and set the SELINUX mod to enabled and reboot sudo shutdown -r now