简体   繁体   中英

Wordpress FTP not working on my Linode VPS

I'm having trouble updating my plugins through wp-admin on my Linode VPS. I can connect via FTP client and write to any directory but when I try the same username / pass but with the hostname set to localhost in wp-admin, I get:

 ERROR: There was an error connecting to the server, Please verify the settings are correct.

Is there a setting I'm overlooking?

If WordPress is asking you for FTP information, you need to look at your file ownership & permissions. Your WordPress files should be owned by the same user as your web server (most likely www-data) and that user needs to have permission to write to those files. If those are set correctly, WordPress will be able to access the filesystem directly and not need to go through FTP for any installs or upgrades.

I'm working on a plugin called Upgrade First Aid which should help with troubleshooting these sorts of issues in WordPress 3.6 and higher. You can download the latest version here and upload it to your site. Activate it, and it will add a new menu item under "tools" to check your file permissions.

You need to modify the ownership. Try this command:

chown -R www-data ~/public/example.com/public

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM