Basic Linux Commands for Each WordPress Users




WordPress installations mostly occur in Linux servers even if IIS + Windows supports PHP and wordpress. To know Linux commands is not necessary in wordpress management as long good Control panels like cpanel will be present on leading hosting providers.

Any how as we all know wordpress is php driven which in turn runs on apache and this apache works best on linux, obeviously wordpress depends directly to Linux. This is where we need to learn basic linux commands to escape atleast in some situations where wp-admin or cpanel cant help in direct

This tutorial requires

1. Good SSH Client fro you to connect to your Server ( SSH Should be enabled with in your account )

I recommend pUtty ( download )

2. Basic Command line knowledge

Download putty and Run


Give your Server address and select connection type as SSH, now press the Open button, for the first time it ll show a dialog, bypass the box with YES and provide user name and password

This will connect you to the hosting root path, to access your web root in some cases you might have to change directory to public_html

[meabi@server2]$ cd public_html

Lets start with, and if we need an explicit wordpress installation we need to download wordpress as a zip file

Download from command line ( Command GET is used to download file to the current directory )

[meabi@server2]$ GET

And this file need to be unzipped first, here is the command

[meabi@server2]$ unzip

Once unzipped it will go under a directory wordpress, and we need to copy entire directory content to the root directory, see the commands

Change current directory to wordpress

[meabi@server2]$ cd wordpress

Test content with command ls

[meabi@server2]$ ls

Goto parent directory, ie. root directory, here  ..  stands for Parent

[meabi@server2]$ cd ..

with in this root directory use this command to copy entire content to root directory(parent directory). this is termerd recursive copy (switch -r)

[meabi@server2]$ cp -r ./wordpress/* ./

This will copy entire content to your root directory, next thing is to edit your wp-config.php which resides directly on your root directory for this there is two editors of my choice

1. vi or vim

2. nano

Former one is the widely used one and latter more friendly and need no extensive commands with this editor


[meabi@server2]$ nano <file_name>

[meabi@server2]$ vi <file_name>

Remember the MySQL details you have to create with phpMysql or with your favourite MySQL Client as WordPress Back end

We are set now a little more commands necessary for installing additional pluggins and installing themes, for this we need to change directories to appropriate paths

to install themes change directory to wp-content >> themes

[meabi@server2]$ cd wp-content/themes/

and download theme from remote server ( say )

[meabi@server2]$ GET

unzip this file

[meabi@server2]$ unzip

Now we can activate theme theme1 from wp-admin>> Appearance >> Install themes

same way to install a plugin change path to wp-content/plugins/ and follow steps accordingly , after unzipping files activate pluggin from wp-admin >> Pluggins >> inactive

Note : prompt [meabi@server2] is intentionally made so, normal linux prompt looks different. and URLS displayed are for demo purpose only and is not live urls


Please enter your comment!
Please enter your name here