Advertisement #Header

13 Jul 2015

Quick way to Install Wordpress into Remote Linux Server

To transfer any file to the remote server via FTP you will notice that it takes less time to upload a  7MB file than 1500 files with a total of 7 MB file size.

So its best to upload the installation file to the remote server than sending the whole extracted package.

But the issue then would be How to extract the file in remote server?

It can be extracted if you have a  Shell access privilege User account in the remote server.

Then download PuTTYa client terminal for SSH connection.

Open the putty.exe,  and click 'Session' on left menu, Enter Hostname of your remote server or IP. Set Connection Type as SSH.

If you want to reuse this connection multiple times, save this session and load it next time you need it.

Enter the Session name in Saved Sessions and Click Save.

Now click on the 'Open'  button to connect to remote server.

Now since its your 1st time connection using putty to remote server, it gives you a Security Alert, click Yes to continue. (Its best to cross check the server fingerprint key).

To Login, type in username and then the password in Putty Terminal

Now once you are in the remote server, traverse to path where you uploaded the file and then type   unzip   to extract all its content.

If you dont want the folder wordpress and move all its contents to the current directory www/ type  mv wordpress /* .  

Now this is a quick way to install wordpress to remote linux server from a Windows machine, but there is another better way, since you already have a Shell access.

Using SSH to Download and Install Wordpress Directly from Remote Server

Find out the latest Wordpress file in the download page. Copy either the .zip or .tar.gz format link       or 

Login using PuTTY client with SSH like steps shown earlier and then
type   wget  

and if you selected .zip format then follow steps as earlier to extract and if you have selected .tar.gz format type   tar -zxf latest.tar.gz  

Now if you dont have shell access then there is another alternative.

Using PHP to download and extract Wordpress into Remote Server

Create a php file and then use exec  function to run the linux commands from inside the php code.

To download use the code

and to extract use the tar or unzip linux command as shown above in the exec("") function.

No comments:

Post a Comment