WordPress Ping Pages还是只是Posts?

You’ve created a massive site using WordPress—but all in pages, not posts. Should you be worried for your continued SEO happiness? In other words, does WordPress ping when you create a page, or just a post? And for that matter, do page/post edits send out a ping? Let’s dig into WordPress and find out.

您已经使用WordPress创建了一个庞大的网站-但所有页面都是页面,而不是帖子。 您是否应该为持续的SEO幸福而担心? 换句话说,当您创建页面或仅发布帖子时,WordPress是否可以Ping? 因此,页面/帖子编辑是否发出ping命令? 让我们深入研究WordPress并找出答案。

Ping,Ping,Post和Page (Ping, Ping, Post and Page)

For those not familiar with WordPress, here’s some of the relevant parts:

对于那些不熟悉WordPress的人,这里是一些相关的部分:

  • A Post is timestamped content, and usually displays its date along with the category and author name. It also displays on the blog list (roll) in chronological order.

    帖子是带有时间戳的内容,通常显示其日期以及类别和作者名称。 它还按时间顺序显示在博客列表(卷)上。
  • A Page has no date, no category, and no author (although there’s an author internally), and appears on its own web page.

    页面没有日期,类别和作者(尽管内部有作者),并且显示在其自己的网页上。
  • A Ping is the message sent out by a post to announce itself, usually to a service like Pingomatic or Technocrati.

    Ping是由帖子发出以宣布自己的消息,通常是发送给Pingomatic或Technocrati之类的服务。
  • A Ping is also used when you reference other blogs in your posts, either by including the URL in the article (which sends a pingback to the other blog), or by adding the URL to the Send Trackback box that appears when editing an article in WordPress Admin. These pingbacks/trackbacks can sometimes find their way into the other blog’s comments. The reverse is also true, since another blog can ping you about their article. These are the pings referenced in the WordPress Admin tab Settings; Discussion Settings.

    当您引用帖子中的其他博客时,也可以使用Ping,方法是在文章中包括URL(将pingback发送到另一个博客),或者将该URL添加到在其中编辑文章时出现的“发送引用”框中。 WordPress管理员。 这些pingback / trackback有时可以在其他博客的评论中找到自己的方式。 反之亦然,因为另一个博客可以对您的文章进行ping操作。 这些是WordPress“管理”标签“设置”中引用的ping; 讨论设置。

We’re going to focus on the first type of pinging, since the second is primarily between individual blogs, and so has limited traffic-generating ability. In contrast, the first type of ping is a signal that goes out to all the ping servers you’ve set up in your ping list (the Admin tab Settings; Writing, “Update Services”).

我们将专注于第一种类型的ping,因为第二种类型的ping主要在各个博客之间进行,因此流量生成能力有限。 相比之下,第一种ping是向您在ping列表中设置的所有ping服务器发出信号(“管理”标签的“设置”;编写“更新服务”)。

It is quite effective for search engine notice. I once set up a blog for my wife’s writings, and did nothing else to promote it, yet within a short time it was in Google’s index—all due to pinging. This is a great way to start a blog and get notifications out there, especially if there’s regular blog posting going on.

它对于搜索引擎通知非常有效。 我曾经为我妻子的著作建立了一个博客,但没有做任何其他宣传,但是在很短的时间内它就被Google列入了索引-都是由于ping。 这是启动博客并在其中获取通知的好方法,尤其是在定期进行博客发布的情况下。

But before we look into where pinging occurs, let’s look at pinging itself—and WHEN it occurs…

但是,在探查ping发生的位置之前,让我们先看一下ping本身以及发生ping的时间……

选择正确的时间 (Timing Those Pings Right)

It used to be that a ping happened when the article was saved, no matter the publish date. This was a problem, because if you decided to ‘load up’ a blog with thirty articles, one to appear each day, you’d actually ping places like Pingomatic thirty times that first day, and then nothing at all for the rest of the month! Obviously this isn’t what you want, and I wrote my first WordPress book and plugin to make sure pings went out when the article went live, not when the first draft was saved.

过去,无论发布日期如何,保存文章时都会进行ping操作。 这是一个问题,因为如果您决定“加载”包含三十篇文章的博客,每天发表一篇文章,那么您实际上会在第一天对pinggomatic之类的地方进行ping操作三十次,而在其余所有内容中则一无所获。月! 显然,这不是您想要的,我写了我的第一本WordPress书和插件,以确保在文章上线时能发出ping提示,而不是在保存第一个草稿时发出ping提示。

