wordpress的安装

第一步 安装nginx

default.conf的内容

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


第五步  配置数据库

wp-config.php内容

/** 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


创建的wordpress.conf内容

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
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 13,588评论 0 23
  • 作者 姜苏 我们马上发现脚下踩着的木板子压在了忠忠的脚上。他的一只脚好像连带后脚腕被压在了木板下。“压住脚了,快...
    姜苏阅读 1,036评论 0 0
  • 一天有24个小时,平均分成三分,也就是3个把小时,工作,睡觉各8小时,剩下的8小时应该如何利用呢?可能大部分时...
    wh王辉阅读 1,589评论 0 0
  • Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出...
    陌路晨曦阅读 3,328评论 0 0
  • 一周,看下过暴雨的阴沉的天逐渐转晴,明日初露,渐烈,然后天边阴霾,又雨。 不敢说自己究竟是更喜欢雨,或晴,但心情...
    称心patricia阅读 4,005评论 0 1

友情链接更多精彩内容