WordPress关于将单站点迁移到多站点的问题

我找到了一些关于如何将几个独立的WP站点迁移到WP多站点网络的好教程,但是还有一些问题,希望有经验的人能回答: 1.我需要迁移到多站点网络中的(15)个站点*已经*设置在我要安装多站点的同一域的子域上–如果子域名是需要使用已经存在的现场网站? 2。一些教程提到了导出/导入的不同方法–使用phpMyAdmin(sql文件)或使用WP Tools>;Export(wxr文件)–对于文件类型或方法,我应该知道哪些重要的优点/缺点? 3.同样的教程没有提到如何确保导入到正确的表中(wpu XX(table),其中XX是新子站点的ID)-导入前是否需要修改导出的文件以将XX添加到每个表名中? 4。我在一个教程中看到了一个关于确保不使用\"www\"访问主域的参考资料——目前我们使用的主域没有任何关于www或非www的指令(现在那里只有一个HTML存根页,所有站点都是通过各自的子域访问的),因此我可以向.htaccess文件添加一个指令,但是我如何做到这一点,同时确保我不会弄乱任何访问子域?我熟悉(并谨慎)修改.htaccess文件,但远不是专家,所以这里的指导将是最感激的! 我已经阅读了所有关于\"在你建立网络之前\"等的WP文档,以及支持/反对的理由……这是一个完美的多站点应用程序,因为所有15个单独的站点都与主域(不同的产品、相同的品牌)相关,使用相同的主题和插件,并且只有2个用户,其中一个是我。我希望他们都在多站点,因为坦率地说,我已经厌倦了必须更新15个不同的网站,每次有一个可湿性粉剂核心或插件/主题更新….. 任何帮助是非常感谢的! 1。对。如果服务器上已存在与WP permalink元素匹配的文件或文件夹,则无法访问WP。 2。在我看来,SQL更可靠。一般来说,它的用户友好性较差。但如果有什么问题,我认为SQL文件比WXR更容易修补。假设您对SQL查询语言有一定的了解。 3。您必须修补SQL文件,因为它们创建的表与从中导出的表完全相同。如果你懂SQL,这很容易做到。即使你不这样做,你也可能会想出在哪里做出改变。我不知道WXR. 4。通常的www到非www重写应该是好的。但未经测试。在WP规则集上方插入: RewriteEngine OnRewriteBase /RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]RewriteRule ^(.*)$ http://%1/$1> Ideally going forward, try to avoid www in any of your domain\"s URLs. The Better Search and Replace plugin will let you correct any existing URLs in your DB. What I\"d do is either buy a domain for $10.00 and bring my WordPress up on that, use the IP address (get\"s tricky) or else use a subdomain off of one of my existing domains. The domain name for the network really doesn\"t need to be anything even sensible but if you have a domain idea in your head do look to that to start. Once you have your WordPress installed you can setup your multisite by following the directions documented. You\"ll want to install plugins and the themes you plan to use before you migrate content and you\"ll possibly find a few issues with plugins not liking to run in a network environment. Themes can be a problem too if the same theme is slightly customized for each site. Child Themes are the answer here but can get confusing. Good Notes and naming practices on naming the child themes. I prefer migrating content to a multisite by using the export/import facilities in WordPress (your WXR files). One site at a time. Import the exported file from one discrete site to the proper new site on the multisite. One site at a time!!! Sometimes you\"ll run into issues with larger WXR files where you\"ll need to split those. You can usually split them with most any old XML file splitter as WXR is XML in most respects. Do tell it to import the media with the posts when asked even though you\"ll have a media export file also. Since you\"ll only have two authors site-wide just deal with the author questions as appropriate as the import process will ask. If you run into problems with the old site answering after you think the new site should you\"ll probably have an issue where the Control Panel needs to point the domain to the network site\"s web root instead of the old site. If you run into any problems feel free to come back here and create a new topic as needed for any new issues. Once you\"ve migrated the first site successfully the rest should be fairly straight forward. I\"ve done this several times and I still run into problems. Just relax and take your time… don\"t be afraid to ask for help when you run into that \"brick wall\". Copious notes help, too. @bcworkz and @jnashhawkins, thank you both so much for taking the time to reply, your answers are enormously helpful and I feel a lot more comfortable heading into this. I am very familiar withSQL and phpMyAdmin, and have no experience with WXR files, BUT it sounds like using WXR will maintain media references, so I\"ll do some testing with it, in fact I plan to test migrating a couple of sites to a sandbox before I tackle the real thing.I\"ll also make SQL backups just in case. I have setup WP installations using an IP initially until I could move a domain, as well as a subdomain when \"staging\" a (single) site update and then changed them before going live, but it sounds like for my actual single-to-multisite migration I might need to setup a new (throwaway) domain to use as the primary (since the real domain is already in use) and then once the migration is all done swap out the primary domain for the live one *before* I repoint (using cPanel) the existing subdomains to the new folder on the server? SO I guess that\"s my only remaining question at this point – given that the real domain right now has no WP installation, it\"s just a straight single HTML page containing links to the subdomains (which gets little to no traffic) – which is the better way to begin? 1.Get a temporary domain and setup the multisite and subdomains using: http://temporarydomain.comand http://realsubdomain.temporarydomain.com Then when all sites have been migrated, use a find-replace on the temporary.com to change it to realdomain.com and repoint the subdomains from their individual folders to the new single folder that temporarydomain.com is pointed to. or 2.Setup a new WP (multisite) installation on the real domain (I can replicate the links on the home page) and use; http://realdomain.comand http://realsubdomain.realdomain.com Then when all sites have been migrated, just repoint the subdomains from their individual folders to the same/existing single folder that realdomain.com is pointed to. It seems like option 1 would be safer, but 2 would be easier.I like easy, but prefer to be cautious – I want as little impact as possible on the live sites operations. Thank you both again, I\"m grateful for your help. Either method is fine… You can map the subsites to their proper domain right from the beginning… in other words http://realsubdomain.realdomain.com不考虑网络的域。 我确实喜欢WXR,因为phpMyAdmin work是\"for the birds\",如果不需要的话。媒体文件机制是一个很大的优势。 在正常的迁移中,我只会将上载目录移动,但是由于站点分散到多站点,上载的不同足以导致子站点中丢失大量文件,而主站点中有大量孤立文件。 在开始之前备份所有内容。包括数据库。 再次感谢@jnashhawkins–知道我可以从一开始就正确地进行域映射,这让我减轻了巨大的负担! 没有一个站点曾经使用过/uploads文件夹,从一开始,所有图像和附件都转到wp中定义的/images文件夹-配置.php文件,所以我希望不会有任何损坏的图像/附件链接…祈祷吧。 我会暂时保留这篇文章,然后更新我的结果和我采取的步骤的概要,以防将来对其他人有所帮助,然后我一定会将它标记为已解决。 您还提到您希望集中维护任务。 如果这是您的第一个目标,那么我将提到一个集中维护插件,如ManageWP,它是GoDaddy最近从原始开发人员处购买的一个优秀产品。 对于您的使用,它应该是所有免费服务,并且仍然可以在您需要时使用完全迁移到多站点。 我还建议运行运行运行状况检查和Wapuu仪表板Pet插件。 我在安装的每个WordPress上都运行这些插件。随着WordPress提高了主机便利设施的门槛,健康检查真的会派上用场,友好的小Wapuu告诉你你正在查看的网站需要关注或是\"高兴\"让我微笑,并向我保证我会跟上进度。 ManageWP(或其他大多数管理插件)表现良好离散和多站点。这可能会减轻您需要完成多站点项目的压力…甚至是必要的。 哇,谢谢@jnashhawkins的提示! 我记得几年前的ManageWP,但不知道戈达迪买了它,我肯定会去厕所的我支持任何能让日常维护更容易的东西,因为这个15个站点的网络只是我管理的整个站点的一小部分。非常感谢!

