Jeay's blog

    • Home
    • Archives
    • Tools

在linux下的WordPress每次安装主题或插件都需要FTP用户名密码怎么办?

By Jeay

Published 2015-01-13

用FTP工具打开网站根目录,找到wp-config.php

末尾加一段话:

1
2
3
4
if(is_admin()) {
add_filter(‘filesystem_method’, create_function(‘$a’,’return “direct”;’ ));
define(‘FS_CHMOD_DIR’, 0751);
}

以后安装和windows下一样,不会再提示需要FTP用户名密码了。

wordpress
wordpres
上一篇:
简单解决WordPress谷歌字体与Gravatar头像速度慢的问题

Categories

  • front2
  • js3
  • php3
  • server22
  • tools9
  • wordpress2
  • 前端2

Tags

  • centos10
  • 运维10
  • php7
  • apache6
  • linux5
  • 前端4
  • 包管理4
  • ubuntu4
  • mysql4
  • 科学上网4
  • javascript3
  • shadowsocks3
  • 服务器3
  • sass2
  • vscode2
  • nodejs2
  • composer2
  • github2
  • blog2
  • 服务器安全2

Weibo

Steam

Links

  • 生成随机字符串
  • 安装nodejs
  • LNMP环境搭建
  • 密钥登录配置
  • Cerbot
  • Londy
  • 技术团队Blog

Talents come from diligence,
and knowledge is gained by accumulation.

Powered by hexo and Theme by Jacman © 2023 Jeay 备案号:豫ICP备16039722号