博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
一键式在DigitalOcean上安装WordPress
阅读量:2509 次
发布时间:2019-05-11

本文共 6003 字,大约阅读时间需要 20 分钟。

powers 36% of the web and has been a staple in the blogging and website industry for a while now. The first versions of were built on WordPress!

36%的网络,并且在博客和网站行业中已经很长一段时间了。 的第一个版本是基于WordPress构建的!

is a fantastic tool that has come a long way. You can use it to:

是一个很棒的工具,已经走了很长一段路。 您可以使用它来:

  • Power your website

    为您的网站供电
  • Use as a Headless CMS via

    通过用作无头CMS

We'll talk more on the uses of WordPress in other articles. For this article, we'll focus on installing on .

在其他文章中,我们将更多地讨论WordPress的用法。 对于本文,我们将重点介绍在上安装 。

( )

has a where there are applications that we can deploy with 1-click.

拥有一个 ,其中包含一些我们可以一键式部署的应用程序。

There are popular tools we can install quickly like WordPress, Ghost CMS, Strapi, Node, and more.

我们可以快速安装一些流行的工具,例如WordPress,Ghost CMS,Strapi,Node等。

( )

We can find the on the DigitalOcean Marketplace:

我们可以在DigitalOcean市场上找到 :

The installation instructions on this page are good to read through. We'll be following along with this and also bringing in our own screenshots for our walkthrough.

本页上的安装说明很容易阅读。 我们将随之而来,并为演练带来自己的屏幕截图。

Let's give the Create WordPress Droplet button a click. We are taken to our DigitalOcean dashboard where we can configure and create a new droplet.

单击“ 创建WordPress Droplet”按钮。 我们被带到DigitalOcean仪表板,可以在其中配置和创建新的Droplet。

Let's keep the standard setup with the $40 droplet. You can change this based on your site traffic and needs. You could use a smaller droplet while getting your project off the ground and then resize it later.

让我们使用40美元的小滴保持标准设置。 您可以根据网站流量和需求来更改此设置。 您可以在将项目搁浅时使用较小的液滴,然后再调整大小。

Be sure to pick the location closest to your customers.

确保选择最接近客户的位置。

Another important part of the setup to focus on is the SSH keys. This is how you will login to your newly created droplet.

设置中要重点关注的另一个重要部分是SSH密钥。 这是登录新创建的Droplet的方式。

You'll be taken back to your dashboard where you can see your new droplet being created!

您将被带回到仪表板,在那里您可以看到正在创建的新液滴!

Notice that I have a few domains sitting in my DigitalOcean account. A domain is required to setup the WordPress install.

请注意,我的DigitalOcean帐户中有几个域。 需要一个域来设置WordPress安装。

一键式DigitalOcean WordPress安装附带了什么? (What comes with this 1-Click DigitalOcean WordPress install?)

This install does a few things out of the box for us. It's convenient since we won't have to install a lot of this ourselves:

此安装为我们提供了一些开箱即用的功能。 这很方便,因为我们不必自己安装很多这样的工具:

  • Enables the UFW firewall to allow only SSH (port 22, rate limited), HTTP (port 80), and HTTPS (port 443) access.

    启用UFW防火墙以仅允许SSH(端口22 ,限速),HTTP(端口80 )和HTTPS(端口443 )访问。
  • Sets the MySQL root password, runs mysql_secure_installation, and creates a wordpress user with the necessary permissions. Note, the Droplet root user will not be prompted for the MySQL password.

    设置MySQL的root密码,运行mysql_secure_installation ,并创建一个具有必要权限的wordpress用户。 注意,Droplet根用户将不会被提示输入MySQL密码。
  • Sets up the debian-sys-maint user in MySQL so the system’s init scripts for MySQL will work without requiring the MySQL root user password.

    在MySQL中设置debian-sys-maint用户,以便MySQL的系统初始化脚本可以运行而无需MySQL root用户密码。
  • Creates the initial WordPress configuration file to set up and allow the WordPress instance to connect to the database.

    创建初始WordPress配置文件以设置并允许WordPress实例连接到数据库。
  • Disables XML-RPC to help prevent DDoS and other brute force attacks.

    禁用XML-RPC以帮助防止DDoS和其他暴力攻击。
  • Modifies some of PHP’s settings to increase the maximum filesize and execution time.

    修改PHP的某些设置以增加最大文件大小和执行时间。
  • Enables so the WordPress permalink feature will work.

    启用以便WordPress永久链接功能正常工作。
  • Configures Apache with UseCanonicalName On to mitigate .You need a fully qualified domain name (FQDN) to use this One-Click, which you can purchase from any domain registrar. You do not have to manage your domain with .

    使用UseCanonicalName On配置Apache以缓解 。您需要使用完全限定的域名(FQDN)才能使用此一键式操作,可以从任何域名注册商购买。 您不必使用管理您的域。

