<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
>
<channel>
<title><![CDATA[lijiayan'Blog]]></title> 
<atom:link href="https://www.lijiayan.cn/rss.php" rel="self" type="application/rss+xml" />
<description><![CDATA[所謂人生 , 就是取決于遇見了誰...]]></description>
<link>https://www.lijiayan.cn/</link>
<language>zh-cn</language>
<generator>www.emlog.net</generator>
<item>
    <title>Redis 无法访问： php_network_getaddresses: getaddrinfo for Redis failed: Name or service not known [tcp://Redis:6379]</title>
    <link>https://www.lijiayan.cn/post-352.html</link>
    <description><![CDATA[<p>Redis 无法访问： php_network_getaddresses: getaddrinfo for Redis failed: Name or service not known [tcp://Redis:6379]</p><p>解决办法：</p><p>一、宝塔面板</p><p>Linux工具箱--hosts--添加--Redis-127.0.0.1</p><p>二、<strong>在/etc/hosts中手动添加映射：</strong></p><pre><code >127.0.0.1 Redis</code></pre><p><img src="https://www.lijiayan.cn/content/uploadfile/202508/5f9b1755851289.png" alt="wechat_2025-08-22_162738_762.png" data-href="" style=""/></p><p>问题截图：</p><p><img src="https://www.lijiayan.cn/content/uploadfile/202508/64961755851186.png" alt="8d23ebe6cde31e8de018ccbf40bfb8a3.png" data-href="" style=""/></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p>]]></description>
    <pubDate>Fri, 22 Aug 2025 08:26:24 +0000</pubDate>
    <dc:creator>lijiayan</dc:creator>
    <guid>https://www.lijiayan.cn/post-352.html</guid>
</item>
<item>
    <title>wordpress自带数据库修复</title>
    <link>https://www.lijiayan.cn/post-351.html</link>
    <description><![CDATA[<p>WordPress 内置了一个数据库修复工具，可以帮助修复一些常见的数据库问题。</p><p>要使用它，你需要修改 wp-config.php 文件，并在其中添加一行代码：</p><pre><code >define('WP_ALLOW_REPAIR', true);</code></pre><p>然后，在浏览器中访问 </p><pre><code >https://你的网站地址/wp-admin/maint/repair.php</code></pre><p>就可以进入修复页面，选择修复或修复并优化数据库。﻿</p><p><br></p>]]></description>
    <pubDate>Mon, 18 Aug 2025 02:01:17 +0000</pubDate>
    <dc:creator>lijiayan</dc:creator>
    <guid>https://www.lijiayan.cn/post-351.html</guid>
</item>
<item>
    <title>BT-Panel Linux自动磁盘挂载工具1.8</title>
    <link>https://www.lijiayan.cn/post-350.html</link>
    <description><![CDATA[<p>建议全新磁盘或格式化后的磁盘 全新安装。</p><p>挂载后建议重启服务器检查是否挂载成功</p><p><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-size: 16px;">Centos系统请使用以下命令：</span></p><pre><code >yum install wget -y && wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh</code></pre><p><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-size: 16px;">Ubuntu系统请使用以下命令:</span></p><pre><code >wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && sudo bash auto_disk.sh</code></pre><p><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-size: 16px;">Debian系统请使用以下命令:</span></p><pre><code >wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh</code></pre><p><br></p><p><br></p><p><br></p><p><br></p>]]></description>
    <pubDate>Sun, 17 Aug 2025 08:52:54 +0000</pubDate>
    <dc:creator>lijiayan</dc:creator>
    <guid>https://www.lijiayan.cn/post-350.html</guid>
</item>
<item>
    <title>WordPress禁用自动保存和禁用文章修订版本的方法</title>
    <link>https://www.lijiayan.cn/post-349.html</link>
    <description><![CDATA[<p style="text-align: justify;">修改WordPress根目录下的 <span style="color: rgb(238, 238, 238); background-color: rgb(39, 40, 34); font-size: 12px;"><code>wp-config.php</code></span> 文件，找到 <span style="color: rgb(238, 238, 238); background-color: rgb(39, 40, 34); font-size: 12px;"><code>$table_prefix</code></span> 这一行，在其下方加入以下代码：</p><pre style="text-align: justify;"><code>// WordPress禁用自动保存
define('AUTOSAVE_INTERVAL', false);

// WordPress禁用文章修订版本
define('WP_POST_REVISIONS', false);</code></pre><p><br></p><p><br></p>]]></description>
    <pubDate>Tue, 30 Jul 2024 15:01:00 +0000</pubDate>
    <dc:creator>lijiayan</dc:creator>
    <guid>https://www.lijiayan.cn/post-349.html</guid>
</item>
<item>
    <title>关闭WordPress文章修订版本功能</title>
    <link>https://www.lijiayan.cn/post-348.html</link>
    <description><![CDATA[<p style="text-align: left;">下面是关闭WordPress版本修订功能的具体步骤:</p><h2 style="text-align: left;">1.在关闭该功能之前先手动清除一下数据库中已经有的文章版本修订记录</h2><pre style="text-align: left;"><code class="language-highlighter">DELETE FROM wp_posts WHERE post_type ='revision'</code></pre><p style="text-align: left;">·也可用带清理数据功能的插件清理；</p><h2 style="text-align: left;">2.关闭WP_POST_REVISIONS文章版本修订功能</h2><p style="text-align: left;">在 wp-config.php 中新增了一个变量 WP_POST_REVISIONS，把它设置为 false 就可以屏蔽 WordPress文章修订功能。</p><p style="text-align: left;">具体修改位置在 wp-config.php 的<span style="color: rgb(192, 52, 29); background-color: rgb(251, 229, 225); font-size: 12px;"><code>require_once(ABSPATH . ‘wp-settings.php’);</code></span><span style="color: rgb(212, 56, 13);"><strong>前添加代码</strong></span>如下：</p><pre style="text-align: left;"><code class="language-highlighter">/** 关闭WordPress文章修订功能*/
define('WP_POST_REVISIONS', false);</code></pre><p style="text-align: left;">关于WP_POST_REVISIONS这个常量的详细设置为：</p><ul><li style="text-align: left;">true（默认）或者 -1：表示保存所有修订版本；</li><li style="text-align: left;">false或者0：表示不保存任何版本（除了自动保存的版本）；</li><li style="text-align: left;">大于0的整数n：表示保存n个修订版本（+1只保存自动保存版本），旧的版本将被删除。</li></ul><p style="text-align: left;">提示：虽然上述方法可以关闭WordPress文章版本记录的功能，但是并不建议这么做，毕竟凡事留有一些余地还是一件好事，万一在使用WordPress时出现什么情况，我们还可以通过修订版本功能回复文章，所以我们只要养成习惯每个星期清理一次订版本就好了。</p><p style="text-align: left;"><img src="https://www.lijiayan.cn/content/uploadfile/202401/0bd31705753610.png" alt="微信截图_20240120202556.png" data-href="" style=""></p><p><br></p><p><br></p>]]></description>
    <pubDate>Sat, 20 Jan 2024 12:25:00 +0000</pubDate>
    <dc:creator>lijiayan</dc:creator>
    <guid>https://www.lijiayan.cn/post-348.html</guid>
</item>
<item>
    <title>1Panel WordPress安装插件启动Redis Object Cache报错及启用后网站提示 Connection refused问题处理</title>
    <link>https://www.lijiayan.cn/post-347.html</link>
    <description><![CDATA[<h2>1、1Panel WordPress安装插件启动Redis Object Cache报错</h2><blockquote><span style="color: rgb(60, 67, 74); background-color: rgb(255, 255, 255); font-size: 13px;"><strong>Redis 无法访问：</strong></span><span style="color: rgb(60, 67, 74); background-color: rgb(255, 255, 255); font-size: 13px;"> Connection refused [tcp://127.0.0.1:6379]</span></blockquote><p>根目录wp-config.php配置文件添加：</p><pre><code >/** Redis Object Cache */
define('WP_REDIS_HOST', 'redis');
define('WP_REDIS_PORT', '6379');
define('WP_REDIS_DATABASE', '0');
define('WP_REDIS_PASSWORD', '***************');//redis的密码</code></pre><h2>2、Redis Object Cache启用后网站提示 Connection refused问题处理</h2><p>编辑类似文件/opt/1panel/apps/wordpress/wordpress/data/wp-content/object-cache.php</p><p>大约在行620行左右参考以下修改（替换）：</p><pre><code >    protected function build_parameters() {
        $parameters = [
            'scheme' =&gt; 'tcp',
            'host' =&gt; 'redis',
            'port' =&gt; 6379,
            'password' =&gt; '*************',//redis的密码
        ];</code></pre><p>解决方法整理于1Panel社区，便于存档；</p><blockquote><a href="https://www.lijiayan.cn/post-339.html" target="_blank">WordPress同服务器多站点Memcached/Redis内存缓存分离</a></blockquote>]]></description>
    <pubDate>Fri, 19 Jan 2024 05:41:00 +0000</pubDate>
    <dc:creator>lijiayan</dc:creator>
    <guid>https://www.lijiayan.cn/post-347.html</guid>
</item>
<item>
    <title>emlog5.3.1升级pro啦</title>
    <link>https://www.lijiayan.cn/post-346.html</link>
    <description><![CDATA[<p>用了快10多年的emlog5.x版本，花了点时间升级到了新版本，按照官方的升级教程，还是很顺利的（数据都没备份~），庆幸顺利升级；?</p><p>该博客还是托管在阿里云的古董机虚拟机上，升级后无法授权，排查了下是php版本导致的（php5.4?‍♂️）,切换到7.1，ok！</p><blockquote>共享虚拟主机基础版<br>空间：1G 流量：10GB<br>CentOS 5.4 64位<br>15年1月份创建</blockquote><p>这虚拟机价格很便宜，主要是省心；</p><p>截个图留个纪念：</p><p> <img src="https://www.lijiayan.cn/content/uploadfile/202401/4adc1705506735.png" alt="" data-href="" style=""/></p><p><br></p><p><br></p>]]></description>
    <pubDate>Wed, 17 Jan 2024 15:26:00 +0000</pubDate>
    <dc:creator>lijiayan</dc:creator>
    <guid>https://www.lijiayan.cn/post-346.html</guid>
</item>
<item>
    <title>WordPress开启CDN（阿里云）QQ无法登录问题</title>
    <link>https://www.lijiayan.cn/post-345.html</link>
    <description><![CDATA[<p>
    排除其它未知的问题，WordPress开启CDN（阿里云）QQ登录502问题，尝试关闭【回源配置】→【回源302跟随】；
</p>
<p>
    <br />
</p>
<p>
    这是最近遇到的问题，排除到的。
</p>]]></description>
    <pubDate>Sat, 04 Dec 2021 01:48:23 +0000</pubDate>
    <dc:creator>lijiayan</dc:creator>
    <guid>https://www.lijiayan.cn/post-345.html</guid>
</item>
<item>
    <title>WordPress文章关键词自动添加内链链接</title>
    <link>https://www.lijiayan.cn/post-344.html</link>
    <description><![CDATA[<pre><code >在主题根目录下的functions.php文件的&lt;?php下添加以下代码</code></pre><pre><code >1./*
2.*Wordpress文章关键词自动添加内链链接代码
3.*/
4.//连接数量
5.$match_num_from = 1; //一篇文章中同一个关键字少于多少不锚文本（这个直接填1就好了）
6.$match_num_to = 1; //一篇文章中同一个关键字最多出现多少次锚文本（建议不超过1次）
7.//连接到WordPress的模块
8.add_filter('the_content','tag_link',1);
9.//按长度排序
10.function tag_sort($a, $b){
11.if ( $a-&gt;name == $b-&gt;name ) return 0;
12.return ( strlen($a-&gt;name) &gt; strlen($b-&gt;name) ) ? -1 : 1;
13.}
14.//改变标签关键字
15.function tag_link($content){
16.global $match_num_from,$match_num_to;
17.$posttags = get_the_tags();
18.if ($posttags) {
19.usort($posttags, "tag_sort");
20.foreach($posttags as $tag) {
21.$link = get_tag_link($tag-&gt;term_id);
22.$keyword = $tag-&gt;name;
23.//连接代码
24.$cleankeyword = stripslashes($keyword);
25.$url = "&lt;a href=\"$link\" title=\"".str_replace('%s',addcslashes($cleankeyword, '$'),__('查看所有文章关于 %s'))."\"";
26.$url .= 'target="_blank"';
27.$url .= "&gt;".addcslashes($cleankeyword, '$')."&lt;/a&gt;";
28.$limit = rand($match_num_from,$match_num_to);
29.//不连接的代码
30.$content = preg_replace( '|(&lt;a[^&gt;]+&gt;)(.*)('.$ex_word.')(.*)(&lt;/a[^&gt;]*&gt;)|U'.$case, '$1$2%&&&&&%$4$5', $content);
31.$content = preg_replace( '|(&lt;img)(.*?)('.$ex_word.')(.*?)(&gt;)|U'.$case, '$1$2%&&&&&%$4$5', $content);
32.$cleankeyword = preg_quote($cleankeyword,'\'');
33.$regEx = '\'(?!((&lt;.*?)|(&lt;a.*?)))('. $cleankeyword . ')(?!(([^&lt;&gt;]*?)&gt;)|([^&gt;]*?&lt;/a&gt;))\'s' . $case;
34.$content = preg_replace($regEx,$url,$content,$limit);
35.$content = str_replace( '%&&&&&%', stripslashes($ex_word), $content);
36.}
37.}
38.return $content;
39.}</code></pre><p><br></p>]]></description>
    <pubDate>Fri, 05 Nov 2021 13:33:00 +0000</pubDate>
    <dc:creator>lijiayan</dc:creator>
    <guid>https://www.lijiayan.cn/post-344.html</guid>
</item>
<item>
    <title>typecho站点设置多个域名方法</title>
    <link>https://www.lijiayan.cn/post-343.html</link>
    <description><![CDATA[<p style="box-sizing:border-box;margin-top:0.92em;margin-bottom:0.92em;color:rgba(0, 0, 0, 0.86);font-family:&quot;font-size:18px;white-space:normal;background-color:#FFFFFF;">
    改 type­cho 的源代码<br style="box-sizing:border-box;content:&quot;display:block;margin-top:0px;" />
打开程序目录的这个文件 /var/Wid­get/Op­tions.php<br style="box-sizing:border-box;content:&quot;display:block;margin-top:0px;" />
找到
</p>
<pre class=" language-none line-numbers" style="box-sizing:border-box;font-family:Menlo, Monaco, Consolas, &quot;font-size:0.96em;position:relative;width:820px;overflow:hidden;line-height:1.5;border:1px solid rgba(0, 0, 0, 0.05);border-radius:5px;background:#F1F3F3;word-break:normal;overflow-wrap:normal;tab-size:4;hyphens:none;padding-top:32px;counter-reset:linenumber 0;color:rgba(0, 0, 0, 0.86);"><code class=" language-none" style="box-sizing:border-box;font-family:Menlo, Monaco, Consolas, &quot;font-size:1em;padding:10px 10px 10px calc(3em + 10px);border-radius:3px;white-space:inherit;word-spacing:normal;word-break:normal;overflow-wrap:normal;tab-size:4;hyphens:none;display:block;overflow:auto;background:0px 0px !important;">/** 初始化站点信息 */
       if (defined('__TYPECHO_SITE_URL__')) {
           $this-&gt;siteUrl = __TYPECHO_SITE_URL__;
       }</code><span aria-hidden="true" class="line-numbers-rows" style="box-sizing:border-box;position:absolute;pointer-events:none;top:42px;font-size:17.28px;left:0px;width:3em;letter-spacing:-1px;border-right:1px solid rgba(153, 153, 153, 0.2);user-select:none;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-attachment:initial;background-origin:initial;background-clip:initial;"><span style="box-sizing:border-box;pointer-events:none;display:block;counter-increment:linenumber 1;"></span><span style="box-sizing:border-box;pointer-events:none;display:block;counter-increment:linenumber 1;"></span><span style="box-sizing:border-box;pointer-events:none;display:block;counter-increment:linenumber 1;"></span><span style="box-sizing:border-box;pointer-events:none;display:block;counter-increment:linenumber 1;"></span></span></pre>
<p style="box-sizing:border-box;margin-top:0.92em;margin-bottom:0.92em;color:rgba(0, 0, 0, 0.86);font-family:&quot;font-size:18px;white-space:normal;background-color:#FFFFFF;">
    在上面这段代码最前面加入下面的代码（域名改成你自己的）
</p>
<pre class=" language-none line-numbers" style="box-sizing:border-box;font-family:Menlo, Monaco, Consolas, &quot;font-size:0.96em;position:relative;width:820px;overflow:hidden;line-height:1.5;border:1px solid rgba(0, 0, 0, 0.05);border-radius:5px;background:#F1F3F3;word-break:normal;overflow-wrap:normal;tab-size:4;hyphens:none;padding-top:32px;counter-reset:linenumber 0;color:rgba(0, 0, 0, 0.86);"><code class=" language-none" style="box-sizing:border-box;font-family:Menlo, Monaco, Consolas, &quot;font-size:1em;padding:10px 10px 10px calc(3em + 10px);border-radius:3px;white-space:inherit;word-spacing:normal;word-break:normal;overflow-wrap:normal;tab-size:4;hyphens:none;display:block;overflow:auto;background:0px 0px !important;">if($_SERVER['SERVER_NAME']=='www.xxx.cn'){
    $this-&gt;siteUrl = 'http://www.xxx.cn';
}
if($_SERVER['SERVER_NAME']=='www.baidu.com'){
    $this-&gt;siteUrl = 'http://www.baidu.com';
}</code><span aria-hidden="true" class="line-numbers-rows" style="box-sizing:border-box;position:absolute;pointer-events:none;top:42px;font-size:17.28px;left:0px;width:3em;letter-spacing:-1px;border-right:1px solid rgba(153, 153, 153, 0.2);user-select:none;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-attachment:initial;background-origin:initial;background-clip:initial;"><span style="box-sizing:border-box;pointer-events:none;display:block;counter-increment:linenumber 1;"></span><span style="box-sizing:border-box;pointer-events:none;display:block;counter-increment:linenumber 1;"></span><span style="box-sizing:border-box;pointer-events:none;display:block;counter-increment:linenumber 1;"></span><span style="box-sizing:border-box;pointer-events:none;display:block;counter-increment:linenumber 1;"></span><span style="box-sizing:border-box;pointer-events:none;display:block;counter-increment:linenumber 1;"></span><span style="box-sizing:border-box;pointer-events:none;display:block;counter-increment:linenumber 1;"></span></span></pre>
<p style="box-sizing:border-box;margin-top:0.92em;margin-bottom:0.92em;color:rgba(0, 0, 0, 0.86);font-family:&quot;font-size:18px;white-space:normal;background-color:#FFFFFF;">
    如果只有一个域名只需要添加 1 个 多个域名依次添加
</p>
<p style="box-sizing:border-box;margin-top:0.92em;margin-bottom:0.92em;color:rgba(0, 0, 0, 0.86);font-family:&quot;font-size:18px;white-space:normal;background-color:#FFFFFF;">
    <br />
</p>]]></description>
    <pubDate>Thu, 21 Oct 2021 04:55:05 +0000</pubDate>
    <dc:creator>lijiayan</dc:creator>
    <guid>https://www.lijiayan.cn/post-343.html</guid>
</item></channel>
</rss>