在本地机器上安装一个主题.我是否需要 FTP 数据连接? [英] Install a theme in local machine. Should I need the FTP data connection?

查看:27
本文介绍了在本地机器上安装一个主题.我是否需要 FTP 数据连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我第一次在本地主机上安装了 wordpress.

I have just installed wordpress at my localhost for the first time.

我想安装一个主题,它会询问我的 FTP 用户名和密码.

I want to install a theme, and it asks me about my FTP username and password.

它说:要执行请求的操作,WordPress 需要访问您的网络服务器.请输入您的 FTP 凭据以继续.如果您不记得您的凭据,您应该联系您的网络主机."

It says this: "To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host."

我想知道 wp 通常是直接安装在生产网络服务器上还是可以先安装在本地机器上...我该怎么办?

I'm wondering if wp is usually directly installed in the production web server or if it could be installed first in a local machine... What should I do?

推荐答案

将此添加到您的 wp-config.php

Add this to your wp-config.php

define('FS_METHOD','direct');

由于 Linux 具有更严格的文件系统,因此您可以直接写入文件夹.

Due to Linux having such a more restrictive file system, this will enable to you write directly to the folder.

这将在安装新插件或主题时解决 ftp 问题.

This will solve that ftp problem while installing a new plugin or theme.

这篇关于在本地机器上安装一个主题.我是否需要 FTP 数据连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