بِسْمِ اللَّهِ Mudah-mudahan tutorial Upload website ke Hosting ini bermanfaat
Tujuan utama dari pembuatan website adalah agar bisa dilihat, digunakan dan dinikmati oleh user melalui internet. Kali ini akan dibahas bagaimana cara mengirim file-file website yang sudah dibuat ke Hosting. Pada tutorial ini saya akan menggunakan subdomain untuk alamat URL nya, karena domain utama sudah diisi oleh website ini sendiri.
Persiapan Upload website ke Hosting
Yang harus ada sebelum upload:
Hosting dan domain, mungkin bisa dibeli di rumahweb.com (hosting dan domain yang saya gunakan saat ini)
Project Codeigniter, cara membuatnya bisa dilihat disini Codeigniter 4 Pengenalan dan Instalasi
Pertama
Mempersiapkan apa saja yang akan dikirim ke hosting. Yaitu project Codeigniter dan script database.
- Kompres folder dan file project Codeigniter, hal ini sangat diperlukan karena akan mempermudah dalam upload ke hostingnya. Juga pada saat penempatan folder dan file di hosting, disana nanti tinggal di ekstrak saja tanpa perlu repot untuk membuat folder satu per satu.
Silakan kompres folder project Codeigniter. Contoh project yang saya buat contoh-ci. Nama file contoh-ci.zip
- Backup/ekspor database, silakan masuk ke phpmyadmin kemudian pilih database db_ci4 atau nama database Anda kemudian pilih Export
Kemudian klik tombol Go. Biasanya file-nya diberikan nama sesuai dengan nama databasenya “db_ci4.sql“
Kedua
Mempersiapkan subdomain dan database di server.
Masuk ke cpanel hosting Anda
Lewati langkah pembuatan subdomain jika Anda memasangnya pada domain, langsung saja ke pembuatan database
Ke halaman utama Cpanel kemudian cari bagian Domains kemudian klik Subdomains
Disini saya membuat subdomain dengan nama demo, Anda bisa menggunakan nama yang lain
Karena baru dibuat dan belum ada isinya, jika dibuka https://demo.belajardisiniaja.com/ tampilannya akan seperti ini
Selanjutnya buat database yang caranya yaitu dengan pergi ke halaman utama Cpanel kemudian cari bagian Databases kemudian klik MySQL® Databases. Isikan nama database kemudian klik Create Database
Masih di bagian Databases, buat juga User yang bisa mengakses database tersebut. Isikan nama user mysql kemudian klik tombol Create User
Tambahkan akses User pada bagian berikut pilih User kemudian pilih Database, kemudian klik tombol Add
Pilih ALL PRIVILEGES kemudian klik tombol Make Changes
Berikutnya silakan kembali ke halaman utama Cpanel kemudian cari phpmyadmin. Nah ini sama seperti phpmyadmin yang ada di lokal Anda. Disini tinggal buat database kemudian Import file sql yang tadi di Export. Klik Import kemudian klik tombol Choose File, lalu cari file sql hasil ekspor dari database lokal
Sehingga seperti ini kemudian klik tombol Go
Konfirmasi Import has been successfully… menandakan bahwa impor ke database berhasil. Untuk memastikan klik Structure lihat disana apakah tabel sesuai dengan database lokal
Kedua
Upload file ke hosting, sekarang kembali ke halaman utama Cpanel, kemudian cari File Manager pada bagian Files. Klik File Manager
Pastikan aktif pada folder yang paling atas (biasanya susunannya seperti ini /home/nama_user), klik Upload
Klik Select File, kemudian pilih file contoh_ci.zip tadi. Tunggu sampai proses upload selesai kemudian tutup layar ini atau klik Go Back to “/home/…”
Untuk mengektrak file yang tadi diupload. Pilih file contoh-ci.zip kemudian klik Extract
Konfirmasi berikut menandakan ekstrak file berhasil.
Struktur folder kurang lebih seperti ini contoh-ci adalah file-file project Codeigniter yang sudah diupload dan diekstrak. Kemudian public_html/demo adalah root dari subdomain yang tadi dibuat
Klik folder contoh-ci/public kemudian pindahkan seluruh isinya ke public_html/demo
Sehingga public_html/demo berisi folder dan file seperti ini
Update public_html/demo/index.php, pada bagian pathsConfig dengan script ini
$pathsConfig = FCPATH . '../../contoh-ci/app/Config/Paths.php';
Update juga file contoh-ci/.env, pada bagian CI_ENVIRONMENT , app.baseURL dan database. Untuk app.baseURL sesuaikan dengan nama domain Anda. Juga untuk database disesuaikan dengan database Anda
...
CI_ENVIRONMENT = production
...
app.baseURL = 'https://demo.belajardisiniaja.com/'
...
database.default.hostname = localhost
database.default.database = _________db_ci4
database.default.username = _________db_admin
database.default.password = ***************
database.default.DBDriver = MySQLi
database.default.DBPrefix =
...
Jika tidak menggunakan subdomain
Pindahkan seluruh isi contoh-ci/public ke public_html
Akhirnya
Selesai sudah tutorial Upload project Codeigniter 4 ke web hosting. Mudah-mudahan tutorial ini bermanfaat.
Silakan dicoba https://demo.belajardisiniaja.com/
Well I definitely enjoyed studying it. This tip procured by you is very practical for good planning.
Thanks for visit my website, I appreciate that.
Yet another thing I would like to say is that rather than trying to accommodate all your online degree programs on days and nights that you complete work (as most people are tired when they come home), try to receive most of your lessons on the saturdays and sundays and only a couple courses in weekdays, even if it means a little time away from your end of the week. This is fantastic because on the saturdays and sundays, you will be extra rested in addition to concentrated with school work. Many thanks for the different recommendations I have acquired from your weblog.
After research a few of the weblog posts in your web site now, and I actually like your manner of blogging. I bookmarked it to my bookmark website checklist and shall be checking again soon. Pls take a look at my website online as nicely and let me know what you think.
Thanks for visit my website, I appreciate that. Your website is impressive I thinks. Good job
I will right away grab your rss feed as I can not find your email subscription link or e-newsletter service. Do you’ve any? Please let me know so that I could subscribe. Thanks.
No, I don’t have subscription or e-newsletter. This is just a place to share what I’ve done before rather than lost somewhere
Thank you for sharing superb informations. Your web-site is so cool. I’m impressed by the details that you have on this site. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found simply the information I already searched all over the place and simply couldn’t come across. What an ideal web site.
Thanks for visit my website, I appreciate that
Thanks for visit my website
What’s up, this weekend is fastidious in support
of me, because this time i am reading this fantastic
informative post here at my house.
No problem to help You
Hi! Someone in my Facebook group shared this website with us
so I came to give it a look. I’m definitely enjoying the information. I’m book-marking and will be tweeting this to my followers!
Fantastic blog and fantastic design and style.
What’s up, always i used to check blog posts here in the early hours in the morning,
because i love to find out more and more.
Two thumbs up.. You can check my last post
Codeigniter 4 – Menampilkan Data Berita (Lanjutan)
Codeigniter 4 – Melacak Pengunjung Online
I have discovered some new elements from your website about pcs. Another thing I have always considered is that computer systems have become a specific thing that each family must have for many reasons. They offer convenient ways to organize homes, pay bills, search for information, study, focus on music and in some cases watch tv programs. An innovative solution to complete these types of tasks has been a laptop computer. These pc’s are mobile ones, small, robust and convenient.
One thing I’ve noticed is always that there are plenty of misguided beliefs regarding the financial institutions intentions if talking about property foreclosures. One myth in particular is the bank wishes to have your house. The financial institution wants your money, not the home. They want the amount of money they lent you having interest. Preventing the bank will draw any foreclosed final result. Thanks for your article.
Hello, you used to write wonderful, but the last several posts have been kinda boring?I miss your great writings. Past few posts are just a bit out of track! come on!
Thanks you so much for your attention and support.
Thanks for your publication on this web site. From my very own experience, there are occassions when softening upwards a photograph may well provide the photography with a bit of an imaginative flare. Often however, this soft cloud isn’t just what exactly you had as the primary goal and can often times spoil a normally good snapshot, especially if you thinking about enlarging the item.
Makasih gan materinya, muter muter nyari penulisan pathsConfig install ci4 di subdomain, yang work info dari sini.
BTW, sepertinya itu yang komen pake bahasa inggris spamm gan, bikin back link ke webnya, buat naikin SEO.
Alhamdulillah tulisan saya bermanfaat. Terima kasih banyak sudah mengunjungi tulisan saya. dan juga terima kasih banyak juga atas informasi soal spam. Semangat coding…
I have observed that in digital camera models, extraordinary devices help to focus automatically. Those sensors associated with some digital cameras change in contrast, while others work with a beam involving infra-red (IR) light, especially in low light. Higher spec cameras sometimes use a combination of both systems and may have Face Priority AF where the video camera can ‘See’ the face while focusing only on that. Thanks for sharing your thinking on this site.
Appreciate you sharing, great article post.Really thank you! Will read on…
I have seen that nowadays, more and more people are increasingly being attracted to video cameras and the field of photography. However, as a photographer, you will need to first commit so much period deciding the model of photographic camera to buy along with moving store to store just so you may buy the most inexpensive camera of the brand you have decided to choose. But it won’t end right now there. You also have take into consideration whether you should purchase a digital dslr camera extended warranty. Thanks a lot for the good points I received from your blog.
You really make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and extremely broad for me. I’m looking forward for your next post, I抣l try to get the hang of it!
My spouse and i ended up being absolutely joyful Louis could deal with his preliminary research through the entire precious recommendations he grabbed out of the web site. It’s not at all simplistic just to find yourself offering secrets and techniques other people may have been trying to sell. We really know we’ve got the writer to give thanks to for this. Most of the illustrations you’ve made, the easy blog navigation, the relationships you can make it easier to promote – it’s most unbelievable, and it’s helping our son and us reckon that this idea is excellent, which is seriously serious. Many thanks for all!