Error: Unable to Connect to FTP Server During WordPress Plugin Installation
While attempting to install a plugin from the WordPress admin panel, you might encounter the following message:
“Unable to connect to FTP server”
This error can occur even if your FTP credentials (username and password) are correct and work properly in tools like FileZilla.
Possible Cause
The issue is often related to the value entered in the Hostname field during the FTP connection prompt. WordPress commonly tries to connect using an address like ftp.yoursite.com
, which may not resolve correctly in some hosting environments.
Recommended Solution
To fix the issue, simply change the Hostname field value to localhost
. Here's the correct configuration to use:
- Hostname:
localhost
- Username: your FTP account username
- Password: your FTP account password
This minor adjustment allows WordPress to connect locally to the FTP server, resolving the issue and enabling plugin installation without further errors.