<?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>PHP Archives - Onestring Lab</title>
	<atom:link href="https://onestringlab.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>https://onestringlab.com/tag/php/</link>
	<description>Kode Kreativitas Kopi</description>
	<lastBuildDate>Mon, 04 May 2026 08:38:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://onestringlab.com/wp-content/uploads/2021/10/cropped-osl-high-res-e1455499003866-32x32.jpg</url>
	<title>PHP Archives - Onestring Lab</title>
	<link>https://onestringlab.com/tag/php/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>TIPS &#8211; Hosting PHP Gratis di Heroku</title>
		<link>https://onestringlab.com/hosting-php-gratis-di-heroku/</link>
		
		<dc:creator><![CDATA[Rajo Intan]]></dc:creator>
		<pubDate>Wed, 29 Dec 2021 16:22:30 +0000</pubDate>
				<category><![CDATA[Kreatifitas]]></category>
		<category><![CDATA[Gratis]]></category>
		<category><![CDATA[Heroku]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://onestringlab.com/?p=636</guid>

					<description><![CDATA[<p>Hosting PHP gratis merupakan hal yang sangat disukai oleh para pengembang aplikasi berbasis web. Pada umumnya hosting PHP ditempatkan pada jasa penyewaan hosting yang banyak &#8230; </p>
<p>The post <a href="https://onestringlab.com/hosting-php-gratis-di-heroku/">TIPS &#8211; Hosting PHP Gratis di Heroku</a> appeared first on <a href="https://onestringlab.com">Onestring Lab</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hosting PHP gratis merupakan  hal yang sangat disukai oleh para pengembang aplikasi berbasis web. Pada umumnya hosting PHP ditempatkan pada jasa penyewaan hosting yang banyak tersedia di internet. Namun tentu saja,  jasa hosting tersebut tidaklah gratis alias berbayar. Pada artikel ini akan dibahas mengenai langkah-langkah instalasi atau deploy PHP di <a href="https://www.heroku.com/" target="_blank" rel="noreferrer noopener">Heroku</a>.</p>



<h2 class="wp-block-heading">Daftar di Heroku</h2>



<p>Langkah pertama adalah mengunjungi webiste Heroku dan lakukan pendaftaran. Seperti terlihat pada gambar-gambar berikut ini.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img fetchpriority="high" decoding="async" width="891" height="927" src="https://onestringlab.com/wp-content/uploads/2021/12/hero_1.jpg" alt="" class="wp-image-646" srcset="https://onestringlab.com/wp-content/uploads/2021/12/hero_1.jpg 891w, https://onestringlab.com/wp-content/uploads/2021/12/hero_1-288x300.jpg 288w, https://onestringlab.com/wp-content/uploads/2021/12/hero_1-768x799.jpg 768w" sizes="(max-width: 891px) 100vw, 891px" /><figcaption class="wp-element-caption">Pendaftaran atau sign up pada webiste Heroku</figcaption></figure>
</div>


<p>Setelah pendaftaran, selanjutnya adalah melakukan verifikasi melalui aplikasi <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&amp;hl=en&amp;gl=US" target="_blank" rel="noreferrer noopener">Google Authenticator</a>. Install aplikasi ini di handphone. Pilihlah one-time password generators pada menu yang terlihat seperti pada gambar dibawah ini.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="566" height="794" src="https://onestringlab.com/wp-content/uploads/2021/12/hero_4.jpg" alt="" class="wp-image-648" srcset="https://onestringlab.com/wp-content/uploads/2021/12/hero_4.jpg 566w, https://onestringlab.com/wp-content/uploads/2021/12/hero_4-214x300.jpg 214w" sizes="(max-width: 566px) 100vw, 566px" /><figcaption class="wp-element-caption">Verifikasi 2 arah dari Heroku</figcaption></figure>
</div>


<p>Gunakan aplikasi yang Google Authenticator yang telah dipasang di HP untuk melakukan scanner QR Code yang keluar pada layar monitor. Kemudian masukkan kode yang dikeluarkan oleh aplikasi tesebut. Pada contoh gambar dibawah ini aplikasi mengeluarkan kode angka 391118.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="582" height="952" src="https://onestringlab.com/wp-content/uploads/2021/12/hero_5.jpg" alt="" class="wp-image-651" srcset="https://onestringlab.com/wp-content/uploads/2021/12/hero_5.jpg 582w, https://onestringlab.com/wp-content/uploads/2021/12/hero_5-183x300.jpg 183w" sizes="(max-width: 582px) 100vw, 582px" /><figcaption class="wp-element-caption">Masukkan kode QR Code authenticator.</figcaption></figure>
</div>


<h2 class="wp-block-heading">Membuat aplikasi di Heroku</h2>



<p>Bila proses registrasi berhasil maka akan tampak seperti gambar seperti dibawah ini.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="646" src="https://onestringlab.com/wp-content/uploads/2021/12/hero_6-1024x646.jpg" alt="" class="wp-image-656" srcset="https://onestringlab.com/wp-content/uploads/2021/12/hero_6-1024x646.jpg 1024w, https://onestringlab.com/wp-content/uploads/2021/12/hero_6-300x189.jpg 300w, https://onestringlab.com/wp-content/uploads/2021/12/hero_6-768x484.jpg 768w, https://onestringlab.com/wp-content/uploads/2021/12/hero_6.jpg 1278w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>kliklah tombol create new app untuk membuat tempat aplikasi yang akan di deploy pada Heroku. Pada layar akan tampak seperti gambar dibawah ini. Masukkanlah nama aplikasi yang dikehendaki. Pada contoh dibawah ini nama aplikasinya adalah phpappku.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="688" height="456" src="https://onestringlab.com/wp-content/uploads/2021/12/hero_7.jpg" alt="" class="wp-image-660" srcset="https://onestringlab.com/wp-content/uploads/2021/12/hero_7.jpg 688w, https://onestringlab.com/wp-content/uploads/2021/12/hero_7-300x199.jpg 300w" sizes="auto, (max-width: 688px) 100vw, 688px" /><figcaption class="wp-element-caption">Membuat app pada Heroku</figcaption></figure>
</div>


<h2 class="wp-block-heading">Install Hero CLI</h2>



<p>Langkah berikutnya adalah melakukan instalasi aplikasi Hero CLI. Aplikasi dapat diunduh pada halaman  <a href="https://devcenter.heroku.com/articles/heroku-cli" target="_blank" rel="noreferrer noopener">The Hero CLI</a> seperti yang terlihat pada gambar dibawah ini.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="778" height="944" src="https://onestringlab.com/wp-content/uploads/2021/12/hero_8.jpg" alt="proses deploy hosting PHP gratis di Heroku" class="wp-image-664" srcset="https://onestringlab.com/wp-content/uploads/2021/12/hero_8.jpg 778w, https://onestringlab.com/wp-content/uploads/2021/12/hero_8-247x300.jpg 247w, https://onestringlab.com/wp-content/uploads/2021/12/hero_8-768x932.jpg 768w" sizes="auto, (max-width: 778px) 100vw, 778px" /><figcaption class="wp-element-caption">Mengunduh aplikasi Heroku CLI.</figcaption></figure>
</div>


<h2 class="wp-block-heading">Membuat folder kerja</h2>



<p>Pada langkah selanjutnya adalah membuat folder kerja pada perangkat PC/laptop atau pc yang digunakan. Contohnya seperti yang terlihat pada gambar berikut ini.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="824" src="https://onestringlab.com/wp-content/uploads/2021/12/image-24-1024x824.png" alt="Membuat folder kerja aplikasi PHP" class="wp-image-666" srcset="https://onestringlab.com/wp-content/uploads/2021/12/image-24-1024x824.png 1024w, https://onestringlab.com/wp-content/uploads/2021/12/image-24-300x241.png 300w, https://onestringlab.com/wp-content/uploads/2021/12/image-24-768x618.png 768w, https://onestringlab.com/wp-content/uploads/2021/12/image-24.png 1279w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Membuat folder kerja aplikasi PHP</figcaption></figure>



<p>ketikkan perintah berikut ini untuk login secara remote ke Heroku.</p>



<pre class="wp-block-preformatted">$ heroku login</pre>



<p>Buatlah sebuah file, misalkan bernama index.php yang berisikan kode berikut ini</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="843" src="https://onestringlab.com/wp-content/uploads/2021/12/hero_8-1-1024x843.jpg" alt="" class="wp-image-678" srcset="https://onestringlab.com/wp-content/uploads/2021/12/hero_8-1-1024x843.jpg 1024w, https://onestringlab.com/wp-content/uploads/2021/12/hero_8-1-300x247.jpg 300w, https://onestringlab.com/wp-content/uploads/2021/12/hero_8-1-768x632.jpg 768w, https://onestringlab.com/wp-content/uploads/2021/12/hero_8-1.jpg 1278w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Melakukan login ke Heroku</figcaption></figure>



<h2 class="wp-block-heading">Membuat Heroku buildpack: PHP</h2>



<p>Pada langkah ini akan dilakukan untuk memberitahukan kepada Heroku bahasa pemrograman apa yang digunakan. Pada contoh ini akan digunakan bahasa pemrograman PHP. Tulisan perintah berikut ini.</p>



<pre class="wp-block-preformatted">$ echo {} &gt; composer.json
$ heroku create --buildpack https://github.com/heroku/heroku-buildpack-php.git</pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="839" src="https://onestringlab.com/wp-content/uploads/2021/12/heroku_9-1-1024x839.jpg" alt="proses deploy hosting PHP gratis di Heroku" class="wp-image-679" srcset="https://onestringlab.com/wp-content/uploads/2021/12/heroku_9-1-1024x839.jpg 1024w, https://onestringlab.com/wp-content/uploads/2021/12/heroku_9-1-300x246.jpg 300w, https://onestringlab.com/wp-content/uploads/2021/12/heroku_9-1-768x629.jpg 768w, https://onestringlab.com/wp-content/uploads/2021/12/heroku_9-1.jpg 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Membuat file composer.json dan buildpack:PHP</figcaption></figure>



<h2 class="wp-block-heading">Deploy hosting PHP gratis</h2>



<p>Berikut ini adalah proses terakhir yang akan dilakukan untuk deploy hosting PHP gratis di Heroku. Jalankan bebera pa perintah berikut ini.</p>



<pre class="wp-block-preformatted">$ git add .
$ git commit -am "deploy hosting PHP gratis"
$ git push heroku master</pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="837" src="https://onestringlab.com/wp-content/uploads/2021/12/heroku_11-1024x837.jpg" alt="proses deploy hosting PHP gratis di Heroku" class="wp-image-680" srcset="https://onestringlab.com/wp-content/uploads/2021/12/heroku_11-1024x837.jpg 1024w, https://onestringlab.com/wp-content/uploads/2021/12/heroku_11-300x245.jpg 300w, https://onestringlab.com/wp-content/uploads/2021/12/heroku_11-768x628.jpg 768w, https://onestringlab.com/wp-content/uploads/2021/12/heroku_11.jpg 1282w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Deploy hosting PHP gratis di Heroku</figcaption></figure>



<h2 class="wp-block-heading">Tampilan hosting PHP gratis di Heroku</h2>



<p>Setelah berhasil proses deploy pada Heroku maka aplikasi yang dibuat sudah dapat diakses melalui alamat website yang diberikan oleh Heroku. Pada contoh kali ini alamatnya adalah https://phpappku.herokuapp.com. Tampilan halaman website akan terlihat seperti dibawah ini.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://onestringlab.com/wp-content/uploads/2021/12/heroku_12-1024x576.jpg" alt="Tampilan deploy hosting PHP gratis di Heroku" class="wp-image-682" srcset="https://onestringlab.com/wp-content/uploads/2021/12/heroku_12-1024x576.jpg 1024w, https://onestringlab.com/wp-content/uploads/2021/12/heroku_12-300x169.jpg 300w, https://onestringlab.com/wp-content/uploads/2021/12/heroku_12-768x432.jpg 768w, https://onestringlab.com/wp-content/uploads/2021/12/heroku_12.jpg 1366w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Tampilan deploy hosting PHP gratis di Heroku</figcaption></figure>



<h2 class="wp-block-heading">Kesimpulan Hosting PHP Gratis</h2>



<p>Proses untuk melakukan instalasi di Heroku dapat dikatakan cukup mudah walau harus melakukan beberapa tahapan. Proses yang telah dilakukan merupakan spesifikasi dasar dari kebutuhan aplikasi berbasis PHP. Untuk proses instalasi database dapat dieksplorasi langsung melalui website Heroku.  Artikel serupa dapat dikunjungi melalui menu <a href="https://onestringlab.com/category/kreatifitas/">kreatif</a><a href="https://onestringlab.com/category/kreatifitas/" target="_blank" rel="noreferrer noopener">i</a><a href="https://onestringlab.com/category/kreatifitas/">tas</a>.</p>
<p>The post <a href="https://onestringlab.com/hosting-php-gratis-di-heroku/">TIPS &#8211; Hosting PHP Gratis di Heroku</a> appeared first on <a href="https://onestringlab.com">Onestring Lab</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
