1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

デプロイ入門 【無料デプロイ】ドメインとDBを使用した自分のサイトを作る infinityFreeの使い方 ⑤デプロイ編

Last updated at Posted at 2025-06-28

前回までの記事を読んでない人はこちら

infinityfreeという無料のレンタルサーバーを使用したデプロイ方法を紹介
サブドメインとDBも無料で使用できます。

1 infinityfreeに登録する。

Googleアカウントなどでログイン後、サイト内のアカウントを作成してください。

2 ドメイン(サブドメイン)を決める

好きなドメインを設定

3 データベースとテーブルを作成

データベースを作成

コントロールパネル→MySQL Databasesを開き、creatDatabaseクリック
適当な名前を決めて完了です。

テーブルを作成

コントロールパネル→MySQL Databasesを開き、PHPMyAdminをクリック
インポート→ファイル(create_rankings_table.sql)をアップロード→実行

これでデータベースとテーブルの設定が完了です。

4 sec.envの内容を修正

sec.envは現在、ローカルホスト用になっているので修正します。

コントロールパネル→MySQL Databasesを開く。

MySQLDBName、MySQLUserName、MySQLPassword、MySQLHostNameを確認します。
確認したものを元にsec.envを書き換えてください。

sec.env
DB_HOST=
DB_NAME=
DB_USER=
DB_PASS=
DB_CHARSET=utf8mb4

5 ファイルをアップロード

コントロールパネル→onlineFileManager→htdocsフォルダ内に作成した全てのファイルをアップロード

デフォルトのindex2.phpを削除

6 ドメインにアクセス

自身で作成したドメインにアクセスして確認してみましょう。

このような画面になれば成功です。(広告は後に追加)

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?