Installing WordPress via FTP can take up quite a long time, as you´ll have to upload hundreds of files to the server. Installing via the console is much faster, but you really need to know what you´re doing. Still, confused why you should install WordPress SSH than any other method? Let me help you with that!
Well, the process to Install WordPress Quickly Using SSH is faster and much convenient than any regular WordPress download and install plugin. Besides the control I have as an admin WordPress from SSH through one-click that most hosting providers offer is incomparable. Finally, as SSH access WordPress, you won’t face the complication of uploading anything over the control panel. You can perform this action by a single command interface.
Now, let’s get down to the procedure!
Personally, I´m using a hybrid install process to install WordPress SSH. This is accompanied by using the control panel and command prompt. I found this to be the easiest way to get up admin WordPress from ssh and running it quickly.
Below are the steps I take when I need to Install WordPress Quickly Using SSH from scratch. I´m using a Debian Squeeze based VPS with the DirectAdmin control panel. FTP is completely disabled on this machine. But remember that you don’t need to know wordpress plugins how to install procedures in this setup. Although, you might require some WordPress download and install plugins at the end of the process to auto-update your site.
EASIEST METHOD TO INSTALL WORDPRESS SSH
1) Create a database
I start with creating the database and user in my DirectAdmin control panel. Other control panels like Cpanel or phpMyAdmin can also be helpful to Install WordPress Quickly Using SSH.
2) Download WordPress
Using the shell to download and install WordPress is a real timesaver. As I´m on a Windows machine I use Putty to login to my server over the admin WordPress from SSH.
Browse to the directory where you want to install WordPress and execute the following commands:
- Download and unpack the latest WordPress package:
wget http://wordpress.org/latest.tar.gz && tar xfz latest.tar.gz
- Move the contents of the WordPress folder one level up:
mv wordpress/* ./
- Delete the empty WordPress directory and the compressed package:
rmdir ./wordpress/ && rm -f latest.tar.gz
3) Edit wp-config.php
You could do this using a console editor like Nano or Vi but as it involves quite a few steps I prefer to do it on the desktop. Download
wp-config-sample.php from the server, rename it to
wp-config.php and open it in your favorite text editor and:
- Add your database name, user and password
- Add the authentication keys and salts
- Change the WordPress database table prefix (optional)
I also disable WordPress post revisions and set the autosave interval to a really high number by adding these two constants just above the line /* That’s all, stop editing! Happy blogging. */:
define( 'WP_POST_REVISIONS', false );
When done, upload the
wp-config.php file to the server. WordPress allows you to save the file one level above your WordPress install. This is usually one level above the
public_html directory (unless you´re installing WordPress in a subdirectory of your site).
4) Change the owner/group as you download and install wordpress
One of the major drawbacks of installing WordPress via SSH is that all files are now owned by the user who uploaded the files. This means you won´t be able to use WordPress auto update features.
To get auto update to work we need to change the owner or group to the user Apache runs under. How to do this depends on your OS and server configuration. I use the below command as root:
chgrp -R apache public_html
but Apache might use a different name on your server (
nobody are common names).
5) Run the SSH access WordPress installation script
Install WordPress by running the script at
6) Enable WordPress SSH updates as you install WordPress SSH
As I install WordPress over SSH, I need to make sure that the updates are enabled. To allow WordPress auto-updates over SSH/SFTP I need to install one additional plugin: the brilliant SSH SFTP Updater Support
Like me, you can find this WordPress download and install plugin with ease. Instead of spending heaps of time over the internet to find wordpress plugins how to install.
Using the same shell commands as above, this will only take a minute. Browse to the plugins folder and execute the following commands (update the plugin version number if a newer versions is available):
rm -f ssh-sftp-updater-support.0.4.zip
chgrp -R apache plugins(note: execute this command as the root user!)
Also, note that the
unzip command requieres the package with the same name in Debian Squeeze.
That´s all to install WordPress SSH!