如何使用直接管理在网站上安装 wordpress

How to install wordpress on website using direct admin

我是 wordpress 的完全菜鸟,我正在尝试将它安装到我的服务器上。

我正在按照 this site but when I get to step 5 and I go to the http://example.com/direct-admin/install.php 上的说明操作 我收到此错误:

Not Found
The requested URL /wp-admin/install.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

在我的文件夹 'example.com' 中,位于 'domains' 文件夹中,我一开始只使用统计和日志文件夹。我第一次在 'example.com' 文件夹中添加 Wordpress 文件。

我尝试添加 public_html 文件夹并将 Wordpress 文件放在 public_html 文件夹中,但这也不起作用。

如何在我的网站上安装 wordpress?

您使用的是什么服务器?有几种安装 WordPress 的方法,我强烈建议使用 WordPress CLI 安装 WordPress。您所要做的就是按照以下步骤操作:

  1. 使用 these five steps 下载 WordPress CLI。

  2. 现在使用 CLI 下载 WordPress: $ wp core download

  3. 创建 wp-config.php 文件 $ wp core config --dbname="your_db_name" --dbuser="your_db_user" --dbpass="your_db_password"

然后您可以将您的网站 URL 放入浏览器并继续按照向导操作,WordPress 会询问您要使用的站点名称、用户名和密码。

如果您在设置 wordpress 安装时遇到问题并且收到 404 错误或 "apache is function normally" 那么可能是您的 DNS/server 设置不正确,这是我的错误。

首先尝试使用简单的文本编辑器创建一个 .html 文件,方法是将下面的 html 标记复制到一个新文件中,然后将其另存为 index.html

<!DOCTYPE html>
<html>
<body>

<h1>My First Heading<h1/>

<p>My first paragraph.</p>

</body>
</html>
</code></pre>

并将其上传到您的服务器。

如果您仍然遇到错误,您知道不是 wordpress 安装导致这些错误,而是您的服务器设置。

你应该:

  • 检查您是否将它放在正确的文件夹中(如 f.e。public_html)

  • 确保您的 DNS 配置正确

查看 this answer 了解有关如何设置服务器以查看简单 .html 文件的更多信息。