Mac TutorialsWordPress

how to Fix Failed to Connect to FTP Server Error on Localhost

Hey, In this article, I’m going to discuss, how to fix failed to connect to FTP server error on localhost. When I log into my dashboard and try to customize it, I found some error like connection information and it asks for FTP username and password.how to fix failed to connect to ftp server error on localhost

In the previous article, we locally host WordPress on Mac using XAMPP. Now, we are ready to create a website. 1st of all, you have to log into the backend of your website. For that, open your web browser and type localhost/name of your database/wp-admin and hit enter. Enter your credentials and log in.

Now, you are on the backend of your website. Here, you can customize your website and make it responsive, customize it and make it more attractive. But when I log in here and try to customize my website, you will get some error.

To check error exist or not, click on plugins and try to delete default plugins. I’m sure you will find some error like enter your FTP username and password to continue. If you don’t have this issue then you are ready to go but if you have this issue then stick with this article until the end. I’m sure, you will fix failed to connect to FTP server error on localhost.

Step-by-step video tutorial guide;

There are several reasons for having this error but we are solving this by two methods, if you fail while trying 1st method then you should try 2nd one. In my case, when I found this error I tried both and then I solved it. So, without any further due let’s dive into it.

How to Fix Failed to Connect to FTP Server Error on Localhost

Change the file permissions of the database

Ist you have to locate this file. For that, you have to go to Applications- Xampp- xampfiles- htdocs- wordpress (in my case). Once you locate this file, right click on it or simply press Command+I. So, the info window will open. Go to last option, Sharing & Permissions. Click on the drop-down button. Now, 3 options will open. how to fix failed to connect to ftp server error on localhost

These all have same privileges Read & Write or something else but you have to change these to Read Only. Once you do that, click on the lock icon, which is located on the bottom right corner. Enter your credentials and unlock it. Again you have to change the permissions from Read Only to Read & Write for all.

Read More: How To Install WordPress Locally With XAMPP

Now, click on setting button right there and select Applied to Enclose Items. It will ask your permission because you can’t undo that process. Once you were done you are ready to go!how to fix failed to connect to ftp server error on localhost

Now, it’s time to check, log into the backend of your website and go to plugins and try to delete anyone. If you delete it, it means your problem is solved. Otherwise, try another method.

Insert the code into wp-config.php filehow to fix failed to connect to ftp server error on localhost

You will find this file here; Applications- Xampp- xampfiles- htdocs- wordpress (in my case)- wp-config.php make sure only use wp-config.php not wp-config-sample.php. Once you get this file, open it in the text editor. Now, insert this code into starting with the command on the wp-config.php file.

define('FS_METHOD', 'direct');

Once you insert this code into wp-config.php, save this file. Now, you are ready to go! Again check on your website by deleting any plugin. I’m damn sure, you will succeed. Now, you are ready to customize your website.how to fix failed to connect to ftp server error on localhost

So, in this way, you can fix failed to connect to FTP server error on localhost. I hope you like this article. Thumbs if you like and share if you love. Leave your comments below and tell me you having the same issue and you solved it or not?

Subscribe newsletter/RSS for latest updates.

See you in the next one.

Thank You.


Also published on Medium.

Tags

Lokesh Aryan

I'm Founder & Blogger at lokesharyan.com, Electrical Engineer, SEO Analyst, Blogger & Influencer.

Related Articles

Close