1

I've been all over the internet since yesterday before asking. I've just installed wordpress locally using XAMPP.

while trying to install anything it gives me the FTP error where I need to insert them.

enter image description here

I've tried

define('FS_METHOD','direct');

then it doesn't ask for the FTP any longer but instead it gives me.

Unpacking the package…

Could not create directory.

enter image description here

I've tried also to use :

define('FS_METHOD','direct');
define("FTP_HOST", "localhost");
define("FTP_USER", "admin");
define("FTP_PASS", "1234");

same thing, tried to remove first line and leave the FTP lines same thing.

tried to use

chmod 777 /Users/hamudi/.bitnami/stackman/machines/xampp/volumes/root/htdocs/patron/wp-content/themes
chmod 777 /Users/hamudi/.bitnami/stackman/machines/xampp/volumes/root/htdocs/patron/wp-content/plugins

in terminal but nothing happens.

I'M LOSING MY MIND. any chance for help here ? is there a way to access the FTP on local xampp since I thing its only a matter of permissions.

thanks in advance for the help!

Moody Omar
  • 118
  • 1
  • 9
  • 1
    You are `chmod`ing only `themes`folder. Try chmoding also `plugins` folder – Pavel Janicek Mar 31 '21 at 11:06
  • What exactly is `the FTP error`? – ADyson Mar 31 '21 at 11:08
  • @PavelJanicek hey dude , I did for both as I wrote up there. nothing came up in terminal anyway after these commands – Moody Omar Mar 31 '21 at 12:38
  • @ADyson first thing , I managed to install wordpress in the past locally without all these troubles. the only thing I did back then is update my wp-config but thats it. and about the FTP its not error it only asking them from me ill attach a photo – Moody Omar Mar 31 '21 at 12:40
  • @ADyson if I delete these lines from wp-config define('FS_METHOD','direct'); define("FTP_HOST", "localhost"); define("FTP_USER", "admin"); define("FTP_PASS", "1234"); I get back " Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host. " – Moody Omar Mar 31 '21 at 12:48
  • Ok. And if you don't do that, if you leave those lines in place, what happens then? It wasn't clear. – ADyson Mar 31 '21 at 12:56
  • @ADyson sorry if somehow I wasn't clear. installing wordpress on default setting require the FTP details whenever I try to install any plugin .. BUT when I add those lines the FTP request is gone and it shows error : Unpacking the package… Could not create directory. – Moody Omar Mar 31 '21 at 13:16
  • Ok. But you said you wanted to use FTP. So again, what happens when you actually try to upload via FTP? Do you get an error? All you've shown is the screen where you have to enter the FTP credentials...did you enter some and try to proceed? Did you configure the FTP server in XAMPP beforehand? – ADyson Mar 31 '21 at 13:28
  • No I did not say I want to use FTP. The title said unable to install anything on wordpress locally. When I try to install it gives me the FTP picture above. And when I bypass it by entering the line above in wp-confing it gives me Could not create directory. – Moody Omar Apr 01 '21 at 05:32
  • You said specifically `is there a way to access the FTP on local xampp`...so to me that was pretty clear you wanted to get the FTP working, or at least that was your first preference – ADyson Apr 01 '21 at 06:51
  • `And when I bypass it`....yes you've already told us that. But I asked you what happens when you _don't_ bypass it and you actually enter your FTP credentials and click "Proceed". If you don't have any credentials, then go to xampp setup and configure some - see https://stackoverflow.com/a/30707796/5947043 for details – ADyson Apr 01 '21 at 06:54
  • @ADyson I appreciate the time brother, really do. I will try to go this way and configure the FTP , I'll comment back. thanks! – Moody Omar Apr 01 '21 at 08:35
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/230628/discussion-between-moody-omar-and-adyson). – Moody Omar Apr 01 '21 at 09:53

2 Answers2

3

Finally I managed to solved it , although it wasn't so different from the steps above but this solved my problem 100% now I can install plugins do changes and no need for any FTP access.

So in wp-config.php I had to add this line after the

@package WordPress

define( 'FS_METHOD', 'direct' );

and after that in the terminal run this line at the htdocs folder path , in my case the path is :

sudo chmod -R 777 /Users/(myUserName)/.bitnami/stackman/machines/xampp/volumes/root/htdocs 

switch (myUserNmae) with Mac username.

and then system password , Mac user pass.

and it worked for me! hope this will help someone.

thanks for all the replies and help.

Moody Omar
  • 118
  • 1
  • 9
0

Download your plugin and unzip in following directory and once logout and login to wordpress dashboard to see the plugin.

wordpress/wp-content/plugins/

baijugoradia
  • 140
  • 7
  • thanks for the reply , but you are solving a problem for one plugin and this is happening when I try to install any plugin or theme .. – Moody Omar Mar 31 '21 at 12:41