wordpress - 如何在嵌套子域上安装 WordPress?
问题描述
如何在嵌套子域(例如:project1.dev.website.com)上安装 WordPress?
我只是得到一个白屏,但是当我编辑它index.php
以包含echo "Test";
它时,它会出现在屏幕上。
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
echo "Test";
此代码输出:
输出:测试
我究竟做错了什么?
解决方案
解决方案
创建新的 PHP 文件“wp-config.php”
打开“wp-config-sample.php”复制所有代码并将其粘贴到“wp-config.php”中
- 现在开始使用您的数据库详细信息编辑“wp-config.php”
- 从https://api.wordpress.org/secret-key/1.1/salt/获取安全密钥
- 完毕!
感谢肯尼福克斯的帮助。
编辑 wp-config.php(关于使用 wp-config.php 的完整文档):https ://codex.wordpress.org/Editing_wp-config.php
推荐阅读
- excel - 仅计算当月的工作时间
- android - 再次:类'X'不是抽象的,不实现抽象成员公共抽象乐趣writeToParcel
- python - Pip install 不安装任何 .py 文件
- ruby-on-rails - Ruby 中带有复选框和多对多关系的嵌套表单
- java - 使用导航控制器从先前实例中检索数据
- mysql - 更改包含某些字符的表的所有列
- python-3.x - Leetcode Medium:旋转一个链表
- firebase - 我如何在颤振中获得 Firestore 集合和子集合
- php - 在 MySQL 视图中获取当前登录的 wordpress 用户 ID
- python - 在 groupby 之后找到具有相应值的 nlargest(2)