When we develop Website using WordPress on Linux using Xampp or Lampp, while installing Plugins WordPress asks FTP details. This happens due to wordpress folder’s user ownership issue.
How to know user name, create a php file user.php with code
<?php echo exec(‘whoami’); ?>
Run this file on localhost, if you use xampp outout will daemon and if you use lampp output will be
We will solve this problem using Command chown to Change both the owner and group of folder in single command.
What is chown – To change owner, change the user and/or group ownership of each given File to a new Owner. Chown can also change the ownership of a file to match the user/group of an existing reference file.
Now open terminal or konsole run this command to change user and group of wordpress folder.
sudo chown -R user:group /path/to/directory
for xampp sudo chown -R daemon:daemon /opt/lampp/htdocs/wordpress folder name
Now you can install plugins, theme on just one click.
You can also watch my YouTube video Solve WordPress FTP Error while Installing plugins on Linux at https://youtu.be/UIgv7VRP_S0 Video if you have any problem with this tutorial. Please subscribe to our channel and share this tutorial.