Add WordPress scheduled assignments to the Pagoda Panel

The text is the 8th article in the topic “Operation and Maintenance WordPress Website under Pagoda Panel (8 Articles in Total)”. Before reading this article, it is recommended to read the previous article first:

  • 1.Manage Linux servers with WinSCP and PuTTY
  • 2.Install Pagoda Panel and Configure Server LNMP Environment
  • 3.Pagoda Panel Add websites and install WordPress
  • 4.Pagoda Panel adds SSL Certificates to WordPress websites and sets https access
  • 5.Pagoda Panel automatically backs up website files and databases to Alibaba Cloud OSS at regular intervals
  • 6.Pagoda panel turns on monitoring function and solves the problem of excessive memory occupation
  • 7.Pagoda Panel Encryption WordPress Website Management Backend

In the article “How to disable wp-cron and set up correct Cron scheduled tasks in WordPress”, we introduced why we should use the server’s scheduled tasks to replace WordPress’s own wp-cron scheduled tasks. Here we will introduce how to use pagoda scheduled tasks to replace them.

Disable wp-cron in WordPress

Before replacing, we need to disable wp-cron.

To disable wp-cron, you need to edit wp-config.php, a core WordPress configuration file. It is located in the root folder of your WordPress site and you need to use an FTP client or a file manager in the web hosting control panel.

This file contains a lot of sensitive information, and making erroneous changes could damage your WordPress website. We recommend backing up your files first, just in case. You can follow our guide to learn how to edit wp-config.php in WordPress.

You need to paste the following code into the wp-config.php file, just in the"That's it, stop editing! Happy Blog/* That's all, stop editing! Happy publishing. */“above.

define('DISABLE_WP_CRON', true);
将代码粘贴到 wp-config

After that, you need to save the file and upload it back to your website.

When someone visits your website, WordPress will no longer trigger wp-cron.

Add scheduled tasks to the pagoda panel

Pagoda Panel is an excellent server environment panel in China. If your server uses Pagoda Panel, you can use it at the scheduled task The page adds plans according to the following example:

baota cron jobs wpdaxue com - 如何在 WordPress 中禁用 wp-cron 并设置正确的 Cron 定时任务

Select “Access URL” for the task type, set the execution period to 30 minutes, and set the URL URL to:

https://example.com/wp-cron.php? doing_wp_cron

Make sure you replace “example.com” with the URL of your own website.

At this point, we have successfully added the Pagoda Plan task to perform WordPress wp-cron scheduled tasks.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注