Pi WordPress asks for ftp credidentials

Recently, I have installed a LAMP server on my Raspberry Pi B+ running Raspbian 7 (Jessie) and when I try to install a plugin or theme it asks for FTP credidentials. Does anyone know how to fix this? Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Visit Stack Exchange Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up. Sign up to join this community Recently, I have installed a LAMP server on my Raspberry Pi B+ running Raspbian 7 (Jessie) and when I try to install a plugin or theme it asks for FTP credidentials. Does anyone know how to fix this? This should be able to be fixed by either providing the FTP credentials in your wp-config.php file (in the root directory of the WordPress install) or by changing ownership of the WordPress install. I recommend the changing ownership option. On my Debian WordPress server (not Raspbian, but regular Debian Wheezy), my entire installation is owned by user and group named www-data. You can check the ownership of your installation with these two lines (hit enter after each one). cd /var/www
ls -l

That will tell you which user and group owns each file/directory in /var/www. It will be in the form of user:group . You can change the entire ownership of your installation by: sudo chown -R www-data:www-data ./[name of WordPress folder]

That will recursively change ownership and group of everything in your WordPress folder to the user that I am pretty sure Raspbian wants to use. You can define some extra credentials in your wp-config.php file according to a WordPress codex article. define( ‘FTP_USER’, ‘username’ );
define( ‘FTP_PASS’, ‘password’ );
define( ‘FTP_HOST’, ‘ftp.example.org:21’ );

Though I am not sure if you also then have to figure out configuring the FTP server on the RPi. Hope this gets you going! When I change owrneship of WordPress folder as www-data user and group, I cannot write files when I connect from FTP with the root user. If I give the folder ownership to the root user, I cannot install plugins through the WordPress dashboard. What is the solution to this?

This content was originally published here.