在网站处理和网络管理方面,WordPress 是用户能做出的最明智选择。由于 WordPress 的巨大优势, it gained 在网页设计师中享有很高人气。根据统计数据, show全球访问量最高的 1000 个网站中,约 35% 是 WordPress 网站(由 WordPress 驱动的网站)。虚拟专用服务器 play 在 WordPress 中起着至关重要的作用。通常建议在 VPS 上安装 WordPress 以获得网络开发的最大优势。如果你在寻找快速安装指南,我们建议观看下面的视频,它提供了简明概述。如需更详细的说明,建议阅读完整文章。
通常情况下,WordPress 的安装程序简单易用。但在 VPS 上安装时,用户可能会遇到困难,因为需要手动在 VPS 上安装 WordPress。这就是为什么我们准备了这篇详尽的文章,告诉你如何快速、无忧地在 VPS 上安装 WordPress。有多种方法可以实现,但我们认为最简单的方法是使用 cPanel 进行安装。该程序的各个步骤包含在下面。
Start Blogging
在一流硬件上自托管 WordPress,采用 NVMe 存储和全球最低延迟,选择你喜欢的发行版。
获取 WordPress VPS在 VPS 上安装 WordPress(分步指南)
以下是在 VPS 上安装 WordPress 的完整分步指南。
第 1 步:下载 WordPress
首先,你需要下载最新版本的 WordPress。你可以在 wordpress.org/download/

Click on the “Download WordPress” button.
第 2 步:将 WordPress 上传到你的 VPS
下载 zip 文件后,需要将其上传到你的 VPS。这需要一个 cPanel 账户。你也可以使用 FileZilla 和 Cyberduck 等 FTP 程序,但如前所述,cPanel 是这里最便捷的方式。因此,我们将继续用 cPanel 来完成本教程。
登录您的账户,打开 cPanel 文件管理器选项。

在文件管理器中找到 public_html 目录并点击它。

如果这是你第一次使用 cPanel File Manager,需要为你的网站创建一个新文件夹。如果已经有了,跳过这一步即可。
点击「+ Folder」按钮。

文件夹可以随意命名(我们建议用你的域名作为文件夹名)。 Open the folder you have just created, and then click on the “Upload” button above.

In the opened window, click on the “Select File” and select the WordPress zip file you downloaded earlier.

等待上传完成,然后点击下方链接重新进入文件目录。

Reload the page, once you are back. You will see the zip file you have just uploaded. Select it and click on the “Extract” button.

现在,你需要确认 提取文件的位置. Make sure it is a correct location, then, click on the “Extract File(s)”.

WordPress 现在已在你的文件目录中。如果需要,你可以安全地从文件目录删除它的 zip 文件。
第 3 步:将 WordPress 文件移至根目录
我们现在已经有了所有 WordPress 文件。只需要把它们移到正确的位置。打开 WordPress 文件夹,选中里面的所有文件。

点击「移动」按钮,将所选文件移动到 public_html 目录。

Once the location is selected, click on the “Move File(s)”.

第 4 步:创建新数据库
快完成了!现在需要创建一个新数据库。 Return to your cPanel. Find the “MySQL Database Wizard” below and click on it.

现在,你需要给数据库起个名字。我们建议用简单易记的名字,因为后续步骤还会用到它。 Once you are finished, click on the “Next Step”.

Now you should provide a username and password for the created database. When you are done, click on the “Create User”.

In the opened window, you need to confirm the privileges of your account. Simply check the “All Privileges” option.

您的数据库已创建。
注意:请记下数据库的名称、用户名和密码。连接 WordPress 到数据库时需要用到这些信息。
第 5 步:编辑 wp-config-sample.php 文件
成功创建数据库后,你需要确保 WordPress 使用这个数据库。只需编辑 wp-config-sample.php 文件即可。
Go to the public_html directory, find the wp-config-sample.php file, and select it. Then click on the “Edit” option.

