群暉安裝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;=0Hh<Ke=rnsy}jYAsw Q_G?=/&rbCz6#*$-(VE QD=VMy9_<s>F7$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<yryi)x/m@kXM2a<}jD:-=tH0clERE9_ZYh`Ue8!?IyyqEN1wWL@t}ze;L`8W>' ); define( 'LOGGED_IN_SALT', '|7FrDR4PwOu(sg=0dG)XF|_9Cw>=.(^WnZ4>dQcjPYv)&Ps<qmqnllkjN;*~_-IB' ); 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.3 注意這步小心一點,首先確定去路由器配置端口轉發----端口映射已經配置好了
再修改下面的兩個地址為域名(記錄一下剛剛內網登錄地址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 訪問登錄頁面
自由的飛翔吧!