{"id":1431,"date":"2023-10-30T04:13:08","date_gmt":"2023-10-30T04:13:08","guid":{"rendered":"https:\/\/matob.web.id\/random\/?p=1431"},"modified":"2023-10-30T04:13:08","modified_gmt":"2023-10-30T04:13:08","slug":"what-is-localhost","status":"publish","type":"post","link":"https:\/\/matob.web.id\/random\/what-is-localhost\/","title":{"rendered":"What is Localhost? Guide for Beginners"},"content":{"rendered":"<p><span>For those of you who are just starting to\u00a0<\/span>learn how to create a website<span>\u00a0, perhaps localhost is one of a myriad of foreign -sounding terms.\u00a0But don&#8217;t worry.\u00a0In this article, you will be guided to understand what localhost is and its uses.<\/span><\/p>\n<h2><span>What is Localhost?<\/span><\/h2>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"size-full wp-image-1434 aligncenter\" src=\"https:\/\/matob.web.id\/random\/wp-content\/uploads\/sites\/2\/2021\/11\/local-host.jpg\" alt=\"localhost\" width=\"978\" height=\"512\" title=\"\" srcset=\"https:\/\/matob.web.id\/random\/wp-content\/uploads\/sites\/2\/2021\/11\/local-host.jpg 978w, https:\/\/matob.web.id\/random\/wp-content\/uploads\/sites\/2\/2021\/11\/local-host-768x402.jpg 768w\" sizes=\"(max-width: 978px) 100vw, 978px\" \/><\/p>\n<p><span>In the context of website programming, your computer is called a <a href=\"https:\/\/matob.web.id\/random\/1001\/what-is-localhost\">localhost<\/a>.\u00a0Why is that?<\/span><\/p>\n<p><span>You need to remember that a web hosting server is also a computer device.\u00a0Therefore, your computer can also be used to store and run a website with a local server application.<\/span><\/p>\n<p><span>However, the site is not accessible to anyone over the Internet.\u00a0The only way to open it is to type http:\/\/localhost into the web browser of the computer that stores the site&#8217;s data.<\/span><\/p>\n<p><span>In other words, localhost is not just a term, but also a\u00a0<\/span><strong><span>domain<\/span><\/strong><span>\u00a0name\u00a0.\u00a0Of course, localhost has an IP address behind it, which is 127.0.0.1 (or known as loopback address).\u00a0<\/span><\/p>\n<h2><span>Localhost function<\/span><\/h2>\n<p><span>There are three benefits that can be obtained with the existence of localhost.\u00a0What is it?\u00a0See the explanation below!<\/span><\/p>\n<h3><span>1. Test Sites and Web Applications Offline<\/span><\/h3>\n<p><span>As discussed in the previous section, the main function of localhost is to allow you to access sites running on your computer.<\/span><\/p>\n<p><span>This is useful if you are a\u00a0<\/span><strong><span>website developer<\/span><\/strong><span>\u00a0.\u00a0With localhost, you can make sure that the site or web application you create works properly before uploading it to an online server.<\/span><\/p>\n<p><span>Of course you can do that with a\u00a0<\/span><strong><span>web hosting service<\/span><\/strong><span>\u00a0.\u00a0However, creating a website offline does not require any cost.\u00a0Plus, you don&#8217;t have to think about server bandwidth limits.<\/span><\/p>\n<h3><span>2. Check the Condition of Your Internet Connection<\/span><\/h3>\n<p><span>Localhost can also be used to check your internet connection.\u00a0To do this, you just need to open a Command Prompt (Windows) or Terminal (Mac OS) and type &#8220;ping localhost&#8221; or &#8220;ping 127.0.0.1&#8221;.\u00a0After that, press the enter key and see the result.\u00a0Here are the test results that appear when there are no problems with the internet connection.<\/span><\/p>\n<h3><span>3. Block Access to Certain Sites<\/span><\/h3>\n<p><span>For those of you who don&#8217;t know, access to a website can occur because the Domain Name Server (DNS) provides the IP address of the site address entered into your browser&#8217;s address bar.<\/span><\/p>\n<p><span>To make the process easier, your computer stores every site address it has ever accessed along with their IP address in a settings file called &#8220;hosts file&#8221;.<\/span><\/p>\n<p><span>Well, if you don&#8217;t want your computer to be used to access certain websites, you can replace their IP address with 127.0.0.1 which is actually the localhost address.\u00a0If you&#8217;re using Google Chrome, here&#8217;s what happens once these settings are enabled.<\/span><\/p>\n<h2><span>Various Localhost Server Applications<\/span><\/h2>\n<p><span>In the section on the definition of localhost it has been mentioned that a web hosting server is a computer device.\u00a0However, it cannot run a site without web server applications such as NginX and Apache.<\/span><\/p>\n<p><span>This also applies to local servers or personal computers that are used as a server.\u00a0Below are some applications you can choose to create a local server.<\/span><\/p>\n<h3><span>1. XAMPP<\/span><\/h3>\n<p><span><strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/XAMPP\" target=\"_blank\" rel=\"noopener\">XAMPP<\/a> <\/strong>is one of the most commonly used local server applications.\u00a0This application is a derivation of Apache which uses MariaDB for its database, as well as PHP and Perl as its programming language.<\/span><\/p>\n<p><span>XAMPP operating system support is quite extensive.\u00a0You can install this application on Windows, Linux, and Mac OS X.<\/span><\/p>\n<p><span>The good news is, XAMPP is open-source, so you can download and use it for free.<\/span><\/p>\n<p><span>If you want to install WordPress on XAMPP, you can follow the installation guide we discussed.<\/span><\/p>\n<h3><span>2. AMPPS<\/span><\/h3>\n<p><span>Like XAMPP, <strong><a href=\"https:\/\/ampps.com\/\" target=\"_blank\" rel=\"noopener\">AMPPS<\/a> <\/strong>is also an open-source local server application.\u00a0Inside, you will find Apache, MySQL, MongoDB, PHP, Perl, Python, and Softaculous Installer.<\/span><\/p>\n<p><span>Because it has a Softaculous installation feature, AMPPS allows you to install various web applications such as WordPress, Joomla, and Drupal easily in a few clicks.\u00a0However, Softaculous requires an internet connection to do so.<\/span><\/p>\n<p><span>AMPPS can also be used on Windows, Linux, and Mac OS X.<\/span><\/p>\n<h3><span>3. WampServer<\/span><\/h3>\n<p><span><strong><a href=\"https:\/\/www.wampserver.com\/en\/\" target=\"_blank\" rel=\"noopener\">WampServer<\/a> <\/strong>allows you to install Apache, MySQL, and PHP on a local server.\u00a0Like the previous two localhost applications, WampServer can also be downloaded and used for free.<\/span><\/p>\n<p><span>Unfortunately, WampServer is only intended for computers with the Windows operating system.\u00a0If you are a Mac OS X or Linux user, XAMPP and AMPPS are more appropriate choices.<\/span><\/p>\n<h2><span>Use Localhost for<\/span><\/h2>\n<p><span>Now you know what a localhost is, right?\u00a0Generally, the function of localhost is to check the appearance and functionality of a website or web app installed on your computer.\u00a0This is done by typing &#8220;localhost&#8221; or IP address 127.0.0.1 into the address bar in the browser.<\/span><\/p>\n<p><span>In addition to creating a website with offline hosting, localhost is also used when you want to check the condition of the internet connection and block access to certain sites.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For those of you who are just starting to\u00a0learn how to create a website\u00a0, perhaps localhost is one of a myriad of foreign -sounding terms.\u00a0But don&#8217;t worry.\u00a0In this article, you will be guided to understand what localhost is and its uses. What is Localhost? In the context of website programming, your computer is called a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1433,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[163,78,164,162],"class_list":["post-1431","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-2","tag-ampps","tag-server","tag-wampserver","tag-xampp"],"_links":{"self":[{"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/posts\/1431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/comments?post=1431"}],"version-history":[{"count":1,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/posts\/1431\/revisions"}],"predecessor-version":[{"id":2443,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/posts\/1431\/revisions\/2443"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/media\/1433"}],"wp:attachment":[{"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/media?parent=1431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/categories?post=1431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/tags?post=1431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}