<?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>Setup database | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/setup-database/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sun, 11 Dec 2022 04:46:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>How to install WordPress on Linux via SSH command line</title>
		<link>https://studentprojects.in/software-development/wordpress/wordpress-installation/how-to-install-wordpress-on-linux-via-ssh-command-line/</link>
					<comments>https://studentprojects.in/software-development/wordpress/wordpress-installation/how-to-install-wordpress-on-linux-via-ssh-command-line/#respond</comments>
		
		<dc:creator><![CDATA[Ranjith Kadamboor]]></dc:creator>
		<pubDate>Fri, 18 Mar 2022 09:01:56 +0000</pubDate>
				<category><![CDATA[WordPress Installation]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Install wordpress]]></category>
		<category><![CDATA[Setup database]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=8815</guid>

					<description><![CDATA[<p>WordPress can be installed using web hosting control panels such as cPanel or Plesk. Typically, these control panels offer a one-click installation option. If you don&#8217;t have that choice, continue reading. This article explains how to manually install WordPress on any Linux server or a dedicated server that does not have a control panel installed.</p>
<p>The post <a href="https://studentprojects.in/software-development/wordpress/wordpress-installation/how-to-install-wordpress-on-linux-via-ssh-command-line/">How to install WordPress on Linux via SSH command line</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>WordPress can be installed using web hosting control panels such as cPanel or Plesk. Typically, these control panels offer a one-click installation option. If you don&#8217;t have that choice, continue reading. </p>



<p>This article explains how to manually install WordPress on any Linux server or a dedicated server that does not have a control panel installed.</p>



<h3>Prerequisites</h3>



<ol><li><strong>Access to an linux server with a sudo user<br></strong>To complete the WordPress installation on a linux server, we need a user login with sudo privileges. </li><li><strong>LAMP Stack<br></strong>In order for WordPress to work properly, it will require a web server, a database, and PHP. All of these needs are met by installing a LAMP stack (Linux, Apache, MySQL, and PHP). To install and configure this programme, follow the steps in this guide.</li></ol>



<p>It&#8217;s quite simple to set up WordPress. It consists of the following steps:</p>



<ol><li>Connect to your server via SSH</li><li>Download and unzip the most recent WordPress files.</li><li>Create a database and set it up.</li><li>Install the WordPress</li></ol>



<p>Let&#8217;s take each step one at a time.</p>



<h3>1. Connect to your server</h3>



<p>I&#8217;ll show you how to connect to the server with PuTTY or SSH in this section. You may be unable to log in via SSH on some servers because of server restrictions. In that case, check out this article on how to <a href="https://codesdoc.com/documents/install-wordpress-in-cpanel-using-ftp/">install WordPress in cPanel using FTP</a>.</p>



<p><strong>Connect to your server using PuTTY</strong></p>



<p>Open PuTTY and type your domain name in the Hostname (or IP address) box, as well as the SSH port number in the Port box, and then click Open.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img decoding="async" width="572" height="549" src="https://studentprojects.in/wp-content/uploads/2022/03/PuttyConnection.png" alt="" class="wp-image-8820" srcset="https://studentprojects.in/wp-content/uploads/2022/03/PuttyConnection.png 572w, https://studentprojects.in/wp-content/uploads/2022/03/PuttyConnection-300x288.png 300w" sizes="(max-width: 572px) 100vw, 572px" /><figcaption>Connect to the server using PuTTY</figcaption></figure></div>



<p>PuTTY will now prompt you for your login. Enter your username, followed by your password. For security reasons, you won&#8217;t see your password being typed on the screen while you&#8217;re inputting it. After you&#8217;ve typed your password and pressed Enter, you&#8217;ll be logged in. If there is a security alert, accept it.</p>



<p><strong>Connect to your server using SSH</strong></p>



<p>To&nbsp;connect&nbsp;to&nbsp;your&nbsp;site&#8217;s&nbsp;command-line&nbsp;using&nbsp;SSH,&nbsp;use&nbsp;the&nbsp;following&nbsp;command&nbsp;in&nbsp;your&nbsp;Terminal&nbsp;client:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">ssh username@domain.com -p 22</code></pre>



<p>Change port number 22 according to your server configuration. You can omit -p and 22 in the command if your host permits SSH on default port 22. If&nbsp;you&nbsp;run&nbsp;into&nbsp;a&nbsp;problem, &#8220;<strong>port 22: no matching host key type found. Their offer: ssh-dss</strong>&#8220;, you should add the option -oHostKeyAlgorithms=+ssh-dss to the SSH command:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">ssh -oHostKeyAlgorithms=+ssh-dss username@domain.com</code></pre>



<p></p>



<h3>2. Download and unzip the most recent WordPress files.</h3>



<p>So now you have logged into the SSH server, you need to navigate to the correct directory where you will install WordPress. This depends on the server configuration. It can be the public_html folder or /var/www/yourdomain.com folder. Then download and extract the WordPress files there.  </p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">cd public_html/</code></pre>



<p>Download the latest WordPress zip file using wget command.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">wget https://wordpress.org/latest.zip
unzip latest.zip</code></pre>



<p>All of the unzipped files will be found in the wordpress folder. Move all of the files from wordpress to the current directory.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">mv wordpress/* ./</code></pre>



<p>Remove latest.zip and empty wordpress directory.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">rm -rf latest.zip
rmdir wordpress</code></pre>



<p>Finally, the WordPress files should resemble the image below.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="604" height="416" src="https://studentprojects.in/wp-content/uploads/2022/03/WordpressFiles.png" alt="" class="wp-image-8821" srcset="https://studentprojects.in/wp-content/uploads/2022/03/WordpressFiles.png 604w, https://studentprojects.in/wp-content/uploads/2022/03/WordpressFiles-300x207.png 300w" sizes="(max-width: 604px) 100vw, 604px" /><figcaption>WordPress files</figcaption></figure></div>



<h3>3. Create a database and set it up.</h3>



<p>Let&#8217;s make a new MySQL database, user and grant all the privileges.</p>



<p>To&nbsp;begin,&nbsp;use&nbsp;the&nbsp;following&nbsp;command&nbsp;to&nbsp;log&nbsp;into&nbsp;the&nbsp;MySQL&nbsp;command&nbsp;line:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">mysql -u username -p</code></pre>



<p>After that, you&#8217;ll be prompted for your MySQL password. When you enter your password, you&#8217;ll see something like this:</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="715" height="263" src="https://studentprojects.in/wp-content/uploads/2022/03/mysql.png" alt="" class="wp-image-8822" srcset="https://studentprojects.in/wp-content/uploads/2022/03/mysql.png 715w, https://studentprojects.in/wp-content/uploads/2022/03/mysql-300x110.png 300w" sizes="(max-width: 715px) 100vw, 715px" /><figcaption>MySQL logged in successfully</figcaption></figure></div>



<p>If there is no password and the username is set to default, then simply type MySQL command.</p>



<p>Once you are successfully logged into MySQL Server, create a database, new user and then provide the user access to the database. Execute the following commands:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">create database databasename;
grant usage on *.* to username@localhost identified by 'password';
grant all privileges on databasename.* to username@localhost;</code></pre>



<p>Make sure you provide a proper database name, user name and a strong password. Note it down somewhere to use it later.  </p>



<h3>4. Install the WordPress</h3>



<p>Open the website URL on the browser, which will take you to the installation wizard. Follow the below-given steps to install WordPress.&nbsp;</p>



<figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="827" height="657" src="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-1.png" alt="" class="wp-image-8823" srcset="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-1.png 827w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-1-300x238.png 300w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-1-768x610.png 768w" sizes="(max-width: 827px) 100vw, 827px" /><figcaption>Select the language and continue</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="828" height="611" src="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-2.png" alt="" class="wp-image-8824" srcset="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-2.png 828w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-2-300x221.png 300w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-2-768x567.png 768w" sizes="(max-width: 828px) 100vw, 828px" /><figcaption>We have everything handy! Let’s start the WordPress installation</figcaption></figure>



<p>On the next step, enter the database name, username and password which you have noted down while creating it. Click on the Submit button.&nbsp;The database host and table prefix can remain unchanged.</p>



<figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="826" height="567" src="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-3.png" alt="" class="wp-image-8825" srcset="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-3.png 826w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-3-300x206.png 300w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-3-768x527.png 768w" sizes="(max-width: 826px) 100vw, 826px" /><figcaption>Provide the details for installation</figcaption></figure>



<p>If you don&#8217;t have write access to create a file in the install directory, you&#8217;ll get the following error. Then, in the install directory, create a wp-config.php file and paste the given text in it.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img decoding="async" loading="lazy" width="759" height="538" src="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress_install_guide2.png" alt="" class="wp-image-8826" srcset="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress_install_guide2.png 759w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress_install_guide2-300x213.png 300w" sizes="(max-width: 759px) 100vw, 759px" /><figcaption>wp-config.php permission error</figcaption></figure></div>



<p>The database connection has now been established. Provide the Website title, a username and a strong password, email id. For security reasons, don’t use admin as a username.</p>



<figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="827" height="643" src="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-4.png" alt="" class="wp-image-8827" srcset="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-4.png 827w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-4-300x233.png 300w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-4-768x597.png 768w" sizes="(max-width: 827px) 100vw, 827px" /><figcaption>Configure WordPress</figcaption></figure>



<p>After a successful installation, the success message should show.</p>



<figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="821" height="449" src="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-5.png" alt="" class="wp-image-8828" srcset="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-5.png 821w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-5-300x164.png 300w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-5-768x420.png 768w" sizes="(max-width: 821px) 100vw, 821px" /><figcaption>WordPress installed successfully</figcaption></figure>



<p>Click on the login button or open the URL http://yourdomain.com/wp-admin to access the WordPress admin panel. Enter the provided username and password, click the login button. </p>



<figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="827" height="495" src="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-6.png" alt="" class="wp-image-8829" srcset="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-6.png 827w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-6-300x180.png 300w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-6-768x460.png 768w" sizes="(max-width: 827px) 100vw, 827px" /><figcaption>WordPress Login page</figcaption></figure>



<p>This will open the WordPress dashboard.&nbsp;This is your backend dashboard or admin panel, from where you would control everything.</p>



<figure class="wp-block-image size-large"><img decoding="async" loading="lazy" width="1024" height="451" src="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-7-1024x451.png" alt="" class="wp-image-8830" srcset="https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-7-1024x451.png 1024w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-7-300x132.png 300w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-7-768x338.png 768w, https://studentprojects.in/wp-content/uploads/2022/03/Wordpress-Setup-on-Server-7.png 1358w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>WordPress Control Panel</figcaption></figure>



<p>Now is the time to visit your local website. Open http://yourdomain.com</p>



<figure class="wp-block-image size-large"><img decoding="async" loading="lazy" width="1024" height="571" src="https://studentprojects.in/wp-content/uploads/2022/03/Testing-Wordpress-installation-1024x571.png" alt="" class="wp-image-8831" srcset="https://studentprojects.in/wp-content/uploads/2022/03/Testing-Wordpress-installation-1024x571.png 1024w, https://studentprojects.in/wp-content/uploads/2022/03/Testing-Wordpress-installation-300x167.png 300w, https://studentprojects.in/wp-content/uploads/2022/03/Testing-Wordpress-installation-768x428.png 768w, https://studentprojects.in/wp-content/uploads/2022/03/Testing-Wordpress-installation.png 1108w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Your website homepage</figcaption></figure>



<p>Quickly try to post some test content, install any plugin to see if everything works fine. If there is any permission error while installing the plugin run the following command from the install directory.</p>



<pre class="wp-block-code"><code class="">chown -R www-data:www-data *</code></pre>



<p>Congratulations! You have successfully installed WordPress. Let me know if you have any questions in the comments section below. I’ll be happy to assist you!</p><p>The post <a href="https://studentprojects.in/software-development/wordpress/wordpress-installation/how-to-install-wordpress-on-linux-via-ssh-command-line/">How to install WordPress on Linux via SSH command line</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/wordpress/wordpress-installation/how-to-install-wordpress-on-linux-via-ssh-command-line/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
