• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

problem with wp-cron.php on wordpress

fferraro87

Basic Pleskian
Hi,
i've find out today that scheduled posts in my wordpress site hosted in my plesk server, doesn't work as expected.
so i've investigated and check on my plesk configuration why it doesn't works.

First of all i've check date on my linux machine and it's correct.
After that i've check date.timezone on php.ini of domain and it's correct, so i've found a workaround using "scheduled tasks" on domain.
I've scheduled every minutes the execution of wp-cron.php and with this workaround, it works.

Do you have some idea why wp-cron.php isn't executed directly by wordpress?
it depends from wordpress installation or some configurations on Plesk?
(i've installed Plesk Onyx Version 17.5.3 Update #20 on Centos 6)

Thanks
 
i've found a solution.
Because my Plesk server is behind NAT, in order to make wordpress cron work again i've to edit file hosts on my plesk server and every domain inside my plesk server must be point to private IP.

There is a way to do this automatically everytime that i create a new domain? or there is a way to workaround this problem without edit file hosts?
 
I've scheduled every minutes the execution of wp-cron.php and with this workaround, it works.
Do you have some idea why wp-cron.php isn't executed directly by wordpress?

"wp-cron.php" and "Wordpress-Cron" are misleading. There is no real cron execution from Wordpress. What wordpress does is that the wp-cron.php execution is hooked to page requests. Everytime a page is requested, Wordpress checks whether a "Wordpress cron" execution is due and runs the script. When there are no page requests (no visitors for example), the script will not be executed. This is not an error.
 
"wp-cron.php" and "Wordpress-Cron" are misleading. There is no real cron execution from Wordpress. What wordpress does is that the wp-cron.php execution is hooked to page requests. Everytime a page is requested, Wordpress checks whether a "Wordpress cron" execution is due and runs the script. When there are no page requests (no visitors for example), the script will not be executed. This is not an error.
sorry you're right. but also if there are visitors on my page, it still doesn't works.
It works only if i add a line on file hosts with private IP for every domain inside my plesk
I hope that you have read this document - Running Plesk Behind a Router with NAT ?

Additionally, you can use Event Manager for running special scripts for specific customizations when selected event is triggered.
yes i've add my public ip inside "tools & settings"->"IP addresses" but i've still problem with wordpress cron.
 
Why would you keep wp-cron anyways? Disable wp-cron (e.g. via WP-CLI) and do Cron via your normal system CRON. Saves ressources, more effective, keeps your viewer from all the hassle of a background wp-cron slowing them down.
 
Peter, I understand your comment.. but how does that affect custom Wordpress Installs (Installs not using the Wordpress Toolkit). For example, we have a LOT of cusotmers who use a specific backup plugin called Updraft Plus. This plugin has settings that are supposed to allow the Wordpress Cron to start at a specified time (daily, weekly, etc..) and perform a backup of the files and database.
Every since moving to Plek Onyx, these plugins are no longer working. The sites still get visitors (both public and admin)... but the "automatic" cron process is never evoked. I shouldn't have to go in and set up an automated scheduled task for EVERY WordPress installation on my server.
Something about Plesk is preventing these tasks from running automatically and using the plugin settings as they were intended.
 
Back
Top