Unable to connect to the filesystem. Please confirm your credentials
Asked Answered
P

9

5

I tried to install Elementor plugin for wordpress on Mac in localhost, but the installation has failed. These are the details:

Hostname: /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins

Ftp Username: root

Password:

With password I got this error alert:

Failed to connect to FTP Server /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins:21

With no password I got this error alert:

Unable to connect to the filesystem. Please confirm your credentials.

I search for similar cases and found that I have to add this line to the code:

define('FS_METHOD','direct’);

and then I got this message:

Installation failed. could not create directory.

I’m not familiar with code writing, and I’m new to Wordpress, I would greatly appreciate your help.

Regards

Permeable answered 28/7, 2019 at 10:24 Comment(3)
I think your single quote is not same in syntax. Please use this -> define('FS_METHOD','direct');Clatter
Thanks. Does it matter where this line is written in the code?Permeable
Yes, you need to add this line in wp-config.php at the end.Clatter
C
14

try this command as it will not expose your entire html to hackers and this works in my case

sudo chown -R www-data:www-data /var/www/html/your-project-name
Colemancolemanite answered 11/6, 2020 at 7:20 Comment(1)
chown: www-data: illegal group nameCrank
E
4

It's probably due to lack of required filesystem permissions. Try this:

sudo chown -R www-data:www-data /var/www

En answered 12/11, 2019 at 19:48 Comment(1)
This is a great way to get your system owned by hackers.Current
P
2

This is an easy way without any commands, Add this code in wp-config.php anywhere.

define( 'FS_METHOD', 'direct' );
Pukka answered 4/10, 2022 at 11:37 Comment(0)
F
1

Macbook Solution:

Step 1:

edit /Applications/XAMPP/xamppfiles/etc/httpd.conf and replace

User daemon
Group daemon

to

User YOUR_MACBOOK_USER_NAME   // apple
Group GROUP_NAME              // admin

after Step 1, you need to restart xampp, if you do not get your problem solve than follow Step 2

Step 2:

run this command

sudo chown -R YOUR_MACBOOK_USER_NAME:GROUP_NAME /Applications/XAMPP/xamppfiles

// like this

sudo chown -R apple:admin /Applications/XAMPP/xamppfiles

OR

sudo chmod -R 777 /Applications/XAMPP

Ubuntu Solution:

run this command on terminal

sudo chown -R www-data:www-data /var/www

Forkey answered 18/3, 2022 at 12:47 Comment(0)
C
1

I see this error on Macbook, so I handle it the same as @Muhammad Numan instructed. Now, it worked

Step 1: edit /Applications/XAMPP/xamppfiles/etc/httpd.conf and replace

User daemon Group daemon to

User YOUR_MACBOOK_USER_NAME // apple Group GROUP_NAME // admin

Chitarrone answered 30/8, 2022 at 16:38 Comment(0)
U
0

I also had this issue. Solution is go to applications/xampp/htdocs and right click on the wordpress folder on which you are trying to install plug-in or theme. click get info, scroll to bottom, click on the lock to unlock it and type in your password and enter, in sharing and permissions allow privilege to system,admin and everyone and click on the setting icon in bottom left and apply to enclosed items.

Urion answered 3/5, 2020 at 7:50 Comment(0)
K
0

give the permissions use the following commands:

sudo chown -R www-data:www-data /var/www/html;

sudo find . -type d -exec chmod 755 {} /;

sudo find . -type f -exec chmod 644 {} /;
Kowloon answered 26/4, 2023 at 5:28 Comment(1)
Are you sure you want find .? Not find /var/www/html, or some other absolute path?Sturmabteilung
H
0

You have to follow these steps to continue using WordPress smoothly:

  1. First provide the permission using root user by running the command-line:

    chmod -R 777 <path-of-your-WordPress-folder>
    
  2. If you want to install any plugin without using any FTP server, simply paste the following in your wp-config.php file

    define( 'FS_METHOD', 'direct' );
    
Haplography answered 2/9, 2024 at 9:38 Comment(0)
B
-1

This works for my mac !!

  1. In wp-config.php,add this define( 'FS_METHOD', 'direct' );
  2. In command line, execute sudo chmod -R 777 /Applications/XAMPP

Done

Bedridden answered 10/11, 2022 at 13:29 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.