美文网首页
Linux_271_LNMP搭建wordpress博客

Linux_271_LNMP搭建wordpress博客

作者: 为宇绸缪 | 来源:发表于2022-10-07 22:53 被阅读0次

1、获取博客程序的代码
wget https://wordpress.org/latest.zip
wget https://wordpress.org/latest.tar.gz

2、解压缩程序代码
yum install unzip -y
unzip latest.zip

3、移动博客程序代码,放入到nginx目录下
mv wordpress /opt/nginx/html/myphp/
移动博客程序所有的代码,放入到nginx解析php程序的目录下
mv wordpress/* ./
可以修改程序代码的属主,属组信息
chown -R nginx.nginx ./* # 我的是用root操作,所以没有改

访问192.168.178.121直接转到下面的链接
http://192.168.178.121/wp-admin/setup-config.php

image.png

填好设置的信息,新建个文件

vim wp-config.php

<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the installation.
 * You don't have to use the web site, you can copy this file to "wp-config.php"
 * and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * Database settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://wordpress.org/support/article/editing-wp-config-php/
 *
 * @package WordPress
 */

// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress' );

/** Database username */
define( 'DB_USER', 'wordpress' );

/** Database password */
define( 'DB_PASSWORD', '123456' );

/** Database hostname */
define( 'DB_HOST', 'localhost' );

/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8mb4' );

/** 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',         ')C1Gh)RM_l(v0zch3hWbNMH_R;oS/Mo H ~hB_Sj[u$k7(a(R;tCw/h9k(C0S9U0' );
define( 'SECURE_AUTH_KEY',  'gLKtWW&sMPQBx9(3_xx0m&l622E5a{t/G4l8<`d_0E#DYRZv>:=sJ1%97DNyEugf' );
define( 'LOGGED_IN_KEY',    '6S@;@IbI2<tbwQ9NsHkTC,tgdWm)-pL[N+U{[x_hhLmFYVEL0(::IEk`8mgN>Bc0' );
define( 'NONCE_KEY',        '#p@U7|[Y&xBd &pr8ThC+JyD@zaMa~fYd}HP}p7BI<[,R?:]Q9mNTc]D8*XEb*3}' );
define( 'AUTH_SALT',        '0=S8lsLf!rS~NdE:X$*o)1%-1PHf~1~&rR#G!0>j%^uY/PTM[`{@VviWn3pS6&tf' );
define( 'SECURE_AUTH_SALT', ',v)$!W?E!CMPMeKtHv6:}_j#p*)j$32ftNxD/0=.]otSi/O#:R^d&)?kbFM [dn@' );
define( 'LOGGED_IN_SALT',   '&lavhdo0)rd5Gec!Ngpl/}T%v#ZfxD@;(0cA op2eYAF$A_S.F7?vQ%vIkPv%rOo' );
define( 'NONCE_SALT',       ' ,X4 F><LAF#p@DC&?S+?Jx^-_{kWUQuo tH@s5d~C_1uZx$|Ghdz@G fxS%}C^c' );

/**#@-*/

/**
 * 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_';

/**
 * 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 documentation.
 *
 * @link https://wordpress.org/support/article/debugging-in-wordpress/
 */
define( 'WP_DEBUG', false );

/* Add any custom values between this line and the "stop editing" line. */



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

/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
    define( 'ABSPATH', __DIR__ . '/' );
}

/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';


相关文章

网友评论

      本文标题:Linux_271_LNMP搭建wordpress博客

      本文链接:https://www.haomeiwen.com/subject/kahiartx.html