简体   繁体   English

如何将现有的wordpress博客集成到新网站中?

[英]How Integrate existing wordpress blog into a new web-site?

I had a wordpress blog which was hosted in the public_html directory but in order to add more features I have developed a seperate web-site. 我有一个wordpress博客,该博客托管在public_html目录中,但是为了添加更多功能,我开发了一个单独的网站。 I have a new index page and several other pages to serve my needs. 我有一个新的索引页面和其他几个页面可以满足我的需求。 My problem is that I can not just put the wordpress into a new directory like blog because I would like to keep all my links and content same. 我的问题是我不能仅仅将wordpress放到博客之类的新目录中,因为我想保持所有链接和内容相同。 So I would like to keep the wordpress blog but I also would like to have a new index page. 因此,我想保留wordpress博客,但我也想拥有一个新的索引页。 Any suggestions? 有什么建议么?

You can move your wordpress install into a new folder, no problem. 您可以将您的wordpress安装移动到新文件夹中,没问题。 Just make sure to update the paths in the wordpress config, otherwise the links won't work correctly. 只要确保更新wordpress配置中的路径,否则链接将无法正常工作。

If you've linked to blog pages in blog posts, you'll have to edit them manually. 如果您已链接到博客文章中的博客页面,则必须手动对其进行编辑。

See Moving Wordpress and Moving a root install into it's own directory (they're different processes, it sounds like you want the first link, but read the second just in case). 请参阅将Wordpress移动将root用户安装移动到它自己的目录中 (它们是不同的过程,听起来您想要第一个链接,但请仔细阅读第二个链接)。

If you want external links to continue to work, you could either (a) try to catch them and redirect with URL Rewrite rules in .htaccess, or (b) write a custom 404 error page in something like PHP that would redirect them. 如果您希望外部链接继续工作,则可以(a)尝试捕获它们并使用.htaccess中的URL重写规则进行重定向,或者(b)用类似PHP的方式编写自定义404错误页面来对其进行重定向。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM