将 Wordpress 网站转换为静态 html?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13324299/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Convert a Wordpress site into static html?
提问by user1814852
Could anyone please give me ideas on converting whole established wordpress site into html?
任何人都可以给我关于将整个已建立的 wordpress 网站转换为 html 的想法吗?
I already searched in google, and found some links:
我已经在谷歌搜索过,并找到了一些链接:
http://forums.digitalpoint.com/showthread.php?t=1601946
http://sumtips.com/2011/08/convert-wordpress-to-static-html-pages.html
http://mossiso.com/2007/09/10/converting-wordpress-to-static-html.html
Any other easy way? Please suggest?
还有其他简单的方法吗?请建议?
回答by markratledge
Use a website ripper or bot to crawl and download the complete site; that will give you a mirror of the Wordpress site in plain html and images. That's basically what those plugins do.
使用网站抓取工具或机器人抓取并下载完整的网站;它将以纯 html 和图像形式为您提供 Wordpress 站点的镜像。这基本上就是那些插件所做的。
They won't give you of course, any of the php or dynamic aspects of the site; only plain html.
他们当然不会给你,网站的任何 php 或动态方面;只有纯html。
One of many rippers out there: http://www.httrack.com/Or google for more. Or use one of those plugins. It's not any easier than that, and that's easy.
许多开膛手之一:http://www.httrack.com/或谷歌更多。或者使用这些插件之一。没有比这更容易的了,这很容易。
Or for a command line utility, try wget
. See http://www.gnu.org/software/wget/
或者对于命令行实用程序,请尝试wget
. 见http://www.gnu.org/software/wget/
Sample usage: wget -r -p -e robots=off http://www.example.com
示例用法: wget -r -p -e robots=off http://www.example.com
Then, take a look at https://codex.wordpress.org/Theme_Developmentto see how standard WordPress themes are structured in terms of file hierarchy, adding scripts and style sheets, and more. Process the text files you get to remove markup from your files and isolate text content, isolate the HTML needed, and make a theme.
然后,查看https://codex.wordpress.org/Theme_Development,了解标准 WordPress 主题在文件层次结构、添加脚本和样式表等方面的结构。处理您获得的文本文件以从文件中删除标记并隔离文本内容、隔离所需的 HTML 并制作主题。
回答by defau1t
The easy way to do for you is to view the source of the page and paste this in notepad, Save this page as html and you are done, remember that It wont be a wordpress page rather a simple static html page. there isn't any other way trust me.
对您来说最简单的方法是查看页面的源代码并将其粘贴到记事本中,将此页面另存为 html 即可完成,请记住它不会是一个 wordpress 页面,而是一个简单的静态 html 页面。没有任何其他方式相信我。