To upload files to the server of your PHP website, you typically use FTP (File Transfer Protocol) or an integrated file manager provided by your hosting control panel (like cPanel). Here’s a general guide using both methods:
Using FTP (File Transfer Protocol):
-
Obtain FTP Credentials:
- Log in to your hosting account and navigate to the FTP section. Obtain the FTP server address, username, password, and port (if different from default).
-
Choose an FTP Client:
- Download and install an FTP client software like FileZilla (free and widely used) on your computer.
-
Connect to the Server:
- Open FileZilla (or your chosen FTP client) and enter the FTP server details:
- Host: FTP server address (e.g., ftp.yourdomain.com)
- Username: FTP username provided by your hosting provider
- Password: FTP password associated with the username
- Port: Default is 21, but your hosting provider may specify a different port
- Open FileZilla (or your chosen FTP client) and enter the FTP server details:
-
Establish Connection:
- Click on "Quickconnect" or "Connect" to establish a connection between your computer and the server.
-
Navigate to Web Root Directory:
- Once connected, the right-hand panel of FileZilla will display files and directories on your server. Navigate to the directory where your PHP website files should be uploaded. This is often named
public_html,www, or similar.
- Once connected, the right-hand panel of FileZilla will display files and directories on your server. Navigate to the directory where your PHP website files should be uploaded. This is often named
-
Upload Files:
- In the left-hand panel (local site), navigate to the directory containing your PHP website files on your computer.
- Select the files or directories you want to upload and drag them to the corresponding directory on the server (right-hand panel).
-
Monitor Transfer:
- FileZilla will show the progress of each file upload. Wait until all files are successfully uploaded to the server.
-
Verify Files:
- After uploading, you can verify the files by accessing your website through a web browser. Ensure everything displays and functions as expected.
Using cPanel File Manager (Alternative Method):
-
Log in to cPanel:
- Access your cPanel account using your hosting provider’s login credentials.
-
Navigate to File Manager:
- Look for the "File Manager" icon or link within the cPanel dashboard, usually found under the "Files" section.
-
Select Web Root Directory:
- In the File Manager, navigate to the directory where your PHP website files should be uploaded (often
public_htmlorwww).
- In the File Manager, navigate to the directory where your PHP website files should be uploaded (often
-
Upload Files:
- Click on the "Upload" button in the File Manager toolbar.
- Use the file uploader to select the files or directories from your local computer that you want to upload.
- Once selected, click on "Upload" to transfer the files to the server.
-
Monitor Upload Progress:
- The File Manager will display the progress of each file upload. Wait until all files are uploaded successfully.
-
Verify Files:
- After uploading, verify that the files have been correctly transferred by accessing your website through a web browser.
By following these steps, you can upload your PHP website files to the server using either FTP or cPanel File Manager, depending on your preference and access level provided by your hosting provider.