• I’m trying to update to WP 4.2.2, but it requires FTP details.

    Considering that everything WP-related is assigned to apache, and the servers runs as apache, WP shouldn’t be able to upgrade without FTP?

    WordPress is in the root. Here’re the file owner/permissions:

    /var/www (root) 750 user www group apache
    All WP folders 755 user apache group apache
    All WP files 644 user apache group apache

    Problem with FTP is, only user www has FTP access, but it can’t work on directories assigned to apache:apache, and also, my server doesn’t allow ftp from outside the network

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    You will need FTP details only if you want to update WordPress through FTP. As an alternative, you can see other options to update WordPress.

    https://codex.wordpress.org/Updating_WordPress

    An ideal approach should be following structure:

    /home/username/public_html ………750…..ownerhip of username
    /home/username/public_html/all-folders ………755…..ownerhip of username
    /home/username/public_html/all-files ………644…..ownerhip of username

    /var would have ownership of root.

    Thanks,

    Just a quick change to wp-config.php

    define('FS_METHOD','direct');

    That’s it, enjoy your wordpress updates without ftp!

    Alternate Method:

    There are hosts out there that will prevent this method from working to ease your WordPress updating. Fortunately, there is another way to keep this pest from prompting you for your FTP user name and password.

    Again, after the MYSQL login declarations in your wp-config.php file, add the following:

    define("FTP_HOST", "localhost");
    define("FTP_USER", "yourftpusername");
    define("FTP_PASS", "yourftppassword");

    Thread Starter daimpa

    (@daimpa)

    Hi @ravipatel and @accuwebhosting , first of all thanks for your replies

    I’m on a centos virtual machine.

    I did a mistake, my root is: “/home/username/”, assigned to “username” with 750. Where in the first post I wrote “wwww”, please consider “username”

    Documentation says: file ownership: all of your WordPress files must be owned by the user under which your web server executes. In other words, the owner of your WordPress files must match the user under which your web server executes

    So I think that it should be correct to have files assigned to apache as my server runs as apache.

    Plugin updates fine without using FTP.

    define('FS_METHOD','direct');
    Is this a standard thing that everyone has to do, or just a workaround that *should* work, but may cause some problems? If it’s the second case, then I’d prefer to find what’s wrong in my wordpress configuration and fix it.

    Hi,

    Documentation says: file ownership: all of your WordPress files must be owned by the user under which your web server executes. In other words, the owner of your WordPress files must match the user under which your web server executes

    I believe following is an ideal approach and is widely followed:

    /home/username/public_html ………750…..ownerhip of username
    /home/username/public_html/all-folders ………755…..ownerhip of username
    /home/username/public_html/all-files ………644…..ownerhip of username

    Under this approach, your WordPress website will run under ownership of username itself.

    Is this a standard thing that everyone has to do, or just a workaround that *should* work, but may cause some problems?

    Ultimate goal is to just install pluign,you can choose any method. Following are some popular methods.

    Install a Plugin using WordPress Admin Panel Search Option
    Install a Plugin using Upload Method in WordPress Admin Panel
    Install a Plugin using FTP Manager

    https://codex.wordpress.org/Managing_Plugins

    Thanks,

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

The topic ‘Why wordpress 4.2.2 requires FTP to update?’ is closed to new replies.