群晖安装wordpress 外网(域名访问)


群晖安装wordpress 外网(域名访问)

1.群晖套件安装的不知道咋弄,外网无法访问

2.偷懒访式安装

2.1群晖套件安装wordpress,后删除wordpress,但是不删除数据库。

2.2删除如图目录wordpress文件夹

 2.3 wordpress官网下载最新版

上传到服务器上

2.4拷贝到web文件夹下

配置权限

 2.5wp-config-sample.php拷贝一份为重新命名为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_user' );

/** Database password */
define( 'DB_PASSWORD', '数据库,密码' );

/** Database hostname */
define( 'DB_HOST', '127.0.0.1:3307' );

/** 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',         '=#.{O $~p_%Z;>o6cFk+m{p+|M`JDD;p$!)JgI|~oBu03x),iTi)fA7b{6%GbPaB' );
define( 'SECURE_AUTH_KEY',  'dtDhF;=0HhF7$ga79M' );
define( 'LOGGED_IN_KEY',    'Zn)`c|>g-8@)VK>eiKV}-6:a7%dEssL`^v,I]}F,B!%H2B}_d#1V8UMR.CR/TL,p' );
define( 'NONCE_KEY',        'S)l$Bj52+M^,0_%kQa=Z2iQ,&tPOVHTUko(ooWMNAJ`jSbIZ;m5e. ;F+kh`,fv:' );
define( 'AUTH_SALT',        'X)pWTURY*R.l_tftP_G]6Joaxt?`jZiXtut@r Gb.pa/+!1Jq:XernxCrJjdy)c%' );
define( 'SECURE_AUTH_SALT', '_Y' );
define( 'LOGGED_IN_SALT',   '|7FrDR4PwOu(sg=0dG)XF|_9Cw>=.(^WnZ4>dQcjPYv)&Ps' );
define( 'NONCE_SALT',       ';|q@n*HP2Fma-8+b_ =fE81[QLNO@65$I|/~pdFm-TKa>;p[0IFbtJCvF;cK!eF ' );

/**#@-*/

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

3.Web Stion配置

3.1常规配置如下

 3.2配置PHP,我选用7.3

 3.3配置虚拟主机

 4.局域网访问开始安装wordpress

4.1输入网址:http://192.168.231.3:13339 

 按照提示安装wordpress

4.2登录

 登录界面如图

 4.2 注意这步小心一点,首先确定端口映射已经配置好了

 再修改下面的两个地址为域名(记录一下刚刚内网登录地址http://192.168.231.3:13339/wp-login.php?loggedout=true&wp_lang=zh_CN ,后面需要与域名组合访问登录)

配置好保存,域名+:13339/wp-login.php?loggedout=true&wp_lang=zh_CN 访问登录页面

自由的飞翔吧!