WordPress.org

Ready to get started?Download WordPress

Forums

Can't install plugins without FTP (8 posts)

  1. Anthony Montalbano
    Member
    Posted 2 years ago #

    I have WordPress installed on my own dedicated box, but when I try to install a plugin it asks for FTP information. I know there's certain permissions I need to have in place for it to not ask and just install, but I haven't figured it out yet. I have root access to my box.

    So far I've tried to:
    chown the wp-content folder to www-data

    set the permissions of wp-content to 777 and 755

    I'm not sure what else I can do to get this to work. Any help?

  2. hostyasui
    Member
    Posted 2 years ago #

    If your server uses a different username than what wordpress expects for the site it won’t allow it access without you providing those FTP login credentials every time you need to add, delete or upgrade a plugin.

    you can temporarily add the following lines to wp-config.php files to over ride this issue.

    //*added ftp login credentials to avoid WordPress asking for FTP details every time I wanted to upgrade a plugin*
    define('FTP_HOST', 'ftp.yoursite.com');
    define('FTP_USER', 'Your_FTP_Username');
    define('FTP_PASS', 'Your_FTP_password');
    //*If you can use a SSL connection set this to true*
    define('FTP_SSL', true);

  3. mrbenz
    Member
    Posted 1 year ago #

    I've tried modifying the wp-config as suggested here.

    I've also tried setting wp-content to 777 with no luck
    I've also tried disabling all plugins with no luck
    I've checked the DB-tables and I have wp_capabilities = a:1:{s:13:"administrator";s:1:"1";} and user level = 10.

    Automatic updates works fine. I'm using the 3.4.2 version.

    It's hosted on one.com where I have many other wordpress sites. None of which I have these kind of problems.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    This is probably a server configuration issues (your other sites will be on different servers). You can add your FTP details to your wp-config.php.

  5. mrbenz
    Member
    Posted 1 year ago #

    I've been in contact with one.com and they say it's not anything different with this server than the other ones.

    I've added this to my wp-config:

    //*added ftp login credentials to avoid WordPress asking for FTP details every time I wanted to upgrade a plugin*
    define('*******');
    define('******');
    define('******');
    //*If you can use a SSL connection set this to true*
    define('FTP_SSL', true);

    define('FS_METHOD', 'ftpext');
    define('FTP_BASE', '/**********/');
    define('FTP_CONTENT_DIR', '/*************/');
    define('FTP_PLUGIN_DIR ', '/**************/');
    define('FTP_PUBKEY', '/************');
    define('FTP_PRIKEY', '/*************');

    It still does not work.

    [mod note: removing password & login info]

  6. govindak
    Member
    Posted 1 year ago #

    @mrbez please remove your login details from online :
    It happens because your directory permissions are not set correct. When WordPress cannot directly download a file, it will try to FTP it. Your WordPress files (and directories) need to be owned by the same user and group as what your Apache web server is running as (which is usually “apache”). This allows the web server to write to your WordPress directory.
    So, an easy fix would be to secure shell in to your site and do the following… let's say your WordPress is in the “httpdocs” directory located under /var/www, you would change to the /var/www directory then run “chown -R apache:apache httpdocs”. You run that without the quotes of course, and substitute the correct username in the place of “apache” if your server process runs as a different user. The -R tells it to be recursive so that it will change all of your WordPress files and directories.
    There is one small drawback to doing this… after this, you won't be able to FTP files to the site… you'll have to use the built in WordPress tools for working on your site, adding images, etc. If you ever need to FTP files to the site, you would need to do the same steps as above but change “apache” to your ftp username. After you do your upload, repeat the steps above. You can of course change just single directories… if you always upload in to wp-content/mymedia or something like that, then just “chown” that directory to be owned by your ftp credentials and leave the rest owned by Apache and you'll be able to do both.

  7. mrbenz
    Member
    Posted 1 year ago #

    Don't seem to be able to edit it anymore.

    But why is this the only site I have this problem? I have around 12-15 other sites on the same hosting services but on different domains. I have had no similar problems on the others. Just this one. Why is it different?

  8. mrbenz
    Member
    Posted 1 year ago #

    This worked!

    I went into phpmyadmin, to the wp_options table, and changed db_version back to 8204

    Then I went back to the admin area where it forced a database upgrade and voila! It now works again.

    I guess this had nothing to do with the server but a bug in WordPress. Glad it now works.

Topic Closed

This topic has been closed to new replies.

About this Topic