admin_action_{$_REQUEST[‘action’]}

do_action( "admin_action_{$_REQUEST[‘action’]}" )动作钩子::在发送“Action”请求变量时激发。Action Hook: Fires when an ‘action’ request variable is sent.目录锚点:#说明#源码说明(Description)钩子名称的动态部分$_REQUEST['action']引用从GET或POST请求派生的操作。源码(Source)更新版本源码位置使用被使用2.6.0 wp-admin/admin.php:...

日期:2020-09-02 17:44:16 浏览:1127

admin_footer-{$GLOBALS[‘hook_suffix’]}

do_action( "admin_footer-{$GLOBALS[‘hook_suffix’]}", string $hook_suffix )操作挂钩:在默认页脚脚本之后打印脚本或数据。Action Hook: Print scripts or data after the default footer scripts.目录锚点:#说明#参数#源码说明(Description)钩子名的动态部分,$GLOBALS['hook_suffix']引用当前页的全局钩子后缀。参数(Parameters)参数类...

日期:2020-09-02 17:44:20 浏览:1032

customize_save_{$this->id_data[‘base’]}

do_action( "customize_save_{$this->id_data[‘base’]}", WP_Customize_Setting $this )动作钩子::在调用WP_Customize_Setting::save()方法时激发。Action Hook: Fires when the WP_Customize_Setting::save() method is called.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分,$this->id_data...

