Install Wordpress application on EC2


wget https://wordpress.org/latest.tar.gz

tar -zxf package-name

mkdir /var/www/html
cd wordpress
mv . /var/www/html


yum install httpd

cd /etc/httpd/conf
edit httpd.conf
search for "AllowOverride None" change none to All
save and exit
chown -R apache:apache /var/www/html


cd /var/www/html directory

yum update
yum install php-fpm php-gd php-pdo php-mbstring php-pear -y
systemctl enable php-fpm
systemctl start php-fpm

service https restart
yum install phpphp-mysqlmysql

doing this I am getting:
Your server is running PHP version 5.4.16 but WordPress 5.4 requires at least 5.6.20 as I was previously getting this error "ou cannot update because WordPress 5.2 requires PHP version 5.6.20 or higher. You are running version 5.6.3."


so for this I tried this with my aws linux instance:
#!/bin/bash

yum install httpd php-mysql -y

amazon-linux-extras install -y php7.3

cd /var/www/html

wget https://wordpress.org/latest.tar.gz

tar -xzf latest.tar.gz

cp -r wordpress/* /var/www/html/

rm -rf wordpress

rm -rf latest.tar.gz

chmod -R 755 wp-content

chown -R apache:apache wp-content

service httpd start

chkconfig httpd on




------------------------------------------------------------------------------------------------------------------------
once you get to see WordPress admin page from the Apache server page you are ready to go further:


on the UI fill the asked details










Comments

Popular Posts