How to setup a wordpress website on AWS EC2 within few minutes

Image
"Learn, Learn and Learn"

Here we are going to discuss how can we setup our own WordPress website in our amazon EC2 within few minutes. There are several platforms which gives you the option to pay for their services and have a WordPress site. Then you can build whatever you need to do. But today we will discuss how to build our own server, install WordPress and setup the rest.

What is the benefits of choosing AWS to setup WordPress ?

Because you don't need to pay for services which other platforms provides. In AWS, you are the owner of your server and you are the person who install and setup your installation. So no monthly charges for anonymous companies . Only pay is for as you go. From this article we will learn how to setup our own WordPress site. In AWS also there are options to use pre-installed WordPress and make our site.  But here we will discuss how to do it without using pre-installations.

Follow the steps as below. 

1) First we need to create a AWS EC2 instance.…

Linux Commands Tips and Tricks

Have you ever noticed a moment when someone doing tasks with some simple terminal commands which took a long time for you to do. And you feels like to asking from yourself "Wow, How did he do that very easily ?"  Then you think yourself, If i also could do like that.

Yeah. That's fine. From this article we discuss most of the tips you should know, some sort of pretty, tiny commands. But they will be very useful. Go through the complete article and make yourself to hear a Wow from someone else. It will make you very comfortable.

1) Execute a previous command

Normally every command that we type is storing in a file named ".bash_history" inside of your home directory. To view the the past typed commands we can use the command history in your terminal. It will list all the commands that you typed.


There are some options we need to know

  • !! : This will run the last command in the history. According to the above image, !! will rerun the history command. 
  • !<number> : If you need to run a specific command in the history. Assume you need to run first command which means tree command according to the above image. It should be !1
  • history | grep <keyword> : This will search the keyword in history. 
  • UP keyboard button press also will take you to the past history commands. 

2) How to clear the terminal

Use command clear to clear the terminal window. 

3) Use Tab auto completion

Use Tab keyboard press to auto complete the commands. This was discussed in a previous article with examples. Please refer "How to get help from Linux". 

4) Changing directories

cd - : Go to the last directory where you were. 
cd ~ : Go to the home directory
cd : Go to your home directory ( same as above command )
cd .. : Go to the previous location. Means one step back. 

5) Run multiple commands in one single line

You can do this just putting a semi colon ";" in between commands. Like below. 

command_1 ; command_2 ; command_3

With this you can run several commands in one single line without waiting to be completing other commands. Means, second commands don't want to wait till first command gets completed. It saves time. 

6) Run multiple commands in one single line, but finishing one after second. 

command_1 && command_2 && command_3

Here, the command waits for the completion of it's previous command. This is useful to trigger if the commands are getting fail. If one commands is failing, next command will not be run. 

7) Search and run previous commands without referring history. 


Ctrl + r + <search keyword>

This is a very useful command that will be helped you a lot. You just press the control key and r letter in the keyboard. Then enter the search keyword you need to find. Then it will show you the most nearest command suits for your keyword in the history. It searches from bottom to top on history. To keep finding the required command, just press Ctrl + r in the keyboard and enter when you found.


8) Vim Cheat sheet

:w : Save the file
:wq : Save the file and quite
:q : Quite the file without saving
:wq! : Forcefully save and quite the file
:q! : Forcefully quite the file without saving
yy  : yank ( Copy a line to the text editor )
p : Paste the copied content into the text editor.
dd : Delete a line
x : Delete a character
/<keyword> : search for a keyword in text file
gg : Go to the first line of the text editor
G : Go to the last line of the text editor
:set num : View the document showing line numbers
i : Insert mode

9) Displaying the files with more lines

Use command less to view the files which have more lines. Use arrow UP and DOWN in the keyboard to go though the file.

less <filename>

10) Make a file empty without deleting.

Use echo  > filename command. This will send a blank character to that file and will replace every content in the file.


In this article, we have mentioned 10 useful tips for you. You can refer more with man pages. Practice more.

Cheers!

Comments

Popular posts from this blog

Why i can't ping to my AWS EC2 Instances ?

Different types of users in linux

NFS Server and Client Installation with Configurations.