Ubuntu下WordPress搭建部落格

2021-06-18 13:35:05 字數 1320 閱讀 3276

1. 安裝lamp  

具體參考

#wget

3. 解壓到web目錄

#tar zxvf wordpress-x.x.x.tar.gz --directory=/var/www/

4. mysql建立資料庫 wordpress

mysql -u root -p

root為你的資料庫使用者名稱,輸入密碼,進入資料庫

建立「wordpress」資料庫

create database wordpress default charset=utf8;

grant all privileges on wordpress.* to root@localhost identified by 『password『;                   

其中wordpress 是資料庫名, root為資料庫使用者名稱,password為資料庫密碼

flush privileges;

5. 配置wordpress

#cd /var/www/wordpress/

#cp wp-config-sample.php  wp-config.php

#vim wp-config.php 做如下修改

define('db_name', 'wordpress');

define('db_user', 'wordpress');

define('db_password', 'wordpresspassword');

define('db_host', 'localhost');

database_name:在第二步中為wordpress建立的資料庫名稱

database_user :在第二步中建立的wordpress使用者名稱

database_password :第二步中為wordpress使用者名稱設定的密碼

database_host :第二步中設定的hostname(通常是localhost,但總有例外;www.codesky.net參見編輯wp-config.php檔案中的「可能的db_host值)。

database_charset :資料庫字串,通常不可更改(參見zh-cn:編輯wp-config.php)。

database_collate :留為空白的資料庫排序(參見zh-cn:編輯wp-config.php)。

6. 開啟瀏覽器安裝

填寫註冊資訊,安裝,登入

7. 登入個人主頁

參考:

簡易在ubuntu上搭建wordpress

apt get install lamp server 過程中會讓邇輸入各種使用者密碼 安裝好後執行mysql新建資料庫 比如wordpress 等下配置要用 cp wp config sample.php wp config.php 修改wp config.php 把剛剛安裝的mysql使用者和密...

Dockerfile建立Wordpress論壇

在root目錄下 mkdir docker cd docker mkdire nginx mkdire mysql cd nginx 上傳nginx 1.12.2.tar.gz wordpress 4.9.4 zh cn.tar libmcrypt 2.5.7.tar.gz nginx.conf w...

Mac基於Nginx安裝wordpress

2.配置wordpress 拷貝配置示例檔案。注意,需要根據檔案的存放路徑來修改命令 cp wp config sample.php wp config.php 3.編輯配置檔案 sudo vi wp config.php 修改wp config.php的內容 mysql 設定 具體資訊來自您正在使...