日期:2020-08-15 15:47:24 浏览:775

customize_value_{$this->id_data[‘base’]}

apply_filters( "customize_value_{$this->id_data[‘base’]}", mixed $default )过滤器::过滤未作为主题模式或选项处理的自定义设置值。Filter Hook: Filter a Customize setting value not handled as a theme_mod or option.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分,$this->id_date['base'],指的是设置...

日期:2020-08-15 15:47:24 浏览:866

get_comment_author_url

过滤钩子:过滤评论作者的URL。Filter Hook: Filters the comment author’s URL.目录锚点:#源码源码(Source)更新版本源码位置使用被使用 wp-includes/comment-template.php:32610...

日期:2020-08-10 23:06:14 浏览:903

network_admin_edit_{$_GET[‘action’]}

do_action( "network_admin_edit_{$_GET[‘action’]}" )操作挂钩:启动请求的处理程序操作。Action Hook: Fires the requested handler action.目录锚点:#说明#源码说明(Description)钩子名称的动态部分$u GET['action']引用请求的操作的名称。源码(Source)更新版本源码位置使用被使用3.1.0 wp-admin/network/edit.php:3600...

日期:2020-08-02 09:56:09 浏览:848

network_sites_updated_message_{$_GET[‘updated’]}

apply_filters( "network_sites_updated_message_{$_GET[‘updated’]}", string $msg )筛选器挂钩:在网络管理中筛选特定的非默认站点更新消息。Filter Hook: Filters a specific, non-default site-updated message in the Network admin.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分$_GET['updated']引用了非默认的...

日期:2020-08-02 09:56:03 浏览:834

pre_wp_is_site_initialized

过滤器::过滤在访问数据库之前是否初始化站点的检查。Filter Hook: Filters the check for whether a site is initialized before the database is accessed.目录锚点:#源码源码(Source)更新版本源码位置使用被使用 wp-includes/ms-site.php:93910...

日期:2020-07-29 10:15:38 浏览:809

WordPress 的SEO 教学:如何在网站中加入关键字(Meta Keywords)与Meta 描述(Meta Description)?

你想在WordPress 中添加关键字和meta 描述吗?关键字和meta 描述使你能够提高网站的SEO。在本文中,我们将向你展示如何在WordPress 中正确添加关键字和meta 描述。为什么要在WordPress 中添加关键字和Meta 描述?关键字和说明让搜寻引擎更了解您的帖子和页面的内容。关键词是人们寻找您发布的内容时,可能会搜索的重要词语或片语。而Meta Description则是对你的页面和文章的简要描述。如果你想要了解更多关于中继标签的资讯,可以参考Google的说明。Meta 关键字和描...

日期:2020-10-03 21:18:25 浏览:1620

谷歌的SEO是什么

SEO (Search Engine Optimization)中文是搜寻引擎最佳化,意思近于「关键字自然排序」、「网站排名优化」。简言之,SEO是以搜索引擎(如Google、Bing)为曝光媒体的行销手法。例如搜寻「wordpress教学」,会看到本站的「WordPress教学:12个课程…」排行Google第一:关键字:wordpress教学、wordpress课程…若搜寻「网站架设」,则会看到另一个网页排名第1:关键字:网站架设、架站…以上两个网页,每月从搜寻引擎导入自然流量,达2万4千:每月「有机搜...

日期:2020-10-30 17:23:57 浏览:1264