0

I installed WordPress with Caddy server in a Centos server. When I was trying to update in dashboard, it required the FTP account.

So I check the authentication of WordPress directory

# ls -l
drwxrwxr-x 5 root caddy 4096 wordpress

and the user & group of caddy.service

# cat /etc/systemd/system/caddy.service

...

[Service]
User=caddy
Group=caddy

You can see the Group Permission of 'wordpress' is r/w/x.

However, Dashboard still requires FTP information unless I change the owner from root to caddy.

But I prefer caddy to root to be the directory owner.

  • Does this answer your question? [Can I install/update WordPress plugins without providing FTP access?](https://stackoverflow.com/questions/640409/can-i-install-update-wordpress-plugins-without-providing-ftp-access) – Bhavanaditya Feb 07 '20 at 12:14

1 Answers1

0

Add the below code in wp-config.php. This may help you.

define('FS_METHOD', 'direct');
Bhavanaditya
  • 548
  • 3
  • 8
  • 23