เว็บนี้มีลิงก์ affiliate บางลิงก์ — เราอาจได้รับค่าคอมมิชชันหากสมัครผ่านลิงก์เหล่านั้น · Some links are affiliate links. รายละเอียด
คู่มือ · FTP & File Management

FTP คืออะไร? วิธีใช้ FTP อัพโหลดไฟล์บน Hosting ไทย 2026

FTP คืออะไร? วิธีใช้ FTP อัพโหลดไฟล์บน Hosting ไทย 2026

FTP (File Transfer Protocol) คือโปรโตคอลมาตรฐานสำหรับการถ่ายโอนไฟล์ระหว่างคอมพิวเตอร์กับ server ผ่านเครือข่าย เจ้าของเว็บไซต์ใช้ FTP เพื่ออัพโหลดไฟล์ HTML, รูปภาพ, และไฟล์อื่นๆ ไปยัง hosting server

FTP (File Transfer Protocol) is the standard protocol for transferring files between computers and servers over a network. Website owners use FTP to upload HTML files, images, and other content to their hosting server.

FTP vs SFTP vs FTPS

มีโปรโตคอลการถ่ายโอนไฟล์หลายแบบที่ควรรู้จัก:

แนะนำ: ใช้ SFTP เสมอถ้า hosting รองรับ (ส่วนใหญ่ port 22) เพราะข้อมูล credentials และไฟล์ถูกเข้ารหัสทั้งหมด

Recommendation: Always use SFTP if your hosting supports it (usually port 22). All credentials and file transfers are fully encrypted.

ใช้ FileZilla เชื่อมต่อ FTP

FileZilla คือ FTP client ที่ฟรีและนิยมมากที่สุด รองรับ Windows, Mac, Linux

  1. Download FileZilla จาก filezilla-project.org
  2. เปิด FileZilla → กรอก Quickconnect bar ด้านบน:
    Host: ftp.yourdomain.com หรือ ns1.hosting-server.com
    Username: FTP username ที่ได้จาก hosting
    Password: FTP password
    Port: 21 (FTP) หรือ 22 (SFTP)
  3. คลิก Quickconnect
  4. ฝั่งซ้าย = ไฟล์ในคอมพิวเตอร์, ฝั่งขวา = ไฟล์ใน server
  5. ลากไฟล์จากซ้ายไปขวาเพื่ออัพโหลด หรือจากขวาไปซ้ายเพื่อ download

FileZilla is the most popular free FTP client, supporting Windows, Mac, and Linux. Download from filezilla-project.org. Fill in the Quickconnect bar: Host (ftp.yourdomain.com), Username, Password, Port (21 for FTP, 22 for SFTP). Left panel = your computer, Right panel = server. Drag files from left to right to upload.

แนะนำAsiaGB.com — Web Hosting & VPS ที่เราแนะนำ เซิร์ฟเวอร์ในไทยและสิงคโปร์ สตอเรจ SSD จัดการผ่าน DirectAdmin พร้อมทีม Support ภาษาไทย 24 ชั่วโมง uptime 99%

AsiaGB.com — hosting & VPS we recommend: TH/SG servers, SSD storage, DirectAdmin, 24h Thai support, 99% uptime.

เยี่ยมชม AsiaGB →

สร้าง FTP Account ใน DirectAdmin

  1. Login DirectAdmin → Extra FeaturesFTP Management
  2. คลิก Create FTP Account
  3. กรอก Username, Password และ Home Directory (โฟลเดอร์ที่ FTP account นี้เข้าถึงได้)
  4. คลิก Create

ควรสร้าง FTP account แยกสำหรับแต่ละ developer หรือ contractor และกำหนด Home Directory ให้จำกัดเฉพาะโฟลเดอร์ที่จำเป็น ป้องกันการเข้าถึงไฟล์อื่นโดยไม่ได้รับอนุญาต

File Permissions (chmod)

File permissions กำหนดว่าใครสามารถอ่าน เขียน หรือรันไฟล์ได้ ค่า permission ใน Linux/Unix ใช้ตัวเลข 3 หลัก:

Common permissions: 755 = folders (owner can execute/write, others can read), 644 = HTML/CSS/JS files (owner can write, others can read), 600 = config files with passwords (owner only), 777 = everyone can do everything (dangerous — avoid for important files).

FTP Commands พื้นฐาน (Command Line)

ถ้าต้องการใช้ FTP ผ่าน command line:

ftp ftp.yourdomain.com # เชื่อมต่อ
ls    # แสดงไฟล์
put file.html  # อัพโหลดไฟล์
get file.html  # download ไฟล์
bye   # ตัดการเชื่อมต่อ

คำถามที่พบบ่อย (FAQ)

FTP password ลืมต้องทำอะไร?

เข้า DirectAdmin → FTP Management → แก้ไข account → เปลี่ยน password ใหม่ได้เลย ไม่ต้องติดต่อ support

อัพโหลดไฟล์ผ่าน FTP แล้วเว็บไม่อัพเดท ต้องทำอะไร?

ลอง hard refresh browser (Ctrl+Shift+R) ก่อน ถ้าใช้ Cloudflare หรือ CDN อาจต้องเคลียร์ cache ที่นั่นด้วย หรือรอ cache หมดอายุ

SFTP ต้องใช้ port อะไร?

SFTP ทำงานผ่าน SSH ใช้ port 22 โดยทั่วไป ต่างจาก FTP ที่ใช้ port 21 ใน FileZilla ให้เปลี่ยน port เป็น 22 และ protocol เป็น SFTP

ทำไม FTP เชื่อมต่อไม่ได้?

สาเหตุที่พบบ่อย: username/password ผิด, ไม่ได้เปิด FTP access, firewall บล็อก port 21, host ผิด ลอง passive mode ถ้าอยู่หลัง NAT/firewall