Often time we need connect to our hosting server using FTP client but sometimes it is not possible and we get stuck with errors and can’t find any solution of that problem. One of the most faced problems by the users is failed to retrieve directory listing, the most common error faced by users when uploading or downloading their website on the server. This article will help you to fix this error and you will be able to connect to the server and upload or download your website code. Here is the screen shot of the error we are going to solve today.
First of all make sure that you have valid hostname, Username and a valid password. Yes, you need to have valid port number too. If you don’t have a FTP account, then log into your Cpanel using the credentials given you by your hosting provider, go to FTP accounts and create a user and set password for it. Remember to give the path to your public_html directory in order to list your website files in whatever FTP client you are using. We are going to use filezilla here. When you are creating your ftp user account, make sure that you set the path to public_html directory to successfully upload or download your code files.
So Lets get started.
STEP – 1
Install the filezilla and open it .Go to File Menu at the top left corner of the filezilla and click on it. You will the see the first option as the Site Manager, Click on the site Manager.
Step -2
After clicking the Site Manager a Popup Box will appear. Look for the option of New Site.
Step -3
Now Click on New site button and type your domain name in text box.
Step -4
Now type your domain name and on the right side of the same popup box the following information will appear. Type the host ip address or your domain name. Give port number as 22. From protocol choose file transfer protocol, from encryption choose only use Plain ftp option, use login type as Normal and put the credentials of your ftp account and click connect.
By following these steps you will be able to get rid of this error. Connection is established with the server but client is unable to see the directory listings. Make sure that you valid credentials and correct path to public_html directory while creating the FTP account from the cPanel. If the path of ftp account is not set to public_html then after connecting it will land you to the path you specified and you will not be able to upload your site in the correct directory.
As you can see, after completing the steps mentioned above you can fix the “failed to retrieve directory listing” error. “Directory Listings successful message” shows that you are connected and the directories will be shown at the bottom of the client window.