Ali cloud server + WordPress students to build personal blog

Build process:

The first step: First you need a server Ali cloud ECS, if you are a student, you can enjoy the student price of 9.5 yuan / month (Ali cloud wing plan: https://promotion.aliyun.com/ntms/act/campus2018.html ? Source = 5176.11533457 & userCode = 8giwrppt of the type = & Copy ) If the student can not receive coupons after the first purchase (coupon link: https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=8giwrppt  )

Step two: build a cloud server, and set the system password. Here I chose ubuntu system

Steps need to use two tools are: xshell (Step 6 Step 3 will be used, may directly implement remote connection aliyun): https://xshell.en.softonic.com/ and WinSCP (7 will be used): https://winscp.net/eng/download.php
step 3: install php, I installed here is php7.3

2 add-apt-repository ppa:ondrej/php && apt-get update 
3 apt-get -y install php7.3

Step four: Install the apache server

2 启动:/etc/init.d/apache2 start

Step 5: Install Database

启动:service mysql start
登录:mysql -h 127.0.0.1 -P 3306 -uroot -p**** 查库:show databases; 新建库:create database wordpress; ##用于存放WordPress的数据

Step Six: Install the MySQL extension

2 开机启动服务:systemctl start php-fpm

Step Seven: the WordPress placed by winscp from the local computer to the next / var / www / html file server (the server can also be directly downloaded: wget  https://cn.wordpress.org/latest-zh_CN.tar.gz , extract also need to put under / var / www / html files), enter http: // Ali cloud public network IP / wordpress, complete!
Possible problems encountered:

Question 1: Download the theme or plug-in prompts: download failed, unable to create a new directory

Finally, add the following code wp-config.php file in the directory wordpress:

2 define("FS_CHMOD_DIR", 0777);
3 define("FS_CHMOD_FILE", 0777);

Question 2: Download the theme or plug-in prompts: download failed, you can not copy files

The same permissions problem, you need to find the apache user and user groups.

If you are the system comes with apache, open /etc/apache2/apache2.conf, find the following code:
image
If your user and group is given a specific character name rather than a reference here, you can skip this step below, if Also cited is the need to find specific characters of the name APACHE_RUN_USER and APACHE_RUN_GROUP. Then open the / etc / apache2 / envvars, found the following code:

image
Apache thus obtained user name and user groups are www-data

Then modify the permissions WordPress, the process proceeds to the parent directory WordPress, run the following code:

Completed, then we can find the normal download themes and plugins!

Question 3: Retrieve password mail configuration

  1. First, download e-mail plug-in plug-in: WP Mail SMTP
  2. We need to assist third-party mailbox, where 163 selected mailbox, you need to set:
    image

Authorization code:
image

  1. Configuration wordpress plugin-mail:
    image

image
Finally, both the test mailbox is available at:
image

Question 4: E-mail to retrieve a password hint:
image
open wp-login.php in the WordPress root directory, locate the following code (about 374 lines):

change into:

I.e. two angle brackets can be removed.

If the environment is felt more difficult to build, it is recommended that you use the integrated panel pagoda built environment, quick easy and approachable Address: https://www.bt.cn/?invite_code=MV90a3BjeWM=

Guess you like

Origin www.cnblogs.com/youhuihuodong/p/11703807.html