4

I moved a WordPress site to our VPS. In admin I am asked to update plugins, if I do that I am prompted for FTP info. As we don't run FTP on the server this is not possible.

I then changed the the permissions of all of the files to apache:apache using:

chown -R apache:apache *

This fixed the issue and WordPress can now update the files, however, now I cannot edit the files using filezilla. I also tried changing ownership to:

chown -R myuser:apache * 

So that I can edit the files but give apache group access. Now I can edit the files with filezilla but no longer update items in WordPress.

So, what is the correct way to go about this giving me write access on file level but still giving WordPress access to update the files?

mauzilla
  • 3,574
  • 10
  • 50
  • 86
  • Have you tried to `chmod()` your files to give group-write-access to the apache group after you did `chown -R myuser:apache` ? `chmod g+w *` – brombeer Feb 01 '18 at 11:35
  • Read it: https://stackoverflow.com/questions/17922644/wordpress-asking-for-my-ftp-credentials-to-install-plugins – Pawan Thakur Feb 01 '18 at 12:03

2 Answers2

3

Seems file permission issue.

cd wordpress
sudo find . -type d -exec chmod 0755 {} \;
sudo find . -type f -exec chmod 0644 {} \;

and following

define( 'FS_METHOD', 'direct' );

in wp-config.php

or

sudo chown -R www-data:www-data wordpress
Thamaraiselvam
  • 6,961
  • 8
  • 45
  • 71
0

From WHMPanel, Software, Multi PHP Manager, enable Enable PHP-FPM to fix file permissions issues. This prevents the popup appearing asking for FTP credentials.