wordpress的安裝

第一步 安裝nginx

default.conf的內(nèi)容

server {

listen? ? ? 80 default_server;

# listen? ? ? [::]:80 default_server;

server_name? _;

root? ? ? ? /usr/share/nginx/html;

# Load configuration files for the default server block.

include /etc/nginx/default.d/*.conf;

location / {

}

error_page 404 /404.html;

location = /40x.html {

}

error_page 500 502 503 504 /50x.html;

location = /50x.html {

}

}

第二步 安裝mysql



第三步 ?安裝php


第四步 ?安裝wordpress


第五步 ?配置數(shù)據(jù)庫

wp-config.php內(nèi)容

/** Database Charset to use in creating database tables. */

define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */

define('DB_COLLATE', '');

/**#@+

* Authentication Unique Keys and Salts.

*

* Change these to different unique phrases!

* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}

* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.

*

* @since 2.6.0

*/

define('AUTH_KEY',? ? ? ? 'put your unique phrase here');

define('SECURE_AUTH_KEY',? 'put your unique phrase here');

define('LOGGED_IN_KEY',? ? 'put your unique phrase here');

define('NONCE_KEY',? ? ? ? 'put your unique phrase here');

define('AUTH_SALT',? ? ? ? 'put your unique phrase here');

define('SECURE_AUTH_SALT', 'put your unique phrase here');

define('LOGGED_IN_SALT',? 'put your unique phrase here');

define('NONCE_SALT',? ? ? 'put your unique phrase here');

/**#@-*/

/**

* WordPress Database Table prefix.

*

* You can have multiple installations in one database if you give each

* a unique prefix. Only numbers, letters, and underscores please!

*/

$table_prefix? = 'wp_';

/**

* See http://make.wordpress.org/core/2013/10/25/the-definitive-guide-to-disabling-auto-updates-in-wordpress-3-7

*/

/* Disable all file change, as RPM base installation are read-only */

define('DISALLOW_FILE_MODS', true);

/* Disable automatic updater, in case you want to allow

above FILE_MODS for plugins, themes, ... */

define('AUTOMATIC_UPDATER_DISABLED', true);

/* Core update is always disabled, WP_AUTO_UPDATE_CORE value is ignore */

/**

* For developers: WordPress debugging mode.

*

* Change this to true to enable the display of notices during development.

* It is strongly recommended that plugin and theme developers use WP_DEBUG

* in their development environments.

*

* For information on other constants that can be used for debugging,

* visit the Codex.

*

* @link https://codex.wordpress.org/Debugging_in_WordPress

*/

define('WP_DEBUG', false);

/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */

if ( !defined('ABSPATH') )

define('ABSPATH', '/usr/share/wordpress');

/** Sets up WordPress vars and included files. */

require_once(ABSPATH . 'wp-settings.php');


第六部 配置nginx


創(chuàng)建的wordpress.conf內(nèi)容

server {

listen 80;

root /usr/share/wordpress;

location / {

index index.php index.html index.htm;

try_files $uri $uri/ /index.php index.php;

}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

location ~ .php$ {

fastcgi_pass? 127.0.0.1:9000;

fastcgi_index? index.php;

fastcgi_param? SCRIPT_FILENAME? $document_root$fastcgi_script_name;

include? ? ? ? fastcgi_params;

}

}

如果是英文的需要改成簡體中文,需要向/etc/wordpress/wordpress.conf加入define('WPLANG','xh_CN');并向/usr/share/wordpress/wp-content上傳wordpress的語言包


修改語言簡體中文配置

上傳文件需要安裝lrzsz


查詢和安裝lrzsz
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 11,121評論 0 23
  • 作者 姜蘇 我們馬上發(fā)現(xiàn)腳下踩著的木板子壓在了忠忠的腳上。他的一只腳好像連帶后腳腕被壓在了木板下。“壓住腳了,快...
    姜蘇閱讀 110評論 0 0
  • 一天有24個小時,平均分成三分,也就是3個把小時,工作,睡覺各8小時,剩下的8小時應(yīng)該如何利用呢?可能大部分時...
    wh王輝閱讀 236評論 0 0
  • Ignatius最近遇到一個難題,老師交給他很多單詞(只有小寫字母組成,不會有重復(fù)的單詞出現(xiàn)),現(xiàn)在老師要他統(tǒng)計出...
    陌路晨曦閱讀 524評論 0 0
  • 一周,看下過暴雨的陰沉的天逐漸轉(zhuǎn)晴,明日初露,漸烈,然后天邊陰霾,又雨。 不敢說自己究竟是更喜歡雨,或晴,但心情...
    稱心patricia閱讀 772評論 0 1

友情鏈接更多精彩內(nèi)容