Install WordPress Plugins without FTP Access

WordPress will only prompt you for your FTP connection information

while trying to install plugins or a wordpress update

if it cannot write to /wp-content directly.

Otherwise, if your web server has write access to the necessary files,

it will take care of the updates and installation automatically.

This method does not require you to have FTP/SFTP or SSH access,

but it does require your to have specific file permissions set up on your webserver.

It will try various methods in order, and fall back on FTP if Direct and SSH methods are unavailable.

http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/file.php#L866

WordPress will try to write a temporary file to your /wp-content directory.

If this succeeds, it compares the ownership of the file with it’s own uid,

and if there is a match it will allow you to use the ‘direct’ method of

installing plugins, themes, or updates.

Now, if for some reason you do not want to rely on the automatic check for which filesystem method to use,

you can define a constant, 'FS_METHOD' in your wp-config.php file that is

either 'direct' 'ssh', 'ftpext' or 'ftpsockets' 

and it will use method.

Keep in mind that if you set this to ‘direct’ but your web user

(the username under which your webs server runs)

does not have proper write permissions, you will receive an error.

If you do not want to (or you cannot) change permissions on wp-content

so your web server has write permissions, then add this to your wp-config.php file:

define('FS_METHOD', 'direct');

To maintain a higher level of security, Rolet servers set the permissions on the

/wp-content directory to read only for apache.

Although this can be changed via SSH, FTP and through your control panel,

we highly recommend that you enter the FTP credentials each time you install or update a plugin.

The server and credentials can be remembered by your browser to make it quicker

to install plugins and only requires an extra click.

If your website is hosted on Rolet’s cPanel servers, the FTP credentials

to enter will be the same username and password combination

as your cPanel account or any other FTP account with access to the /wp-content directory.

 

posted @   IAmAProgrammer  阅读(412)  评论(0编辑  收藏  举报
(评论功能已被禁用)
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
历史上的今天:
2013-06-07 RTOS Semaphore Services
点击右上角即可分享
微信分享提示