How to use wordpress build your website, blog or business site

625 Views
1 Comment

共计 4695 个字符,预计需要花费 12 分钟才能阅读完成。

summary

as I know, many people want to build website to show something, such as: blog, business site.

let me teach you how to build website by wordpress . let's go.

you need by one linux server

you can buy server, I recommend vultr, link is:
Click to sign up, new users get $100

ofcourse you also can buy other server, such as
搬瓦工(bandwagon): https://bwh81.net/
BlueHost(wordpress official recommend): https://www.bluehost.hk/
Site ground: https://world.siteground.com/

my server is vultr, I think it's cheap and faster, more Cost performance.

login to server

open bash tool(Mac) or cmd(windows) tool

How to use wordpress build your website, blog or business site

input this command:

ssh root@127.0.0.1

127.0.0.1 is your server ip address.

then input your password to login

install docker

update apt-get

sudo apt-get update

install packages

sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common

install docker GPG secret

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

set docker stable stock link

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

update apt-get

sudo apt-get update

install docker CE

sudo apt-get install docker-ce docker-ce-cli containerd.io

checkout Docker server status

sudo systemctl status docker

install wordpress by docker

what is docker, if you don't know ,can click it:https://docker.p2hp.com/

search wordpress of docker

docker search wordpress
[root@MiWiFi-RC01-srv ~]# docker search wordpress
INDEX       NAME                                               DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
docker.io   docker.io/wordpress                                The WordPress rich content management syst...   5260      [OK]       
docker.io   docker.io/bitnami/wordpress                        Bitnami container image for WordPress           224                  [OK]
docker.io   docker.io/bitnami/wordpress-nginx                  Bitnami Docker Image for WordPress with NGINX   75                   [OK]
docker.io   docker.io/rapidfort/wordpress                      RapidFort optimized, hardened image for Wo...   15                   
docker.io   docker.io/appsvcorg/wordpress-alpine-php           New WordPress image for AppService: https:...   14                   
docker.io   docker.io/centurylink/wordpress                    WordPress image with MySQL removed.             14                   [OK]
docker.io   docker.io/wordpressdevelop/php                     PHP images for the WordPress local develop...   13                   
docker.io   docker.io/wordpressdevelop/cli                     WP-CLI images for the WordPress local deve...   8                    
docker.io   docker.io/ansibleplaybookbundle/wordpress-ha-apb   An APB which deploys WordPress HA               5                    [OK]
docker.io   docker.io/wordpressdevelop/phpunit                 PHPUnit images for the WordPress local dev...   5                    
docker.io   docker.io/vulhub/wordpress-4.6-rce                 WordPress 4.6 任意命令执行漏洞(PHPMailer)               2                    [OK]
docker.io   docker.io/bitnami/wordpress-intel                                                                  1                    
docker.io   docker.io/bitnami/wordpress-k8s-rds-cnab           CNAB bundle for WordPress on Kubernetes co...   1                    
docker.io   docker.io/ellakcy/wordpressswithplugins            A wordpress extention of original wordpres...   1                    
docker.io   docker.io/securecodebox/old-wordpress              Insecure & Outdated WordPress Instance: Ne...   1                    
docker.io   docker.io/wordpresscharmers/wordpress              The WordPress Kubernetes Image                  1                    
docker.io   docker.io/wordpressweb/boats                                                                       1                    
docker.io   docker.io/avenga/wordpress                                                                         0                    
docker.io   docker.io/betterweb/wordpress                      Docker WordPress with Redis                     0                    
docker.io   docker.io/bitnamicharts/wordpress                                                                  0                    
docker.io   docker.io/blackflysolutions/wordpress                                                              0                    
docker.io   docker.io/clearlinux/wordpress                                                                     0                    
docker.io   docker.io/corpusops/wordpress                      https://github.com/corpusops/docker-images/     0                    
docker.io   docker.io/secoresearch/wordpress                   Apache+PHP+Varnish+Wordpress                    0                    [OK]
docker.io   docker.io/vulhub/wordpress                                                                         0                    

pull docker Image

docker pull wordpress
[root@MiWiFi-RC01-srv ~]# docker pull wordpress
Using default tag: latest
Trying to pull repository docker.io/library/wordpress ... 
latest: Pulling from docker.io/library/wordpress
Digest: sha256:20b0b2c6c8f0ebe1317a427699578e581ec59c39e46fc408891c08dafccbbfd5
Status: Image is up to date for docker.io/wordpress:latest

run docker Image

docker run -d -p 8089:80 --name wordpress00 wordpress
[root@MiWiFi-RC01-srv ~]# docker run -d -p 80:80 --name wordpress00 wordpress
795748985b7ba475275f2c1bd41f397e854f908022e1af378c17cff6c53f2d32

TIPS

> -d forever running
> --name named
> -p port,Map port 80 to port 8089
> -v Mount file Local configuration to the php configuration file
> wordpress Image name

you can type this to show all containers

docker ps -a

install mysql

it's easy to install mysql by docker.
run:

docker run -d -p 3301:3306 -e MYSQL_ROOT_PASSWORD=12345678 --name mysql00 mysql:5.7

will download mysql Image and set root user password= 12345678

[root@MiWiFi-RC01-srv ~]# docker run -d -p 3301:3306 -e MYSQL_ROOT_PASSWORD=12345678 --name mysql00 mysql:5.7
83d03d81ab2a1d39f3edee7e18a09973fc7567252df28319974bf24988d7b815

get into mysql and create mysql database

docker exec -it mysql00 /bin/bash

login to root

mysql -u root -p12345678

create database

create database blog;

you can check mysql databases

show databases;
mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| wordpress          |
+--------------------+
5 rows in set (0.00 sec)

setup wordpress

type you ip address and wordpress container port to chrome.
my port is 8089
How to use wordpress build your website, blog or business site

How to use wordpress build your website, blog or business site

How to use wordpress build your website, blog or business site

Tips:
mysql name is blog;
username is root
password is 12345678
mysql host is your address:3301, Imapped 3306 to 3301
table prefix can not fix

then you can set login info;

How to use wordpress build your website, blog or business site

you can login and website install finish

How to use wordpress build your website, blog or business site

END
 0
Comment(1 Comment)
cdm
2024-06-07 13:58:13 回复

If you have some questions , comment in article

 Windows  Chrome  美国加利福尼亚