• Resolved Amit Maskara

    (@wallends)


    I am new to WP and my knowledge is just barebones, so please be kind.

    Few months back, I installed WP on a pay per use hosting company – NearlyFreeSpeech dot net. I created a new DB and then installed WP. Things looked good so far. I was able to install a theme, install plugins etc. and build the site. Then I ran into a few plugins, which were causing the site to crash, when I would activate them. Error was pointing to me having to put in the FTP credentials each time I needed to update the plugins. So, I did some search and found that the error was coming from FS not having direct access to WP files. The solution I found was to add this code to my wp_condif file: define( ‘FS_METHOD’, ‘direct’ );

    After this, the original error of website crashing when activating a few plugins was fixed. However, now I was running into a bigger issue – most if not all plugins were failing to update. Error was inconsistency with file permission and not being able to write all files. So, I have been reading how to fix WP file permission and found that I could do it from FTP/ SFTP tool and temporary change the file permission recursively to all files with 666 (not safe but okay to just try). I did this for wp_config and wp_includes dir. However, the issue persisted. So I disabled FS_Method = direct and updated my plugins, entering the ftp credentials into the prompt box manually. But now I am back to some of the plugins crashing the site.

    If anyone knows what is going wrong and can guide me, I will appreciate it a lot. I did notice that my DB (maria DB) has a different user name than the FTP/SFTP credentials to the hosing server. So it could be that the WP files are owned by user x (ftp credentials) while the DB user is user Y, causing permission issues? I am not sure, as I am not an expert in this. Please help!!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Jorge Luiz

    (@jluizsouzadev)

    Please, enable the WP debugging and report any error/warning messages you have got.

    Thread Starter Amit Maskara

    (@wallends)

    Thanks Jorge, after enabling logging, I am getting this:

    Notice: ob_end_flush(): Failed to send buffer of zlib output compression (0) in /home/public/wp-includes/functions.php on line 5464

    Jorge Luiz

    (@jluizsouzadev)

    Have carefully look at this Stack Overflow’s post. There several solutions that could maybe solve your issue.

    However, I highly recommend you to back your site up first for avoiding further headaches.

    Thread Starter Amit Maskara

    (@wallends)

    I was able to finally fix the issue using the following code in the wp-config.php file. Using FS_METHOD as direct was causing my issues.

    define( ‘FTP_USER’, ‘ftp username’ );
    define( ‘FTP_PASS’, ‘ftp pw’ );
    define( ‘FTP_HOST’, ‘ftp url’ );
    define( ‘FTP_PORT’, ’21’ );
    define( ‘FS_METHOD’, ‘ftpext’ );

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘If I set FS Method to Direct Plugins fail to update’ is closed to new replies.