Of course that was 2006, and WordPress pinging has long been fixed. Now, WordPress checks constantly for scheduled article due dates, and publishes them at the appropriate time; it also schedules, not sends, the ping messages then. The result is the pinging for your articles will happen after the article goes live, but not always immediately after, since the scheduled ping request may not happen for a minute or more.

当然是2006年,而WordPress ping早已修复。 现在,WordPress会不断检查预定的文章到期日期,并在适当的时间发布它们; 它还会计划而不发送ping消息。 结果是对文章的ping操作将在文章上线后进行,但并不总是在此之后立即进行,因为计划的ping请求可能不会在一分钟或更长时间内发生。

The reason is that all ping requests are handled by the WordPress cron job, a bit of code that does what’s called a pseudo cron. Cron refers to a program on Unix and Linux computers that runs tasks at a specific time. For example, you might run a cron job once a night to back up your database. They are simple, easy(ish) to set up, and reliable.

原因是所有ping请求都由WordPress cron作业处理,这是一段执行伪cron的代码。 Cron是指在Unix和Linux计算机上在特定时间运行任务的程序。 例如,您可能每晚执行一次cron作业来备份数据库。 它们简单,易于安装且可靠。

WordPress fakes this timing program by running a bit of code when a web page is viewed; this code sees if anything scheduled needs to be done, like moving an article from scheduled status to published, and pinging, then goes and does any tasks it finds.

当浏览网页时,WordPress通过运行一些代码来伪造此计时程序。 这段代码可以查看是否需要执行任何计划的工作,例如将文章从计划的状态迁移到已发布的状态,然后执行ping操作,然后执行发现的所有任务。

On low-traffic blogs it can produce odd results, since those page views are the driving force for this pseudo cron job to work. The result is that your pings may go out much later than expected, minutes or even hours later. However, it’s a rare blog with that little traffic, and so is unlikely to be a problem.

在低流量博客上,它可能会产生奇怪的结果,因为这些页面浏览量是此伪cron作业起作用的驱动力。 结果是,您的ping可能比预期的要晚很多,甚至几分钟甚至几小时也不会。 但是,这是一个很少见的博客,访问量很少,因此不太可能成为问题。

要Ping,还是不要Ping (To Ping, Or Not To Ping)

Now with the groundwork laid, what’s the answer to the question: do Pages ping on publish?

现在有了基础,问题的答案是什么:Pages ping on publish?

The answer is no. WordPress uses very specific, and different, code to manage changes for pages and posts. For example, there is one function called when a post changes from Scheduled to Published, and another for the same change in Pages. However, the code called for posts includes logging a call to the ping services—that is, it adds a WordPress cron entry to do a ping; pages do not have this action, so they don’t get a ping.

答案是不。 WordPress使用非常具体且不同的代码来管理页面和帖子的更改。 例如,当帖子从“计划”更改为“已发布”时,有一个函数被调用,而“页面”中的相同更改则被另一个函数调用。 但是,要求发布的代码包括记录对ping服务的调用-也就是说,它添加了WordPress cron条目来执行ping; 页面没有执行此操作,因此无法执行ping操作。

This can be a problem for some bloggers, especially beginners. Pages can make up the bulk of a typical site since they are more web-like (after all, few web pages need an author listed, or a date). In using pages instead of posts, you lose out on pinging when adding new pages or updating old. However, while this is serious for a new site (no notification for all that content), a site already indexed depends less on pings for search engine visits, and may have less of an issue with it. So while a ping is an asset, for most sites, missing an occasional ping is not the end of the world.

对于某些博客作者,尤其是初学者而言,这可能是个问题。 页面可以构成典型站点的大部分内容,因为它们更像Web(毕竟,很少有Web页面需要列出作者或日期)。 使用页面而不是帖子时,您在添加新页面或更新旧页面时会无法ping通。 但是,尽管这对于新站点来说很严重(所有内容都没有通知),但是已被索引的站点对搜索引擎访问的ping依赖程度较小,并且可能没有太多问题。 因此,尽管ping是一项资产,但对于大多数站点而言,偶尔丢失ping并不是世界末日。

And what about that new wrinkle, custom pages? Custom pages are like pages, but can be massaged to look and act very different, with customized fields and display. They seem like a great way to set up a specialized site. Unfortunately, they too are like any other page, and have no pinging. So be careful designing a custom page site if you plan on using pinging for SEO; for traffic, only posts and pings go together.

