How to Install WordPress over SSH
To install WordPress over SSH you’ll need SSH access to your server and, if you use Windows, an SSH client such as Putty.
SSH access is provided by the vast majority of web hosts by default, if you need your username and password, please contact your host.
Step 1) Connect to your server
Using Terminal or Putty, SSH to your server, in the case of Terminal use the following:
If you encounter the warning “The authenticity of host ‘wpkb.com (126.96.36.199)’ can’t be established.” you can type yes, hit enter, and move on.
Step 2) Downloading WordPress
Move into the public_html directory with the following command:
Here you can download WordPress using wget:
To extract WordPress, please use the tar command
tar xfz latest.tar.gz
This extracts WordPress into a directory named WordPress, to move it into public_html you can use the mv command
mv wordpress/* ./
If you would like to delete the (now empty) WordPress direct and downloaded archive you can use the following
rmdir ./wordpress/ && rm -f latest.tar.gz
Step 3) Creating a Database
You can create a Database quickly via your host’s control panel, or through the terminal with the following steps.
Enter MySQL with this command.
mysql -u username -p
You’ll be prompted for your password so be sure to have that handy.
create database wpdatabase; grant usage on *.* to username@localhost identified by 'password'; grant all privileges on wpdatabase.* to username@localhost; use wpdatabase;
If successful (it will say ‘database changed’) leave the MySQL session by entering exit at the prompt.
Step 4) Configuring WordPress
Create wp-config.php by copying wp-config-sample.php like so
cp wp-config-sample.php wp-config.php
Now, open wp-config.php with the text editor vi
Use the arrow keys to scroll down until you see the database information. Hit i to enter insert mode and fill out the details.
Step 5) Complete the Installation
Visit your website in the Browser to complete the WordPress installation by providing it with your chosen username and password.