Restore wordpress on amazon linux AMI ec2
Restore wordpress on amazon linux AMI ec2
04/01/2016
Show all

Install wordpress on amazon linux AMI ec2

Install wordpress on amazon linux AMI ec2

1 login with ec2-user and run this commands:

sudo yum update
sudo yum install php php-mysql
sudo yum install mysql-server
sudo service httpd start
sudo service mysqld start
sudo chkconfig httpd on
sudo chkconfig mysqld on
wget https://www.yanivp.net//wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
mysqladmin -u root -p create dbname
cd wordpress
sudo mv * /var/www/html/
sudo groupadd www
sudo usermod -a -G www ec2-user
sudo chown -R root:www /var/www
sudo chmod 2775 /var/www
find /var/www -type d -exec sudo chmod 2775 {} +
find /var/www -type f -exec sudo chmod 0664 {} +
sudo usermod -a -G www apache
sudo chown -R apache /var/www
sudo chgrp -R www /var/www
sudo chmod 2775 /var/www
find /var/www -type d -exec sudo chmod 2775 {} +
find /var/www -type f -exec sudo chmod 0664 {} +
sudo service httpd restart
sudo yum install htop
sudo mysql_secure_installation

2 (Optional) Install phpMyAdmin:

sudo yum-config-manager --enable epel
sudo yum install -y phpMyAdmin
sudo sed -i -e 's/127.0.0.1/yourIP/g' /etc/httpd/conf.d/phpMyAdmin.conf
sudo service httpd restart
goto http://domain/phpmyadmin

 

3 Fix Permalink Post name:

sudo nano /etc/httpd/conf/httpd.conf
FIND AuthConfig Limit
change AllowOverride None to AllowOverride ALL
 

4 Other links:

9 Most Useful .htaccess Tricks for WordPress
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html
 

Leave a Reply

Your email address will not be published. Required fields are marked *