DaanvandenBergh on "Using Complete Analytics Optimization Suite (CAOS) w/ WP-Rocket w/ Rocket NGINX"

ساخت وبلاگ

brianjking
Member
Posted 21 hours ago #

Hello,

I'm using Rocket Nginx, a tool for assisting in the configuration of WP-Rocket for servers using NGINX & PHP-FPM. When setting up Rocket Nginx one of the steps requires disabling WP's cron and calling to it from the servers crontab instead using wget or curl.

https://github.com/maximejobin/rocket-nginx

I'm using */15 * * * * curl http://www.website.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1

With that said, I haven't been able to get Complete Analytics Optimization Suite (CAOS) to load the Google Analytics JS file on my server yet.

Any ideas?

Thanks!

https://wordpress.org/plugins/host-analyticsjs-local/

DaanvandenBergh
Member
Plugin Author

Posted 17 hours ago #

If wp-cron is disabled, why don't you put the 'includes/update_local_ga.php'-file in a real cronjob?

That being said, I think the script needs updating in order to run outside of WordPress. I'll look into it tomorrow and check back in here.

DaanvandenBergh
Member
Plugin Author

Posted 10 minutes ago #

To run the script update_local_ga.php in a real cronjob, remove the lines 2 - 3:

// Exit if accessed directly
if (!defined('ABSPATH')) exit;

Then the script is suitable to run outside of WordPress and you should be able to run it from a real cronjob.

DaanvandenBergh
Member
Plugin Author

Posted 3 minutes ago #

Have you tried running wp-cron with wget? Are all the other wp-cron tasks (such as publishing scheduled posts) firing properly?

- - , .
.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 244 تاريخ : دوشنبه 21 تير 1395 ساعت: 20:34