'Wordpress asking for FTP credentials when trying to install a theme

Before I get started, I'd like to say that I tried almost every solution I could find for this problem but had no luck with them. The most popular solution was adding define( 'FS_METHOD', 'direct' ); to the wp-config.php file but that didn't work either :(

Screenshot of the problem

Both, my co-worker and I installed WordPress at the same time, she's getting nothing like this, maybe cuz she is using a windows machine and I'm using a Mac? And also, I'm using Xaamp. I'm really new to all so any kind of feedback is appreciated! :)



Solution 1:[1]

A quick search on stackoverflow found this:

WordPress asking for my FTP credentials to install plugins

There are a number of different solutions you can try which may resemble your issue with relation to MacOSX.

Solution 2:[2]

I'm too new to post here: WordPress asking for my FTP credentials to install plugins

The solution to this problem for me was my php-fpm configuration. I had the php-fpm user and group set to "www-data" (nginx user) at /etc/php/7.4/fpm/pool.d/user1.conf. I changed both the user and group in the php-fpm configuration to the linux user I created (i.e. /home/user1/) for this app.

I hope this helps someone because it was not listed in the most popular topics in stack.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Aliqua
Solution 2