How to host PHP website via a rental server
This manual is available in both English and Japanese.
Manual of hosting PHP website via a rental server
Overview
This manual provides a step-by-step guide on how to host a PHP website using a rental server service. It covers the basics of what a PHP website is, how to choose a rental server service, and selecting an FTP client software for file transfers. By following this manual, users will gain the knowledge needed to successfully launch their PHP website.
このマニュアルは、レンタルサーバーサービスを使用してPHPウェブサイトをホスティングするためのステップバイステップガイドを提供します。PHPウェブサイトとは何か、レンタルサーバーサービスの選び方、ファイル転送用のFTPクライアントソフトウェアの選択方法について説明します。このマニュアルに従うことで、ユーザーは自分のPHPウェブサイトを成功させるために必要な知識を得ることが期待されています。
Contents
What is PHP website | PHPウェブサイトとは?
PHP (Hypertext Preprocessor) is a popular general-purpose scripting language that is especially suited to web development. A PHP website is one that uses PHP code to generate dynamic content. PHP scripts can run on the server, making it possible to create interactive and dynamic web pages that can communicate with databases, manage sessions, and perform complex calculations.
PHP(Hypertext Preprocessor)は、ウェブ開発に適した人気のある汎用スクリプト言語です。PHPウェブサイトとは、PHPコードを使用して動的なコンテンツを生成するウェブサイトのことです。PHPスクリプトはサーバー上で実行されるため、データベースとの通信、セッション管理、複雑な計算の実行など、インタラクティブで動的なウェブページを作成することが可能です。
Choose a rental server service | レンタルサーバーサービスの選択
When selecting a rental server service for hosting a PHP website, consider the following factors:
- Compatibility: Ensure the server supports PHP, ideally with the latest or your required version.
- Performance: Look for servers with adequate resources (CPU, RAM) to handle your website's traffic and data processing needs.
- Security: Choose providers that offer robust security features, including firewalls, SSL certificates, and regular backups.
- Pricing: Compare plans to find one that offers the best value for your needs and budget.
PHPウェブサイトをホスティングするためのレンタルサーバーサービスを選択する際には、次の点を考慮してください:
- 互換性:サーバーがPHPをサポートしていること、理想的には最新または必要なバージョンを確認した方が良いでしょう。
- パフォーマンス:ウェブサイトのトラフィックとデータ処理のニーズを処理できる十分なリソース(CPU、RAM)を持つサーバーを探した方が良いでしょう。
- セキュリティ:ファイアウォール、SSL証明書、定期的なバックアップなど、堅牢なセキュリティ機能を提供するプロバイダーを選択した方が良いでしょう。
- 価格:ニーズと予算に最適な価値を提供するプランを見つけるために、コスパを比較した方が無難でしょう。
Pick up an FTP client software | FTPクライアントソフトウェアの選択
FTP (File Transfer Protocol) client software is essential for transferring files from your computer to the rental server. Popular FTP clients include:
- FileZilla: A free, open-source option with a user-friendly interface.
- WinSCP: Another free option, known for its strong security features.
- Cyberduck: A versatile client that supports various protocols beyond FTP.
ファイルをコンピューターからレンタルサーバーに転送するためには、FTP(File Transfer Protocol)クライアントソフトウェアが必要です。人気のFTPクライアントには以下のものがあります:
- FileZilla:ユーザーフレンドリーなインターフェースを備えた無料ソフトウエアです。
- WinSCP:強力なセキュリティ機能で知られる無料ソフトウエアです。
- Cyberduck:FTP以外の多数プロトコルをサポートできる汎用性の高いクライアントです。
Procedures
1. Setting Up Your Rental Server | レンタルサーバーのセットアップ
- Sign up for a rental server service that meets your requirements.
- Configure your server settings through the service’s control panel, ensuring PHP support is enabled.
- サインアップ:要件を満たすレンタルサーバーサービスに登録しましょう。
- 設定:サービスのコントロールパネルを通じてサーバー設定を行い、PHPのサポートが有効になっていることを確認しましょう。例:さくらレンタルサーバの機能が記載されているサイト
2. Preparing Your PHP Website | PHPウェブサイトの準備
- Develop your website locally, testing your PHP scripts to ensure they function correctly.
- Organize your website’s files and directories in a clear structure for easy navigation and management. Following figure is an example of the structure of a PHP site folder exported from Lab.js.
- 開発:ローカルでウェブサイトを開発し、PHPスクリプトが正しく機能することを動作確認しましょう。
- 整理:ウェブサイトのファイルとディレクトリを明確な構造で整理し、簡単にナビゲートおよび管理できるようにした方が無難でしょう。例:Lab.jsからエクスポートされたフォルダの構造は以下。

3. Uploading Your Website | ウェブサイトのアップロード
- Install and set up your chosen FTP client software.
- Connect to your rental server using the FTP credentials provided by your rental service.
- Upload your website’s files to the appropriate directory on your server (often
public_htmlorwww).
- インストール:選択したFTPクライアントソフトウェアをインストールし、設定しましょう。例:FileZillaをダウンロードする場合、こちらのサイトにアクセスしましょう。

FileZillaのメインウィンド

- 接続:レンタルサービスから提供されたFTP認証情報を使用して、レンタルサーバーに接続しましょう。Portを埋める必要がありますが、デフォルトとしての21を入力すると普通にいけます。大学などネットセキュリティが整備されている所を経由してネットに接続している場合、22を入力しなければなりません。

- アップロード:ウェブサイトのファイルをサーバー上の適切なディレクトリ(通常は
public_htmlまたはwww)にアップロードしましょう。

References
- PHP.net: For official PHP documentation and tutorials.
- FileZilla official site: For downloading FileZilla FTP clients and accessing their documentation.