Connect to WordPress with FTP or SFTP
Connecting to your WordPress site via FTP (File Transfer Protocol) or SFTP (SSH File Transfer Protocol) lets you directly upload, download, and manage the files that make up your website—themes, plugins, uploads, and configuration files. This is essential when you need to manually install a plugin, edit a file like wp-config.php, or troubleshoot a white screen of death. You’ll need an FTP client (like FileZilla, Cyberduck, or WinSCP) and your hosting account’s FTP credentials—hostname, username, and password. Most hosts also offer SFTP, which encrypts your connection and is more secure than standard FTP.
What You’ll Need
- An FTP client installed on your computer (FileZilla is free and works on Windows, macOS, and Linux).
- Your FTP hostname (often your domain name or an IP address like
ftp.yourdomain.com). - Your FTP username and password (usually provided by your web host; sometimes the same as your cPanel login).
- The port number if your host uses a non-standard port (default is 21 for FTP, 22 for SFTP).
- If you’re using SFTP, you may also need your SSH private key or password, depending on your host’s setup.
Step-by-Step
- Find your FTP credentials. Log into your hosting control panel (cPanel, Plesk, or a custom panel) and look for a section called “FTP Accounts” or “FTP Access.” If you don’t see it, check your host’s welcome email or support docs. If you’re using SFTP, look for “SSH Access” or “SFTP” settings. Note the hostname, username, and password.
- Open your FTP client. Launch FileZilla (or your chosen client). You’ll see a quick connect bar at the top with fields for Host, Username, Password, and Port.
- Enter your connection details. In the Host field, type your FTP hostname (e.g.,
ftp.yourdomain.com). For SFTP, you can prefix withsftp://(e.g.,sftp://ftp.yourdomain.com) or just enter the hostname and select SFTP in the protocol dropdown. Enter your username and password. Leave the Port blank unless your host specifies a different one (default 21 for FTP, 22 for SFTP). - Connect. Click “Quickconnect.” If it’s your first time connecting to this server, you may see a certificate warning—review it and accept if you trust the host. The client will connect and show a list of files on the remote server (usually in the right panel).
- Navigate to your WordPress root folder. On the remote server, look for the directory where WordPress is installed. This is often
public_html,htdocs,www, or a subfolder likepublic_html/wordpress. If you’re not sure, look for files likewp-config.phpor folders likewp-content—that’s your WordPress root. - Upload or download files. To upload a file from your computer (left panel) to the server (right panel), drag it from the left to the right. To download, drag from right to left. You can also right-click and select “Upload” or “Download.” For folders, drag the entire folder to transfer everything inside.
- Set file permissions (if needed). If you need to change file permissions (e.g., to make a file writable), right-click the file on the server, select “File permissions,” and enter a numeric value like 644 for files or 755 for folders. Be careful—incorrect permissions can break your site.
- Disconnect when done. Right-click the server name in the connection bar and select “Disconnect,” or just close the client.
Common Mistakes
- Using the wrong hostname. Some hosts use a specific FTP hostname like
ftp.yourdomain.comorftp.yourhostingaccount.com. Using your domain name alone might not work. - Confusing FTP with SFTP. If your host only supports SFTP, you must use an SFTP client or select SFTP in your client. Standard FTP won’t work.
- Uploading to the wrong folder. Uploading files to the wrong directory (e.g., above
public_html) won’t affect your site. You must be in the WordPress root. - Editing files directly on the server. It’s safer to download a file, edit it locally, and upload it back. Editing directly on the server can lead to corrupted files if the connection drops.
- Ignoring permission errors. If you get a “permission denied” error when uploading, you may need to change the folder permissions or use a different account.
Tips
- Always use SFTP when available. It encrypts your login and data, protecting you from eavesdropping. Most hosts support SFTP on port 22.
- Keep a local backup. Before making major changes (like updating a plugin manually), download the files you’re modifying to your computer.
- Use a dedicated FTP client. While your browser can sometimes access FTP, it’s not reliable for managing many files. FileZilla or Cyberduck are better.
- Bookmark your connection. In FileZilla, you can save your site’s details in the Site Manager (Ctrl+S) for quick reconnection.
- Check file ownership. If you’re on a shared host, files should usually be owned by your user account, not root. If you see ownership issues, contact your host.
Troubleshooting
- Connection timed out. Check that you’re using the correct hostname and port. Some hosts block FTP on port 21; try SFTP on port 22. Also, ensure your firewall or antivirus isn’t blocking the connection.
- Authentication failed. Double-check your username and password. If you’re using SFTP, you may need to use your SSH password or key, not your FTP password. If you’ve forgotten your password, reset it in your hosting control panel.
- Can’t see any files. You might be in the wrong directory. Look for a folder named
public_html,www, orhtdocs. If you still see nothing, contact your host for the correct path. - Upload fails with “permission denied.” This usually means the folder is not writable by your FTP user. Try changing the folder permissions to 755 or 775, or ask your host to adjust ownership.
- FileZilla shows “Could not connect to server.” This could be a firewall issue, or the server might be down. Try pinging the hostname, or check your host’s status page.
- After uploading, the site breaks. You likely uploaded a file to the wrong location or overwrote a critical file. Restore the original file from your backup or re-upload the correct version.
Frequently Asked Questions
What is the difference between FTP and SFTP?
FTP (File Transfer Protocol) sends data in plain text, including your username and password. SFTP (SSH File Transfer Protocol) runs over an encrypted SSH connection, so your credentials and files are protected. Always use SFTP if your host offers it.
Can I use FTP to edit my WordPress files directly?
Yes, but it’s not recommended for editing files like wp-config.php because a mistake can break your site. Instead, download the file, edit it locally with a text editor, and upload it back.
I don’t know my FTP username or password. Where can I find them?
Check your hosting welcome email, or log into your hosting control panel (cPanel, Plesk) and look under “FTP Accounts.” You can often reset the password there. If you’re using managed WordPress hosting, you may need to contact support.
Why do I see a certificate warning when connecting?
That’s normal for SFTP connections. The warning means the server’s certificate isn’t signed by a public CA. As long as you’re connecting to the correct hostname, you can accept it. For FTP, there’s no certificate, so you won’t see this.
What should I do if my FTP client is slow?
Try switching to SFTP (if available) as it may be faster. Also, limit the number of simultaneous transfers in your client settings. If you’re downloading large folders, consider zipping them on the server first (via cPanel) and downloading the archive.
Can I use FTP to install a WordPress plugin?
Yes. Download the plugin ZIP file, extract it locally, then upload the folder to wp-content/plugins/ on your server. After uploading, go to your WordPress admin and activate the plugin. Alternatively, you can upload the ZIP via the WordPress admin’s “Upload Plugin” button, which uses FTP if your server is configured for it.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.