那新的皱纹,自定义页面又如何呢? 自定义页面就像页面一样,但是可以通过自定义字段和显示进行按摩,使其外观和行为完全不同。 他们似乎是建立专门站点的好方法。 不幸的是,它们也像其他任何页面一样,无法ping通。 因此,如果计划使用ping进行SEO,请谨慎设计自定义页面网站。 对于流量,只有帖子和ping在一起。

However, what if you’re stuck with a site full of pages, and need the pinging? This can happen with a legacy site where you regularly update pages. With sites like that, you’ll need help in the form of a plugin. I’ve written a very short one that simply detects a page change and sends out a ping, just like posts do. You can get it at ActiveBlogging. Just upload and activate to duplicate the ping settings for your posts.

但是,如果您陷于一个页面充斥的站点,并且需要ping怎么办? 在旧站点中,您会定期更新页面,这可能会发生。 使用此类网站,您将需要插件形式的帮助。 我写了一篇很短的文章,就像帖子一样,它只是检测页面更改并发出ping命令。 您可以在ActiveBlogging上获得它。 只需上传并激活即可复制您的帖子的ping设置。

那编辑呢? (What About Edits?)

One final aspect of pinging to consider is editing: is there a new ping when editing? And if so, do I risk some sort of ban?

ping的最后一个方面是编辑:编辑时是否有新的ping? 如果是这样,我是否会冒某种禁令的风险?

Digging into the WordPress code, there IS a ping signal sent on a post edit (not on page edits of course). So each and every edit causes a new ping list call out. But is that a bad thing?

深入研究WordPress代码,在后期编辑(当然不是页面编辑)上发送ping信号。 因此,每次编辑都会导致发出新的ping列表。 但这是一件坏事吗?

Not really. First off, remember the ping signal is not sent out immediately but is passed to the WordPress pseudo cron routine for processing, which adds a delay. This routine ignores multiple ping requests, so only one will eventually get sent. Additionally, a ping request is not the post’s URL, but the blog’s URL, so that means editing multiple posts over a short period combines the pings, further reducing the number actually sent.

并不是的。 首先,请记住ping信号不会立即发出,而是会传递到WordPress伪cron例程进行处理,这会增加延迟。 此例程忽略多个ping请求,因此最终将仅发送一个。 另外,ping请求不是帖子的URL,而是博客的URL,因此这意味着在短时间内编辑多个帖子会合并ping,从而进一步减少了实际发送的次数。

Finally, the real problem is people that send out pings hundreds or even thousands of times a day. No one can write (or edit) that much, and so obviously it’s a traffic-generating trick. Too many of those, and a company like Pingomatic would need to take action, or melt their servers from the traffic. So they go after the abusers; but rest assured that editing your article five times in five minutes as you catch misspellings is not in the same category as those people!

最后,真正的问题是人们每天发出数百甚至数千次ping的信息。 没有人可以写(或编辑)那么多内容,因此很明显,这是一种流量生成技巧。 其中太多了,像Pingomatic这样的公司将需要采取行动,或者从流量中融化服务器。 于是他们追随施虐者。 但请放心,在您发现拼写错误的情况下,在五分钟内对文章进行五次编辑与这些人不在同一类别!

结论 (Conclusion)

To sum up: Ping requests happen when Posts are published, and when published posts are edited. No other times, and not for pages (at least not without outside help, like a plugin). The requests are executed when WordPress gets around to them, in large part depending on your blog traffic.

总结一下:发布帖子和编辑发布的帖子时会发出Ping请求。 没有其他时间,也没有页面(至少不是没有外部帮助,例如插件)。 当WordPress处理请求时,将执行这些请求,这在很大程度上取决于您的博客流量。

This article required a great deal of code ‘spelunking’ and research to confirm everything; surprisingly, in the over five years since I solved the first ping issue, no one has actually researched when and how pings work (at least, no one I found online). I guess it’s somewhat understandable, given the spaghetti code I had to follow to tease out the details. Nonetheless, knowing how your blog “calls out” should have a big influence on how you set up WordPress blogs in the future—and help you maximize the reach of every bit of that valuable content you put onto your blogs!

本文需要大量的代码“拼写”和研究以确认所有内容。 令人惊讶的是,自从我解决了第一个ping问题以来的五年多里,没有人真正研究过ping的时间和方式(至少没有人在网上找到)。 考虑到我必须遵循的意大利面代码来梳理细节,我想这是可以理解的。 但是,了解您的博客如何“呼出”应该会对您将来建立WordPress博客的方式产生很大的影响-并帮助您最大程度地利用您放置在博客上的那部分有价值的内容!

翻译自: https://www.sitepoint.com/does-wordpress-ping-pages-or-just-posts/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值