This tutorial will show you how to install WordPress and database on Amazon web hosting services. This can be challenging but I have a present for you. A terminal cheat sheet.
Your PEM file
Make sure that you have your PEM file in the right directory on your computer. Log into your Amazon server with this syntax.ssh -i "yourfile.pem" [email protected]
Getting WordPress Files To Your Server
After you are successfully connected make sure that you log in as root and change your directory to the public domain. If you are following these tutorials in succession it will be easier for you. To login as root type in the following.sudo suTo change directory to the public domain type in the following.
cd / cd var cd www cd html
Installing WordPress in our Amazon Web Hosting
You should now be in the html directory. Now lets import our WordPress files and extract them.wget http://wordpress.org/latest.tar.gz --no-check-certificate tar xfz latest.tar.gzNow lets move the files to our public domain and remove the initial directory and file.
mv wordpress/* ./ rmdir wordpress/ && rm -f latest.tar.gz
Creating the Database, User and User Privileges
Type in the following to connect to mysql server.mysql -pYou will then have to enter your #ssh-connection-install-server-php-mysql-amazon-web-hosting" target="_blank" rel="noopener">root password for mysql.
Now create the database.
CREATE DATABASE the_blog;
Create a User for the Database in MySql
CREATE USER 'max'@'localhost' IDENTIFIED BY 'abcdefg';
Grant All Privileges to the User
GRANT ALL PRIVILEGES ON the_blog.* TO max@'localhost' IDENTIFIED BY 'abcdefg';
Flush Privileges
FLUSH PRIVILEGES;
The Complete Terminal Cheat Sheet to Install WordPress on Amazon
ssh -i "yourfile.pem" [email protected] MAKE SURE YOU ARE IN THE RIGHT DIRECTORY!!! wget http://wordpress.org/latest.tar.gz --no-check-certificate tar xfz latest.tar.gz mv wordpress/* ./ rmdir wordpress/ && rm -f latest.tar.gz SET UP DATABASE mysql -p OR mysql -u root -p Enter password: CREATE DATABASE the_blog; CREATE USER 'max'@'localhost' IDENTIFIED BY 'abcdefg'; GRANT ALL PRIVILEGES ON the_blog.* TO max@'localhost' IDENTIFIED BY 'abcdefg'; FLUSH PRIVILEGES;