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 ...
随机推荐
- Spring JdbcTemplate使用别名传参(NamedParameterJdbcTemplate)
原文地址http://www.voidcn.com/article/p-cwqegtpg-hx.html 在使用JdbcTemplate时,一般传参都是用的?来绑定参数,但是对于某种情况就不适用了,例 ...
- C语言字节对齐分析
1.前言 什么是字节对齐呢?现代计算机中的内存空间都是按字节(byte)划分的,从理论上讲似乎任何类型的变量的访问都可以从任何地址开始,但是实际情况是在访问特定变量的时候经常需要在特定的内存地址进行访 ...
- redux本来是同步的为什么它能执行异步代码(chunk)实现原理是什么 中间件的实现原理是什么
我们用redux执行同步的时候,都是先发起一个dispatch(actionCreator()) 1.先在actionCreator()中生成一个action对象. 2.由dispatch方法将act ...
- IIS 10 PHP 运行环境
1.下载php for windows 解压到指定目录 https://windows.php.net/download/ 2.安装iis 勾选CGI 3 ,处理映射 4.添加测试站点测试是否已经 ...
- Scala Class etc. 2
Higher-Order Functions def 定义的是方法,而不是函数 函数可作为变量存在,可直接调用,也可作为值传递给其他函数 _ 后缀将普通方法变为函数: ceil _ 根据上下文编译器可 ...
- Java学习:Lambda表达式
Lambda表达式 函数式编程思想概述---强调做什么,而不是以什么形式做 面向对象的思想: 做一件事情,找一个能解决这个的事情的对象,调用对象的方法,完成事情 函数式编程思想 只要能获取到结果,谁去 ...
- FusionInsight大数据开发---Redis应用开发
Redis应用开发 要求: 了解Redis应用场景 掌握Redis二次开发环境搭建 掌握Redis业务开发 Redis简介 Redis是一个基于网络的,高性能key-value内存数据库 Redis根 ...
- [個人紀錄] windows form , usercontrol design 模式不見
windows form 跟 usercontrol 都變成cs檔 無法點擊進入設計模式 <Compile Include="Form1.cs"/> <Compi ...
- Trie树的java实现
leetcode 地址: https://leetcode.com/problems/implement-trie-prefix-tree/description/ 难度:中等 描述:略 解题思路: ...
- vue 封装公用函数
Vue 函数封装 格式化浏览器时间 /** * 格式化时间 * @param params * @param blo 默认为true * @returns {string} * @constructo ...