TurnKey Linux Virtual Appliance Library

Wordpress and SFTP

Hi again, I try to update a newly installed WP appliance, a form to be filled in shows up. I fill it in and mark sftp, but the connection is refused.

I have tried different as host: localhost, localhost:22, 192.168.0.195, 192.168.0.195:22.

User root and password.

Nothing works :S

Jeremy's picture

I'm not clear

I undertand you are trying to ugrade Wordpress but as I am unfamilar with the process so perhaps you could give a little more detail of the steps you are taking. It would also potentially be useful to know the client software you are using to conect via SFTP (etc) and upload a screenshot of the "form" you are speaking of.

Personally I usually do all my work on TKL appliances remotely using a combination of Web browser, Filezilla (cross platform SFTP client) and Terminal/PuTTY (SHH in Linux terminal works well, PuTTY under Windows).

I know the tools you use, but

I know the tools you use, but I want the management of the site to be as simple as possible because I am only the developer and others thats is unfamiliar with web, ftp, ssh... should be able to manage the site.

In this case it is an update/upgrade within worpress, this form do not always come up on every wp installation.

 

I did create a new install

I did create a new install and this form do not show up, but glad if you have some sort of an idea? :)

Jeremy's picture

SFTP & FTPS are not the same

They are similar but different:

SFTP = SSH FTP

FTPS = FTP over SSL

Glad you got it sorted, not sure how you'll go if you reencounter this issue.

None the wiser

I read the article and the following comments. It is not easy to pick out he right answer here.

The OP did not work for me, although after trying so many alternatives, it is hard to tell whether I have made a mess three times over that cannot be fixed.

Solution

I worked this out and thought I might share:

My solution:

  1. Log into webmin (https://<server address>:12321/)
  2. Open File Manager (Located Tools > File Manager)
  3. Once File Manager has loaded (requires java), navigate to folder /var/www
  4. select the folder "wordpress" and click the "Info" button on the file manager toolbar
  5. You will get a window appear. In the ownership box, about half way down the window, type "www-data"
  6. In the "Apply changes to" box, at the bottom of the window, change to "this directory and all subdirectories and files"
  7. Click "Save". It may take a minute before the window unfreezes, depending on how many files you have in the wordpress folder

Wordpress should no longer ask for FTP info.

This should be useful for any users who stuble upon this problem later. This thread is currently the first result in google if you type "Turnkey Wordpress sftp"

Jeremy's picture

Actually you only need to change permissions on a subfolder

Namely:

/var/www/wordpress/wp-content

Also there is a tweak to do to the config file too (to make sure it doesn't ask - in some scenarios it will still ask...). In wp-config.php add:

define('FS_METHOD', 'direct');

Note: it must be added before the line:

/* That's all, stop editing! Happy blogging. */

Good to know

Good to know which folder WordPress needs to access.

I didn't need to change the config file myself, but I will change the config if any more problems arise.

Thanks.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)