在这个示例文件中,你需要找到并替换 3 行特定的代码,以确保文件能够连接到你之前创建的数据库。
First, locate:
[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ]define( ‘DB_NAME’, ‘database_name_here’ );[/ht_message]
然后,将 database_name_here 替换为你的数据库名称。
然后,找到:
[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ]define( ‘DB_USER’, ‘username_here’ );[/ht_message]
现在,将 database_name_here 替换为你的数据库名称。
And locate:
[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ]define( ‘DB_USER’, ‘username_here’ );[/ht_message]
然后,将 username_here 替换为你之前定义的用户名。
最后,找到:
[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ]define( ‘DB_PASSWORD’, ‘password_here’ );[/ht_message]
然后将 password_here 替换为你之前设置的密码。
现在,你需要从 WordPress API 复制并粘贴一组新的 Salt Key。进入 Salt Key 生成器,把里面的内容全部复制下来就行。

然后,用你刚才复制的盐密钥替换 wp-config-sample.php 文件中的盐密钥行。 Once you are done copying, click on the “Save Changes”.

PHP 文件不再是示例文件。请关闭它并将其重命名为 wp-config.php。

步骤 6:安装 WordPress
Go做得好!您已经完成了在 VPS 上安装 WordPress 的所有前置步骤。现在,访问您的网站并开始常规安装流程即可。前往 yourwebsite.com/wp-admin/install.php。
如果 WordPress 文件在其他位置(比如 WordPress),你需要访问 yourwebsite.com/WordPress/wp-admin/install.php。
Congratulations,现在您已成功在虚拟专用服务器上安装了 WordPress。我们知道在 VPS 上手动安装 WordPress 并非易事,但这确实值得付出努力。在虚拟专用服务器上使用 WordPress 能为您的网站管理体验和搜索排名带来众多优势。
Start Blogging
在一流硬件上自托管 WordPress,采用 NVMe 存储和全球最低延迟,选择你喜欢的发行版。
获取 WordPress VPS一个建议 – Cloudzy cPanel VPS 服务
我们建议在 VPS 上安装 WordPress 的最佳方式是通过 cPanel。这意味着用户首先需要在 VPS 上安装 cPanel,然后才能开始 WordPress 的安装流程。通常情况下,VPS 提供商不会预装 cPanel。
But, this is not the case for Cloudzy’s top-tier VPS plans. We are offering the best-in-the-world cPanel VPS plans (VPSs that have an already installed cPanel) to worldwide users. Our cPanel VPS can be really beneficial for the users who are looking to have the ultimate and trouble-free WordPress hosting experience. So, we highly recommend you 详细了解 Cloudzy 的强大功能 cPanel VPS (例如其 NVMe 存储和 1 Gbps 速度)。
Also Read: 共享主机 VS VPS
Conclusion
我们刚才演示了如何通过 cPanel 在 VPS 上安装 WordPress。如你所见,手动安装 WordPress 有些复杂。不过我可以告诉你,这个教程采用的方法已经是最简单的了。我们还为你介绍了 Cloudzy。 cPanel VPS 可以为您简化 WordPress 的安装(以及其他实用优势)。如果您不确定 哪种 VPS 主机能满足 WordPress 的需求,在做决定前读一下这篇文章。
通过这篇教程,你能够自己安装 WordPress 到 VPS 上。但如果安装过程中遇到问题,可以直接在下方评论区留言,或者联系我们的技术团队寻求帮助。 HERE.
FAQ
我可以在 VPS 上使用 WordPress 吗?
当然可以!你可以在虚拟私人服务器上手动安装 WordPress,并享受它的优势。
在 VPS 上安装 WordPress 的最佳方式是什么?
我们认为,使用 cPanel 是在 VPS 上安装 WordPress 最直接、最便捷的方式。
我能在 VPS 上自己安装 WordPress 吗?
可以,你可以通过 cPanel 在 VPS 上安装 WordPress(见上文)。
安装 WordPress 需要 cPanel VPS 吗?
cPanel VPS 不是必需的。不过我们建议安装,因为系统已经预装了 cPanel,可以帮助你安装 WordPress。