{"id":208,"date":"2024-04-14T18:13:06","date_gmt":"2024-04-14T18:13:06","guid":{"rendered":"https:\/\/123hosting.in\/tutorials\/?p=208"},"modified":"2024-04-14T18:21:53","modified_gmt":"2024-04-14T18:21:53","slug":"how-to-install-wordpress-using-ssh","status":"publish","type":"post","link":"https:\/\/123hosting.in\/tutorials\/how-to-install-wordpress-using-ssh\/","title":{"rendered":"How to Install WordPress  Using SSH"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#why-ssh\">WHY SSH?<\/a><\/li><li><a href=\"#easiest-method-to-install-wordpress-ssh\">EASIEST METHOD TO INSTALL WORDPRESS SSH<\/a><ul><li><a href=\"#1-create-a-database\">1) Create a database<\/a><\/li><li><a href=\"#2-download-word-press\">2) Download WordPress<\/a><\/li><li><a href=\"#3-edit-wp-config-php\">3) Edit wp-config.php<\/a><\/li><li><a href=\"#4-change-the-owner-group-as-you-download-and-install-wordpress\">4) Change the owner\/group as you download and install wordpress<\/a><\/li><li><a href=\"#5-run-the-ssh-access-word-press-installation-script\">5) Run the SSH\u00a0access WordPress installation script<\/a><\/li><li><a href=\"#6-enable-word-press-ssh-updates-as-you-install-word-press-ssh\">6) Enable WordPress SSH updates as you install WordPress SSH<\/a><\/li><\/ul><\/li><li><a href=\"#conclusion\">Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<p>Installing<a href=\"https:\/\/www.squarebrothers.com\/\" target=\"_blank\" rel=\"noopener\"> WordPress<\/a>\u00a0via\u00a0FTP\u00a0can take up quite a long time, as you\u00b4ll have to upload hundreds of files to the server. Installing via the console is much faster, but you really need to know what you\u00b4re doing. Still, confused why you should install WordPress SSH than any other method? Let me help you with that!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-ssh\"><strong><u>WHY SSH?<\/u><\/strong><\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/wphostinggeeks.com\/wp-content\/uploads\/ssl-certificates-on-wordpress-thumb-1280x720-1.jpg\" alt=\"ssl-certificates-on-wordpress-thumb-1280x720\" class=\"wp-image-2038\"\/><\/figure>\n<\/div>\n\n\n<p>Well, the process to Install WordPress Quickly Using\u00a0SSH\u00a0is 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\u2019t face the complication of uploading anything over the control panel. You can perform this action by a single command interface.<\/p>\n\n\n\n<p><strong>Now, let\u2019s get down to the procedure!<\/strong><\/p>\n\n\n\n<p>Personally, I\u00b4m 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.<\/p>\n\n\n\n<p>Below are the steps I take when I need to Install WordPress Quickly Using SSH from scratch. I\u00b4m using a Debian Squeeze based VPS with the\u00a0DirectAdmin control panel.\u00a0FTP is completely disabled on this machine. But remember that you don\u2019t 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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"easiest-method-to-install-wordpress-ssh\">EASIEST METHOD TO INSTALL WORDPRESS SSH<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/wphostinggeeks.com\/wp-content\/uploads\/how-to-manually.png\" alt=\"how to manually\" class=\"wp-image-2039\"\/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"1-create-a-database\"><strong>1) Create a database<\/strong><\/h3>\n\n\n\n<p>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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-download-word-press\"><strong>2) Download WordPress<\/strong><\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/wphostinggeeks.com\/wp-content\/uploads\/We-will-fix-wordpress-issues-and-errors3.png\" alt=\"We-will-fix-wordpress-issues-and-errors3\" class=\"wp-image-2046\"\/><\/figure>\n<\/div>\n\n\n<p>Using the shell to download and install WordPress is a real timesaver. As I\u00b4m on a Windows machine I use\u00a0Putty\u00a0to login to my server over the admin WordPress from SSH.<\/p>\n\n\n\n<p>Browse to the directory where you want to install <a href=\"http:\/\/123hosting.in\">WordPress<\/a> and execute the following commands:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Download and unpack the latest WordPress package:<br><code>wget http:\/\/wordpress.org\/latest.tar.gz &amp;&amp; tar xfz latest.tar.gz<\/code><\/li>\n\n\n\n<li>Move the contents of the WordPress folder one level up:<br><code>mv wordpress\/* .\/<\/code><\/li>\n\n\n\n<li>Delete the empty WordPress directory and the compressed package:<br><code>rmdir .\/wordpress\/ &amp;&amp; rm -f latest.tar.gz<\/code><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-edit-wp-config-php\"><strong>3) Edit wp-config.php<\/strong><\/h3>\n\n\n\n<p>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&nbsp;<code>wp-config-sample.php<\/code>&nbsp;from the server, rename it to&nbsp;<code>wp-config.php<\/code>&nbsp;and open it in your favorite text editor and:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Add your database name, user and password<\/li>\n\n\n\n<li>Add the authentication keys and salts<\/li>\n\n\n\n<li>Change the WordPress database table prefix\u00a0<em>(optional)<\/em><\/li>\n<\/ol>\n\n\n\n<p>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&nbsp;<em>\/* That\u2019s all, stop editing! Happy blogging. *\/<\/em>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>define('AUTOSAVE_INTERVAL', 35000);<\/code><\/li>\n\n\n\n<li><code>define( 'WP_POST_REVISIONS', false );<\/code><\/li>\n<\/ol>\n\n\n\n<p>When done, upload the&nbsp;<code>wp-config.php<\/code>&nbsp;file to the server. WordPress allows you to save the file one level above your WordPress install. This is usually one level above the&nbsp;<code>public_html<\/code>&nbsp;directory (unless you\u00b4re installing WordPress in a subdirectory of your site).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-change-the-owner-group-as-you-download-and-install-wordpress\"><strong>4) Change the owner\/group as you download and install wordpress<\/strong><\/h3>\n\n\n\n<p>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\u00b4t be able to use WordPress auto update features.<\/p>\n\n\n\n<p>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<strong>&nbsp;root<\/strong>:<\/p>\n\n\n\n<p><code>chgrp -R apache public_html<\/code><\/p>\n\n\n\n<p>but Apache might use a different name on your server (<code>www-data<\/code>&nbsp;or&nbsp;<code>nobody<\/code>&nbsp;are common names).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5-run-the-ssh-access-word-press-installation-script\"><strong>5) Run the SSH&nbsp;access WordPress installation script<\/strong><\/h3>\n\n\n\n<p>Install WordPress by running the script at&nbsp;<code>http:\/\/example.com\/wp-admin\/install.php<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"6-enable-word-press-ssh-updates-as-you-install-word-press-ssh\"><strong>6) Enable WordPress SSH updates as you install WordPress SSH<\/strong><\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/wphostinggeeks.com\/wp-content\/uploads\/commandes-ssh.png\" alt=\"commandes-ssh\" class=\"wp-image-2045\"\/><\/figure>\n<\/div>\n\n\n<p>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\u00a0SSH SFTP Updater Support\u00a0<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>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):<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>wget http:\/\/downloads.wordpress.org\/plugin\/ssh-sftp-updater-support.0.4.zip<\/code><\/li>\n\n\n\n<li><code>unzip ssh-sftp-updater-support.0.4.zip<\/code><\/li>\n\n\n\n<li><code>rm -f ssh-sftp-updater-support.0.4.zip<\/code><\/li>\n\n\n\n<li><code>chgrp -R apache plugins<\/code>\u00a0<strong>(note: execute this command as the root user!)<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Also, note that the&nbsp;<code>unzip<\/code>&nbsp;command requieres the package with the same name in Debian Squeeze.<\/p>\n\n\n\n<p>That\u00b4s all to install WordPress SSH!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>So, this was my short tutorial blog post on how to Install WordPress quickly using SSH. As your SSH access WordPress, make sure to go through SSL certificate installation, as this will make your site prominent and secure and help it receive proper SEO rankings on Google.<\/p>\n\n\n\n<p>You can archive this by following our other posts like\u00a0Set Up SSL (HTTPS) on WordPress Multisite. Also, if you find this article useful, make sure to check our other blog posts on\u00a0How to Move a 3GB WordPress Site to Digital Ocean (In Less Then 15 Minutes),\u00a0Easily add a domain alias to Google Apps (without the sent via)\u00a0or\u00a0Install WordPress Quickly Using SSH.\u00a0In the end, if you have any queries or questions and still confused, make sure to reach out through comments. I will try to answer each of them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing WordPress\u00a0via\u00a0FTP\u00a0can take up quite a long time, as you\u00b4ll have to upload hundreds of files to the server. Installing [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-208","post","type-post","status-publish","format-standard","hentry","category-wordpress-installation-using-ssh"],"_links":{"self":[{"href":"https:\/\/123hosting.in\/tutorials\/wp-json\/wp\/v2\/posts\/208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/123hosting.in\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/123hosting.in\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/123hosting.in\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/123hosting.in\/tutorials\/wp-json\/wp\/v2\/comments?post=208"}],"version-history":[{"count":1,"href":"https:\/\/123hosting.in\/tutorials\/wp-json\/wp\/v2\/posts\/208\/revisions"}],"predecessor-version":[{"id":209,"href":"https:\/\/123hosting.in\/tutorials\/wp-json\/wp\/v2\/posts\/208\/revisions\/209"}],"wp:attachment":[{"href":"https:\/\/123hosting.in\/tutorials\/wp-json\/wp\/v2\/media?parent=208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/123hosting.in\/tutorials\/wp-json\/wp\/v2\/categories?post=208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/123hosting.in\/tutorials\/wp-json\/wp\/v2\/tags?post=208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}