mauzilla
mauzilla

Reputation: 3592

WordPress Plugin update asking for FTP

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?

Upvotes: 4

Views: 3960

Answers (3)

Hari
Hari

Reputation: 69

in wp-config.php line saying /* Add any custom values between this line and the "stop editing" line. */

define('FS_METHOD','direct');define('FS_CHMOD_DIR',0755);define('FS_CHMOD_FILE',0644);

Upvotes: 0

John Tulley
John Tulley

Reputation: 1

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

Upvotes: 0

Thamaraiselvam
Thamaraiselvam

Reputation: 7080

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

Upvotes: 3

Related Questions