<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bloggingrocket.com &#187; SSH</title>
	<atom:link href="http://www.bloggingrocket.com/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bloggingrocket.com</link>
	<description>Launch your WordPress blog the right way, first time.</description>
	<lastBuildDate>Sun, 11 Apr 2010 20:35:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Installing WordPress with Shell Access</title>
		<link>http://www.bloggingrocket.com/installing-wordpress-with-shell-access/</link>
		<comments>http://www.bloggingrocket.com/installing-wordpress-with-shell-access/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 20:37:45 +0000</pubDate>
		<dc:creator>Antonie Potgieter</dc:creator>
				<category><![CDATA[Installing Wordpress With Shell Access]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.bloggingrocket.com/?p=181</guid>
		<description><![CDATA[Guest Article:

There is a quicker, more efficient way to install WordPress. All you need is shell access to your server in order to login via shell, obtain the archive, extract it directly on the server and then install. Let's get started.]]></description>
			<content:encoded><![CDATA[<p>Installing WordPress is a rather quick and painless process even when you do it the usual way of downloading WordPress from the WordPress.org website, extracting the archive (compressed file) on your computer and uploading everything via FTP to your server.</p>
<p>There is a quicker, more efficient way though. All you need is shell access to your server in order to login via shell, obtain the archive, extract it directly on the server and then installing WordPress. Let&#8217;s get started.</p>
<p><div class='postTabs_divs postTabs_curr_div' id='postTabs_0_181'>
<span class='postTabs_titles'><b>SSH Login</b></span></p>
<h3>Log in via SSH</h3>
<p>First off, open up your terminal. If you are on Mac OS, simply search for &#8220;Terminal&#8221; in Spotlight and execute the application. If you are on Windows, you could <a title="Download Putty" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">download Putty</a> for your platform of Windows. With your terminal open and ready, log in to your server via SSH protocol.</p>
<pre>ssh root@domain.com</pre>
<p>Change &#8220;root&#8221; to your SSH username and &#8220;domain.com&#8221; to the domain name of the server you are logging into or the IP address assigned to the server. Press the return key to execute the command and you will now most likely be prompted for a password. Enter your SSH password and press return again. If your login details were entered correctly, you should now be logged in.</p>
<p>Next, change to the correct working directory using the Unix CD command. The directory where you wish to install WordPress in. Be sure to use the absolute path on your server.</p>
<pre>cd /var/www/vhosts/domain.com/httpdocs/</pre>
<p>The path above would be appropriate for a Plesk server if you were to install WordPress in the public html directory of a domain named &#8220;httpdocs&#8221; where &#8220;domain.com&#8221; in the path of course is replaced with the correct domain name. Press return to execute the command. You should now be in the directory where you wish to install WordPress. You can execute the PWD command to check your current position.</p>
<pre>pwd</pre>
<p><em>Continued&#8230;</em></p>
<p></div>

<div class='postTabs_divs' id='postTabs_1_181'>
<span class='postTabs_titles'><b>Download WordPress</b></span></p>
<h3>Download WordPress</h3>
<p>Now you&#8217;ll obtain the WordPress archived package directly from the WordPress.org server and downloading it directly to this directory. Execute a WGET command to download the file.</p>
<pre>wget http://wordpress.org/latest.zip</pre>
<p>The file should now start downloading to your server. With the file finished downloading, execute the LS command to ensure that the file is there and ready to be unzipped.</p>
<pre>ls</pre>
<p><em>Continued&#8230;</em></p>
<p></div>

<div class='postTabs_divs' id='postTabs_2_181'>
<span class='postTabs_titles'><b>Unzip</b></span></p>
<h3>Extract the Archive</h3>
<p>Now we need to extract the archive with the UNZIP command</p>
<pre>unzip latest.zip</pre>
<p>This will extract all of the files in the archive into the current working directory. WordPress comes packaged into a &#8220;wordpress&#8221; folder, so we&#8217;ll need to copy all the files from the &#8220;wordpress&#8221; folder to the current directory. Let&#8217;s execute the CP command to copy the files.</p>
<pre>cp -rf ./wordpress/* ./</pre>
<p>The command above will recursively copy all of the files and folders from the &#8220;wordpress&#8221; directory into the current working directory. The &#8220;r&#8221; option causes recursive copying and the &#8220;f&#8221; option forces all existent files to be overwritten.</p>
<p><em>Continued&#8230;</em></p>
<p></div>

<div class='postTabs_divs' id='postTabs_3_181'>
<span class='postTabs_titles'><b>Create a database</b></span></p>
<h3>Create a MySQL database</h3>
<p>You can create your MySQL database via command line. You will need to have your MySQL administrator username and password in most cases though. First, log in to MySQL via command line.</p>
<pre>mysql -uusername -ppassword</pre>
<p>Change &#8220;username&#8221; and &#8220;password&#8221; in the command above to the appropriate administrator&#8217;s username and password for your MySQL server. Press return on your keyboard which will log you in if the login details were correctly entered. Now create the new database.</p>
<pre>create database dbname</pre>
<p>Change &#8220;dbname&#8221; to your preferred name for the new database. Then we need to execute two more commands related to privileges. The first command will give a user access to the database in order to connect and the second command will give the user all privileges to the database in order to create tables, insert records, drop tables, etc. Grant usage first.</p>
<pre>grant usage on *.* to username@localhost identified by 'password'</pre>
<p>Remember to change the &#8220;username&#8221; and &#8220;password&#8221; values for the specified user in the command above. Next, grant all privileges to the user for the specified database.</p>
<pre>grant all privileges on dbname.* to username@localhost</pre>
<p>The query above grants all privileges to the user for the database. Change the &#8220;dbname&#8221; value to the correct name of the database you created earlier on.</p>
<p>You can test the connection if you want to. Execute the command below but first change the &#8220;username&#8221;, &#8220;password&#8221; and &#8220;dbname&#8221; values to the correct values based on your previous queries above.</p>
<pre>mysql -uusername -ppassword dbname</pre>
<p>If the connection is successful, you are set to go to the next step in this article.</p>
<p><em>Continued&#8230;</em></p>
<p></div>

<div class='postTabs_divs' id='postTabs_4_181'>
<span class='postTabs_titles'><b>wp-config</b></span></p>
<h3>Edit the WordPress configuration file</h3>
<p>We&#8217;ll use the VIM editor to change the contents of the WordPress configuration file named &#8220;wp-config.php&#8221;. First rename the &#8220;wp-config-sample.php&#8221; file to &#8220;wp-config.php&#8221;.</p>
<pre>mv wp-config-sample.php wp-config.php</pre>
<p>Now edit the file</p>
<pre>vi ./wp-config.php</pre>
<p>Press &#8220;i&#8221; on your keyboard to go into INSERT mode. Use the keyboard arrows to navigate, the backspace to delete text and then change the DB_NAME, DB_USER and DB_PASSWORD constants. On some servers, you might need to change the DB_HOST value as well. With these constants changed to the correct values based on the database you set up earlier on and the user you assigned to the database, press &#8220;Esc&#8221; on your keyboard to exit INSERT mode. Now press &#8220;Shift&#8221; + &#8220;W&#8221; + &#8220;Q&#8221; and then type &#8220;wq&#8221; hit return. This will write the contents of the file and quit the VIM editor.</p>
<p><em>Continued&#8230;</em></p>
<p></div>

<div class='postTabs_divs' id='postTabs_5_181'>
<span class='postTabs_titles'><b>Install</b></span></p>
<h3>Install WordPress</h3>
<p>WordPress is now ready to be installed. Simply go to the URL of the directory where you extracted/copied the files in your browser and follow the 3 easy steps of the WordPress installation which will prompt you for the blog title, administrator&#8217;s email, etc&#8230;</p>
<p><em>END.</em></p>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.bloggingrocket.com/installing-wordpress-with-shell-access/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