( )

Now that our droplet is setup, we need to SSH into it so that we can finish our WordPress installation. Let's SSH into our droplet:

现在我们的Droplet已经设置好了,我们需要SSH进入它,以便我们可以完成WordPress的安装。 让我们SSH进入Droplet:

ssh root@use_your_droplet_ip

Once we SSH into the droplet, we can start the setup:

通过SSH进入Droplet后,就可以开始设置了:

A domain is the first thing required by our new WordPress setup. We can add a domain and then we will make sure that domain is pointed towards our new droplet. I've added one of my old domains here: angularmachine.com. We've also set up our:

域是我们新的WordPress设置所需的第一件事。 我们可以添加一个域,然后确保该域指向我们的新液滴。 我在这里添加了我的旧域名之一:angularmachine.com。 我们还设置了:

  • email

    电子邮件
  • username

    用户名
  • password

    密码
  • blog title

    博客标题

Make sure to run the following after all this is done so that the new setup will be loaded.

完成所有这些操作后,请确保运行以下命令,以便加载新设置。

systemctl reload apache2

( )

Next up, we will be prompted to install LetsEncrypt and HTTPS for this domain.

接下来,将提示我们为此域安装LetsEncrypt和HTTPS。

The first thing we need to do is make sure that our domain is pointed at this new droplet. We'll go back into our dashboard, under networking and create the following A records.

我们需要做的第一件事是确保我们的域指向这个新的液滴。 我们将回到网络下的仪表板,并创建以下A记录。

@    use_your_droplet_ipwww  use_your_droplet_ip

Go back to your installation and let's start the LetsEncrypt setup. Note that it may take a couple minutes for the DNS changes to take place. Go through the setup and tell LetsEncrypt that it will need to work for both the main domain and the www domain.

返回安装,开始LetsEncrypt设置。 请注意,DNS更改可能要花费几分钟。 完成安装程序,并告诉LetsEncrypt它需要同时在主域和www域工作。

We can make all site traffic be HTTPS:

We can now see our site is live!

现在,我们可以看到我们的网站正在运行!

You can login to your admin dashboard at .

您可以通过登录到管理控制台。

( )

We have a WordPress install up and running quickly with DigitalOcean's 1-click apps. You can now use this WordPress site as your main site or use it as a Headless CMS and pair it with a frontend tool like Gatsby.

我们已经安装了WordPress,并且可以通过DigitalOcean的一键式应用程序快速运行。 现在,您可以将该WordPress网站用作主要网站,也可以将其用作Headless CMS,并与诸如Gatsby之类的前端工具配对。

No matter what you do with your site, you will always have control of the content and database since it is hosted on your own droplet.

不管您对网站做什么,由于内容和数据库都托管在您自己的Droplet中,因此您始终可以对其进行控制。

翻译自:

转载地址:http://yguwd.baihongyu.com/

你可能感兴趣的文章
git
查看>>
btn按钮之间事件相互调用
查看>>
Entity Framework 4.3.1 级联删除
查看>>
codevs 1163:访问艺术馆
查看>>
冲刺Noip2017模拟赛3 解题报告——五十岚芒果酱
查看>>
并查集
查看>>
sessionStorage
查看>>
代码示例_进程
查看>>
Java中关键词之this,super的使用
查看>>
人工智能暑期课程实践项目——智能家居控制(一)
查看>>
前端数据可视化插件(二)图谱
查看>>
kafka web端管理工具 kafka-manager【转发】
查看>>
获取控制台窗口句柄GetConsoleWindow
查看>>
Linux下Qt+CUDA调试并运行
查看>>
51nod 1197 字符串的数量 V2(矩阵快速幂+数论?)
查看>>
OKMX6Q在ltib生成的rootfs基础上制作带QT库的根文件系统
查看>>
zabbix
查看>>
多线程基础
查看>>
完美解决 error C2220: warning treated as error - no ‘object’ file generated
查看>>
使用SQL*PLUS,构建完美excel或html输出
查看>>