WordPress编辑器文章备份

给WordPress网站站长提供文章自动容灾备份的小脚本

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
无法诉说的吟荡
Daily installs
0
Total installs
78
Ratings
2 0 0
Version
0.3.2
Created
2019-01-26
Updated
2023-05-03
Size
1.53 KB
License
N/A
Applies to

WordPress Post Backup是什么?

如其名,这个是一个专给WordPress网站站长使用的一个文章容灾备份的功能脚本,

主要是利用了HTML5的LocalStorage缓存的功能,实时保存我们的输入到浏览器的缓存里面,

因为LocalStorage的特点,即便是关闭浏览器等等也不会丢失数据,在我们手贱或者偶尔浏览器崩溃的时候不至于丢失我们写下的文字

只需要点击【一键恢复】即可恢复备份的文字

我的网站:极客公园

特别注意

在页面关闭重新打开,你打算恢复文字的时候:【千万不要去点击编辑器里面的文本框,你需要首先去点击恢复,再去操作其他,不然文本框一个点击就会覆盖掉之前的备份记录!切记!】

几点说明

脚本会在那几个页面生效

--目前脚本只会在WordPress后台的文章发布以及编辑页面生效

脚本安装了会有界面?

--脚本安装之后会在媒体按钮旁边多出2个按钮,如下图↓

如何使用?

--在文章页面写文字,内容会实时记录到浏览器LocalStorage缓存里面的

写多个文章是否会出现数据错乱?

--正常是不会的,如果是编辑页面的时候,缓存的key是按照postid来记录的,一篇文章一个缓存,不冲突

但是如果是新建的文章,只有一个缓存记录,默认key是newpost。

我能在哪里查看到我的文章缓存?

根据浏览器的不同,名字不太一样,但是位置都差不多,下面是Chrome浏览器的位置

这个缓存能保存多久,以及保存多少文章?

--根据HTML5标准,LocalStorage缓存是没有时间限制的,如果不去手动清除的话,会一直都在的

至于大小,标准说法是大小是5MB。

注意事项

1、在使用恢复功能的时候,请一定要先执行恢复功能,然后在继续输入文字,不然之前记录的内容会被新输入的内容覆盖,

这个问题和所有的备份恢复类一样。

2、由于本人是是使用的WordPress的文本编辑器功能,所以对可视化编辑器和古登堡编辑器下面是否生效并不清楚。