Sitemap Error : XML declaration allowed only at the start of the document解决方法
今天ytkah的客户反馈说他的xml网站地图有问题,提示Sitemap Error : XML declaration allowed only at the start of the document,这个很大的可能是wp-config.php或主题function.php文件中有多余的空格/空行,打开他的function.php看了一下,发现在最后加了一些定义
<?php
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
?>
这个是另起了一个<?php ?>,试着把它去掉,然后把remove定义放到前面的封装里,保存上传覆盖,更新缓存,更新cdn,再访问一下xml网站地图不会出现前面的错误提示了。
参考资料However, the cause most often is an empty line at the beginning (before the <?php line) or end of the wp-config.php or functions.php file. If there is no empty line in these files, we highly recommend running a conflict check to identify what outputs the empty whitespace. You may also need to clear your caching from your plugins/theme/CDN such as Cloudflare/server caching etc.
Sitemap Error : XML declaration allowed only at the start of the document解决方法的更多相关文章
- error on line 1 at column 6: XML declaration allowed only at the start of the document
This page contains the following errors: error on line 1 at column 6: XML declaration allowed only a ...
- error: library dfftpack has Fortran sources but no Fortran compiler found解决方法
用pip install scipy 时提示 error: library dfftpack has Fortran sources but no Fortran compiler found 解决方 ...
- (转)新建maven项目时报错Error:Maven Resources Compiler: Maven project configuration required for module 'XX'解决方法
转载地址:https://blog.csdn.net/qq784515681/article/details/85070195 在新建maven项目时,Problems中报错: Error:Maven ...
- error 1044 (42000):access denied for user ''@'localhost' to database 'quickapp' 解决方法
在虚拟机上重新创建一个数据库时,一直出现这个报错:error 1044 (42000):access denied for user ''@'localhost' to database 'quick ...
- ERROR: JDWP Unable to get JNI 1.2 environment的错误解决方法
在用java编程的时候,在debug模式下偶尔会出现下面的错误,jdk1.6.0-rc1: ERROR: JDWP Unable to get JNI 1.2 environment, jvm-> ...
- Linux:Tomcat报错: Error creating bean with name 'mapScheduler' defined in ServletContext resource 的解决方法
2013-12-31 14:22:28 [ERROR] [ContextLoader.java->initWebApplicationContext(220) Context initializ ...
- Android Studio 2.3.3 出现Error:(26.13) Fail to resole: com.android.support.appcompat永久解决方法
Android Studio 出现Error(26.13):Fail to resole:com.android.support.appcompat-v7.28_ Install Repository ...
- 在配置wem.xml后,Tomcat遇到问题,启动失败的解决方法
前两天在写程序时,碰到了Tomcat无法启动的问题,就是在配置完web.xml后.想必好多小伙伴都有遇到吧. 如图: 出现这个错误的原因是:在配置web.xml的时候出现了错误! 如图所示,没有修改这 ...
- [mysql]ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value 解决方法
在MySQL数据库中的mysql.user表中使用insert语句添加新用户时,可能会出现以下错误: ERROR 1364 (HY000): Field 'ssl_cipher' doesn't ha ...
随机推荐
- Prometheus + Consul 自动发现服务监控
一.Prometheus支持的多种服务发现机制(常用如下) static_configs: 静态服务发现 file_sd_configs: 文件服务发现 dns_sd_configs: DNS 服务发 ...
- Source Insight添加新的文件类型
1.前言 Source Insight这个软件工具功能非常强大,很适合用来分析一些大型的code工程,例如Linux内核源码,本文将简单介绍如何在Source Insight工程中添加一种新的文件类型 ...
- git new
Quick setup — if you’ve done this kind of thing before Set up in Desktop or HTTPSSSH Get started by ...
- 【数据结构与算法】单链表操作(C++)
#include <stdio.h> #include <malloc.h> /*单链表节点定义*/ typedef struct LNode { int data; //da ...
- SQL Server 中获取一个表的字段信息
直接贴代码了: SELECT sysobjects.name AS TableName, syscolumns.Id AS TableId, syscolumns.name AS DbColumnNa ...
- TServerSocket组件
主要作为服务器端的套接字管理器使用.它封装了服务器端的套接字.在打开套接字后,服务器端就处于监听状态,在接收到其它机器的连接请求后,与客户端建立连接,创建一个新的套接字,用于和客户端互传数据,此时TS ...
- JS实现文件自动上传
JS引用: <script type="text/javascript" src="~/bootstrap/js/fileinput.min.js"> ...
- TreeView树,全选,反选,平级选操作
首先事件选择,选择的是MouseUp事件.为啥?因为凡是跟Check有关的,在选中父节点或者子节点,都会二次触发.然后发生的就是死循环. Up事件就可以避免二次触发.Down事件呢?那就触发After ...
- VC++中双缓冲技术画图
用双缓冲,先在内存中绘制,然后拷贝到屏幕DC,这样就不会出现画出去的情况了,前段时间我也是为这个问题费了不少劲.我把我的一段代码给你看一下: CDC *pDC = m_drawbox.GetDC(); ...
- 25、vuex改变store中数据
以登录为例: 1.安装vuex:npm install vuex --save 2.在main.js文件中引入: import store from '@/store/index.js'new Vue ...